Skip to contentSkip to conversation

Device tree support for TWL regulators

PATCH Superseded Rajendra Nayak 2 participants 5 messages Dec 13, 2011 – Dec 20, 2011

Subsystems (3)

v2 of 3 Superseded Latest is v3 →

lore
Share & tools
lore
#0 lore raw

v2 cover Device tree support for TWL regulators

This series adds DT support for TWL regulator driver and passes regulator data for two OMAP4 boards (OMAP4 panda and OMAP4 sdp) from device tree.

Patches are based on for-next of the regulator tree[1] with omap i2c/twl DT adaptation patches[2] from Benoit pulled in and are available here:
git://gitorious.org/omap-pm/linux.git for-dt/regulator-twl

regards,
Rajendra

[1] git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator.git for-next
[2] git://gitorious.org/omap-pm/linux.git for_3.3/3_omap_dt_i2c_twl

Rajendra Nayak (3):
regulator: twl: adapt twl-regulator driver to dt
ARM: omap4-sdp: Pass regulator data from dt
omap4: panda: Pass regulator data from dt

 .../bindings/regulator/twl-regulator.txt           |   57 +++++++++
 arch/arm/boot/dts/omap4-panda.dts                  |   24 ++++
 arch/arm/boot/dts/omap4-sdp.dts                    |   36 ++++++
 drivers/regulator/twl-regulator.c                  |  128 +++++++++++++-------
 4 files changed, 199 insertions(+), 46 deletions(-)
 create mode 100644 Documentation/devicetree/bindings/regulator/twl-regulator.txt
#1 lore raw

PATCH v2 1/3 regulator: twl: adapt twl-regulator driver to dt

Modify the twl regulator driver to extract the regulator_init_data from device tree when passed, instead of getting it through platform_data structures (on non-DT builds)

Also add documentation for TWL regulator specific bindings.

---
 .../bindings/regulator/twl-regulator.txt           |   57 +++++++++
 drivers/regulator/twl-regulator.c                  |  128 +++++++++++++-------
 2 files changed, 139 insertions(+), 46 deletions(-)
 create mode 100644 Documentation/devicetree/bindings/regulator/twl-regulator.txt
Documentation/devicetree/bindings/regulator/twl-regulator.txt new file +57 -0
new file mode 100644
index 0000000..bdd96d5
@@ -0,0 +1,57 @@
+TWL family of regulators
+
+Required properties:
+- compatible:
+  - "ti,twl4030" for twl4030 regulators
+  - "ti,twl6025" for twl6025 regulators
+  - "ti,twl6030" for twl6030 regulators
+
+Additionally compatible can be used to specify the
+exact regulator/ldo instance like
+For twl6030 regulators/LDO's
+- compatible:
+  - "ti,twl6030-vaux1" for VAUX1 LDO
+  - "ti,twl6030-vaux2" for VAUX2 LDO
+  - "ti,twl6030-vaux3" for VAUX3 LDO
+  - "ti,twl6030-vmmc" for VMMC LDO
+  - "ti,twl6030-vpp" for VPP LDO
+  - "ti,twl6030-vusim" for VUSIM LDO
+For twl6025 regulators/LDO's
+- compatible:
+  - "ti,twl6025-ldo1" for LDO1 LDO
+  - "ti,twl6025-ldo2" for LDO2 LDO
+  - "ti,twl6025-ldo3" for LDO3 LDO
+  - "ti,twl6025-ldo4" for LDO4 LDO
+  - "ti,twl6025-ldo5" for LDO5 LDO
+  - "ti,twl6025-ldo6" for LDO6 LDO
+  - "ti,twl6025-ldo7" for LDO7 LDO
+  - "ti,twl6025-ldoln" for LDOLN LDO
+  - "ti,twl6025-ldousb" for LDOUSB LDO
+For twl4030 regulators/LDO's
+- compatible:
+  - "ti,twl4030-vaux1" for VAUX1 LDO
+  - "ti,twl4030-vaux2" for VAUX2 LDO
+  - "ti,twl5030-vaux2" for VAUX2 LDO
+  - "ti,twl4030-vaux3" for VAUX3 LDO
+  - "ti,twl4030-vaux4" for VAUX4 LDO
+  - "ti,twl4030-vmmc1" for VMMC1 LDO
+  - "ti,twl4030-vmmc2" for VMMC2 LDO
+  - "ti,twl4030-vpll1" for VPLL1 LDO
+  - "ti,twl4030-vpll2" for VPLL2 LDO
+  - "ti,twl4030-vsim" for VSIM LDO
+  - "ti,twl4030-vdac" for VDAC LDO
+  - "ti,twl4030-vintana2" for VINTANA2 LDO
+  - "ti,twl4030-vio" for VIO LDO
+  - "ti,twl4030-vdd1" for VDD1 LDO
+  - "ti,twl4030-vdd2" for VDD2 LDO
+
+Optional properties:
+- Any optional property defined in bindings/regulator/regulator.txt
+
+Example:
+
+	xyz: regulator at 0 {
+		compatible = "ti,twl6030-vaux1","ti,twl6030";
+		regulator-min-microvolt  = <1000000>;
+		regulator-max-microvolt  = <3000000>;
+	};
drivers/regulator/twl-regulator.c +82 -46

248 lines not on this page · raw message

Signature · 1 line
1.7.1
#2 lore raw

PATCH v2 1/3 regulator: twl: adapt twl-regulator driver to dt

On Tue, Dec 13, 2011 at 03:49:33PM +0530, Rajendra Nayak wrote:

I'm OK with this but would prefer that OMAP or TWL people were OK with it too. If you do need to respin:

Quoted 1 line

+For twl4030 regulators/LDO's

' should *not* be used for plurals except when omitting a duplicated s introduced by one (grammar nit but it really bugs me).

#3 lore raw

PATCH v2 2/3 ARM: omap4-sdp: Pass regulator data from dt

In reply to Rajendra Nayak

Pass the adjustable voltage regulator information for omap4sdp board from device tree.

---
 arch/arm/boot/dts/omap4-sdp.dts |   36 ++++++++++++++++++++++++++++++++++++
 1 files changed, 36 insertions(+), 0 deletions(-)
arch/arm/boot/dts/omap4-sdp.dts +36 -0
index 0ab14cb..daf8b69 100644
@@ -40,6 +40,42 @@
 			compatible = "ti,twl4030-rtc";
 			interrupts = <11>;
 		};
+
+		vaux1: regulator at 0 {
+			compatible = "ti,twl6030-vaux1","ti,twl6030";
+			regulator-min-microvolt = <1000000>;
+			regulator-max-microvolt = <3000000>;
+		};
+
+		vaux2: regulator at 1 {
+			compatible = "ti,twl6030-vaux2","ti,twl6030";
+			regulator-min-microvolt = <1200000>;
+			regulator-max-microvolt = <2800000>;
+		};
+
+		vaux3: regulator at 2 {
+			compatible = "ti,twl6030-vaux3","ti,twl6030";
+			regulator-min-microvolt = <1000000>;
+			regulator-max-microvolt = <3000000>;
+		};
+
+		vmmc: regulator at 3 {
+			compatible = "ti,twl6030-vmmc","ti,twl6030";
+			regulator-min-microvolt = <1200000>;
+			regulator-max-microvolt = <3000000>;
+		};
+
+		vpp: regulator at 4 {
+			compatible = "ti,twl6030-vpp","ti,twl6030";
+			regulator-min-microvolt = <1800000>;
+			regulator-max-microvolt = <2500000>;
+		};
+
+		vusim: regulator at 5 {
+			compatible = "ti,twl6030-vusim","ti,twl6030";
+			regulator-min-microvolt = <1200000>;
+			regulator-max-microvolt = <2900000>;
+		};
 	};
 };
 
Signature · 1 line
1.7.1
#4 lore raw

PATCH v2 3/3 omap4: panda: Pass regulator data from dt

In reply to Rajendra Nayak

Pass the adjustable voltage regulator information for omap4panda board from device tree.

---
 arch/arm/boot/dts/omap4-panda.dts |   24 ++++++++++++++++++++++++
 1 files changed, 24 insertions(+), 0 deletions(-)
arch/arm/boot/dts/omap4-panda.dts +24 -0
index b66bcd6..f6cc48a 100644
@@ -40,6 +40,30 @@
 			compatible = "ti,twl4030-rtc";
 			interrupts = <11>;
 		};
+
+		vaux2: regulator at 0 {
+			compatible = "ti,twl6030-vaux2","ti,twl6030";
+			regulator-min-microvolt = <1200000>;
+			regulator-max-microvolt = <2800000>;
+		};
+
+		vaux3: regulator at 1 {
+			compatible = "ti,twl6030-vaux3","ti,twl6030";
+			regulator-min-microvolt = <1000000>;
+			regulator-max-microvolt = <3000000>;
+		};
+
+		vmmc: regulator at 2 {
+			compatible = "ti,twl6030-vmmc","ti,twl6030";
+			regulator-min-microvolt = <1200000>;
+			regulator-max-microvolt = <3000000>;
+		};
+
+		vpp: regulator at 3 {
+			compatible = "ti,twl6030-vpp","ti,twl6030";
+			regulator-min-microvolt = <1800000>;
+			regulator-max-microvolt = <2500000>;
+		};
 	};
 };
 
Signature · 1 line
1.7.1