Skip to contentSkip to conversation

davinci: Add device tree data for tps6507x.

PATCH RESEND In review Vishwanathrao Badarkhe, Manish 2 participants 4 messages Mar 7, 2013 – Mar 15, 2013 Device tree bindings

lore
Share & tools
lore
#0 lore raw

cover davinci: Add device tree data for tps6507x.

Add device tree data for regulator via tps6507x mfd device in da850-evm.
Applies on top of v3.9-rc1 of linus tree.

Tested on da850-evm device.

Test procedure followed as below:
Once device boots up, issue command as:

$for reg in /sys/class/regulator/*; do echo $reg cat $reg/name
cat $reg/state cat $reg/microvolts; done

This command will print all available regulators with its name, status (enabled/disabled) and voltages(in microvolts) like as below:
/sys/class/regulator/regulator.1 VDCDC1_3.3V enabled 3300000 /sys/class/regulator/regulator.2 VDCDC2_3.3V enabled 3300000 /sys/class/regulator/regulator.3 VDCDC3_1.2V enabled 1200000 /sys/class/regulator/regulator.4 LDO1_1.8V enabled 1800000 /sys/class/regulator/regulator.5 LDO2_1.2V enabled 1200000

Note: Some of patches in this series are already accepted and residing in v3.9-rc1 kernel. These patches are as follows:

1. mfd: tps6507x: add device-tree support.
2. regulator: tps6507x: add device tree support.
3. ARM: davinci: da850: add DT node for I2C0.

Vishwanathrao Badarkhe, Manish (2):
ARM: regulator: add tps6507x device tree data
ARM: davinci: da850: add tps6507x regulator DT data

 arch/arm/boot/dts/da850-evm.dts |   63 +++++++++++++++++++++++++++++++++++++++
 arch/arm/boot/dts/tps6507x.dtsi |   47 +++++++++++++++++++++++++++++
 2 files changed, 110 insertions(+), 0 deletions(-)
 create mode 100644 arch/arm/boot/dts/tps6507x.dtsi
Signature · 1 line
1.7.4.1
#1 lore raw

PATCH RESEND 1/2 ARM: regulator: add tps6507x device tree data

Add device tree data for tps6507x regulator by adding all tps6507x regulator nodes. Regulators are initialized based on compatible name provided in tps6507x DT file.

All tps6507x PMIC regulator device tree nodes are placed in a separate device tree include file (tps6507x.dtsi). tps6507x.dtsi file is created using datasheet
http://www.ti.com/lit/ds/symlink/tps65070.pdf

Tested on da850-evm.

---
:000000 100644 0000000... 4c326e5... A arch/arm/boot/dts/tps6507x.dtsi

 arch/arm/boot/dts/tps6507x.dtsi |   47 +++++++++++++++++++++++++++++++++++++++
 1 files changed, 47 insertions(+), 0 deletions(-)
arch/arm/boot/dts/tps6507x.dtsi new file +47 -0
new file mode 100644
index 0000000..4c326e5
@@ -0,0 +1,47 @@
+/*
+ * Copyright (C) 2013 Texas Instruments Incorporated - http://www.ti.com/
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ */
+
+/*
+ * Integrated Power Management Chip
+ * http://www.ti.com/lit/ds/symlink/tps65070.pdf
+ */
+
+&tps {
+	compatible = "ti,tps6507x";
+
+	regulators {
+		#address-cells = <1>;
+		#size-cells = <0>;
+
+		vdcdc1_reg: regulator@0 {
+			reg = <0>;
+			regulator-compatible = "VDCDC1";
+		};
+
+		vdcdc2_reg: regulator@1 {
+			reg = <1>;
+			regulator-compatible = "VDCDC2";
+		};
+
+		vdcdc3_reg: regulator@2 {
+			reg = <2>;
+			regulator-compatible = "VDCDC3";
+		};
+
+		ldo1_reg: regulator@3 {
+			reg = <3>;
+			regulator-compatible = "LDO1";
+		};
+
+		ldo2_reg: regulator@4 {
+			reg = <4>;
+			regulator-compatible = "LDO2";
+		};
+
+	};
+};
Signature · 1 line
1.7.4.1
#2 lore raw

PATCH RESEND 2/2 ARM: davinci: da850: add tps6507x regulator DT data

In reply to Vishwanathrao Badarkhe, Manish

Add tps6507x regulator device tree data to da850-evm by adding regulator consumers with tightened constraints and regulator-name.TPS6507x regulator handle can be obtained by using this regulator name.
Regulator constraints are added as per da850 board file.

Regulator names are given as per maximum output voltage the regulator is capable to provide.
for e.g. regulator name for dcdc1 is "VDCDC1_3.3V". Also, add tps6507x PMIC I2C slave device under I2C0 node.

Tested on da850-evm.

---
:100644 100644 f712fb6... d1d091b... M arch/arm/boot/dts/da850-evm.dts

 arch/arm/boot/dts/da850-evm.dts |   63 +++++++++++++++++++++++++++++++++++++++
 1 files changed, 63 insertions(+), 0 deletions(-)
arch/arm/boot/dts/da850-evm.dts +63 -0
index f712fb6..d1d091b 100644
@@ -35,6 +35,10 @@
 			clock-frequency = <100000>;
 			pinctrl-names = "default";
 			pinctrl-0 = <&i2c0_pins>;
+
+			tps: tps@48 {
+				reg = <0x48>;
+			};
 		};
 		wdt: wdt@1c21000 {
 			status = "okay";
@@ -45,4 +49,63 @@
 		pinctrl-names = "default";
 		pinctrl-0 = <&nand_cs3_pins>;
 	};
+	vbat: fixedregulator@0 {
+		compatible = "regulator-fixed";
+		regulator-name = "vbat";
+		regulator-min-microvolt = <5000000>;
+		regulator-max-microvolt = <5000000>;
+		regulator-boot-on;
+	};
+};
+
+/include/ "tps6507x.dtsi"
+
+&tps {
+	vdcdc1_2-supply = <&vbat>;
+	vdcdc3-supply = <&vbat>;
+	vldo1_2-supply = <&vbat>;
+
+	regulators {
+		vdcdc1_reg: regulator@0 {
+			regulator-name = "VDCDC1_3.3V";
+			regulator-min-microvolt = <3150000>;
+			regulator-max-microvolt = <3450000>;
+			regulator-always-on;
+			regulator-boot-on;
+		};
+
+		vdcdc2_reg: regulator@1 {
+			regulator-name = "VDCDC2_3.3V";
+			regulator-min-microvolt = <1710000>;
+			regulator-max-microvolt = <3450000>;
+			regulator-always-on;
+			regulator-boot-on;
+			ti,defdcdc_default = <1>;
+		};
+
+		vdcdc3_reg: regulator@2 {
+			regulator-name = "VDCDC3_1.2V";
+			regulator-min-microvolt = <950000>;
+			regulator-max-microvolt = <1350000>;
+			regulator-always-on;
+			regulator-boot-on;
+			ti,defdcdc_default = <1>;
+		};
+
+		ldo1_reg: regulator@3 {
+			regulator-name = "LDO1_1.8V";
+			regulator-min-microvolt = <1710000>;
+			regulator-max-microvolt = <1890000>;
+			regulator-always-on;
+			regulator-boot-on;
+		};
+
+		ldo2_reg: regulator@4 {
+			regulator-name = "LDO2_1.2V";
+			regulator-min-microvolt = <1140000>;
+			regulator-max-microvolt = <1320000>;
+			regulator-always-on;
+			regulator-boot-on;
+		};
+	};
 };
Signature · 1 line
1.7.4.1
#3 lore raw
In reply to Vishwanathrao Badarkhe, Manish

Hi Mark,

Quoted 3 lines · Manish

Add device tree data for regulator via tps6507x mfd device in da850-evm.
Applies on top of v3.9-rc1 of linus tree.

I would like to take this series via the davinci tree to manage dependencies with rest of the DT patches. Any comments/objections on this series? It will be nice to get your Acked-by/Reviewed-by.

Thanks,
Sekhar