linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2 0/4] Add AM33XX regulators device tree data
@ 2012-07-24  6:18 AnilKumar Ch
  2012-07-24  6:18 ` [PATCH v2 1/4] ARM: OMAP2+: AM33XX: Add tps65910 " AnilKumar Ch
                   ` (4 more replies)
  0 siblings, 5 replies; 16+ messages in thread
From: AnilKumar Ch @ 2012-07-24  6:18 UTC (permalink / raw)
  To: linux-arm-kernel

This patch series add AM33XX regulators (tps65910/tps65217) device
tree data to am335x-evm and am335x-bone dts files. These patches
are based on Tony L "devel-dt" tree and tested on AM335x EVM and
Bone devices.

Changes from v1:
	- Incorporated all Mark Brown's review comments on v1 by
	  * moving all the regulator constraints to corresponding
	    DTS file
	  * Regulator constraints are added according to board.
	- regulator name is added.

AnilKumar Ch (4):
  ARM: OMAP2+: AM33XX: Add tps65910 device tree data
  ARM: OMAP2+: AM33XX: Add tps65217 device tree data
  arm/dts: Add tps65910 regulator DT data to am335x-evm.dts
  arm/dts: Add tps65217 regulator DT data to am335x-bone.dts

 arch/arm/boot/dts/am335x-bone.dts |   28 ++++++++++++
 arch/arm/boot/dts/am335x-evm.dts  |   28 ++++++++++++
 arch/arm/boot/dts/tps65217.dtsi   |   56 ++++++++++++++++++++++++
 arch/arm/boot/dts/tps65910.dtsi   |   86 +++++++++++++++++++++++++++++++++++++
 4 files changed, 198 insertions(+)
 create mode 100644 arch/arm/boot/dts/tps65217.dtsi
 create mode 100644 arch/arm/boot/dts/tps65910.dtsi

-- 
1.7.9.5

^ permalink raw reply	[flat|nested] 16+ messages in thread

* [PATCH v2 1/4] ARM: OMAP2+: AM33XX: Add tps65910 device tree data
  2012-07-24  6:18 [PATCH v2 0/4] Add AM33XX regulators device tree data AnilKumar Ch
@ 2012-07-24  6:18 ` AnilKumar Ch
  2012-07-24  6:18 ` [PATCH v2 2/4] ARM: OMAP2+: AM33XX: Add tps65217 " AnilKumar Ch
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 16+ messages in thread
From: AnilKumar Ch @ 2012-07-24  6:18 UTC (permalink / raw)
  To: linux-arm-kernel

Add device tree data for tps65910 regulator by adding all tps65910
regulator nodes. Regulator is initialized based on compatible name
provided in tps65910 DT file.

All tps65910 PMIC regulator device tree nodes are placed in a
separate device tree include file (tps65910.dtsi). This patch
was tested on AM335x-EVM.

Signed-off-by: AnilKumar Ch <anilkumar@ti.com>
---
 arch/arm/boot/dts/tps65910.dtsi |   86 +++++++++++++++++++++++++++++++++++++++
 1 file changed, 86 insertions(+)
 create mode 100644 arch/arm/boot/dts/tps65910.dtsi

diff --git a/arch/arm/boot/dts/tps65910.dtsi b/arch/arm/boot/dts/tps65910.dtsi
new file mode 100644
index 0000000..92693a8
--- /dev/null
+++ b/arch/arm/boot/dts/tps65910.dtsi
@@ -0,0 +1,86 @@
+/*
+ * Copyright (C) 2012 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/tps65910.pdf
+ */
+
+&tps {
+	compatible = "ti,tps65910";
+
+	regulators {
+		#address-cells = <1>;
+		#size-cells = <0>;
+
+		vrtc_reg: regulator at 0 {
+			reg = <0>;
+			regulator-compatible = "vrtc";
+		};
+
+		vio_reg: regulator at 1 {
+			reg = <1>;
+			regulator-compatible = "vio";
+		};
+
+		vdd1_reg: regulator at 2 {
+			reg = <2>;
+			regulator-compatible = "vdd1";
+		};
+
+		vdd2_reg: regulator at 3 {
+			reg = <3>;
+			regulator-compatible = "vdd2";
+		};
+
+		vdd3_reg: regulator at 4 {
+			reg = <4>;
+			regulator-compatible = "vdd3";
+		};
+
+		vdig1_reg: regulator at 5 {
+			reg = <5>;
+			regulator-compatible = "vdig1";
+		};
+
+		vdig2_reg: regulator at 6 {
+			reg = <6>;
+			regulator-compatible = "vdig2";
+		};
+
+		vpll_reg: regulator at 7 {
+			reg = <7>;
+			regulator-compatible = "vpll";
+		};
+
+		vdac_reg: regulator at 8 {
+			reg = <8>;
+			regulator-compatible = "vdac";
+		};
+
+		vaux1_reg: regulator at 9 {
+			reg = <9>;
+			regulator-compatible = "vaux1";
+		};
+
+		vaux2_reg: regulator at 10 {
+			reg = <10>;
+			regulator-compatible = "vaux2";
+		};
+
+		vaux33_reg: regulator at 11 {
+			reg = <11>;
+			regulator-compatible = "vaux33";
+		};
+
+		vmmc_reg: regulator at 12 {
+			reg = <12>;
+			regulator-compatible = "vmmc";
+		};
+	};
+};
-- 
1.7.9.5

^ permalink raw reply related	[flat|nested] 16+ messages in thread

* [PATCH v2 2/4] ARM: OMAP2+: AM33XX: Add tps65217 device tree data
  2012-07-24  6:18 [PATCH v2 0/4] Add AM33XX regulators device tree data AnilKumar Ch
  2012-07-24  6:18 ` [PATCH v2 1/4] ARM: OMAP2+: AM33XX: Add tps65910 " AnilKumar Ch
@ 2012-07-24  6:18 ` AnilKumar Ch
  2012-07-24  6:18 ` [PATCH v2 3/4] arm/dts: Add tps65910 regulator DT data to am335x-evm.dts AnilKumar Ch
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 16+ messages in thread
From: AnilKumar Ch @ 2012-07-24  6:18 UTC (permalink / raw)
  To: linux-arm-kernel

Add device tree data for tps65217 regulator by adding all tps65217
regulator nodes. Regulator is initialized based on compatible name
provided in tps65217 DT file.

All tps65217 PMIC regulator device tree nodes are placed in a
separate device tree include file (tps65217.dtsi). This patch
was tested on AM335x-Bone.

Signed-off-by: AnilKumar Ch <anilkumar@ti.com>
---
 arch/arm/boot/dts/tps65217.dtsi |   56 +++++++++++++++++++++++++++++++++++++++
 1 file changed, 56 insertions(+)
 create mode 100644 arch/arm/boot/dts/tps65217.dtsi

diff --git a/arch/arm/boot/dts/tps65217.dtsi b/arch/arm/boot/dts/tps65217.dtsi
new file mode 100644
index 0000000..a632724
--- /dev/null
+++ b/arch/arm/boot/dts/tps65217.dtsi
@@ -0,0 +1,56 @@
+/*
+ * Copyright (C) 2012 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/tps65217.pdf
+ */
+
+&tps {
+	compatible = "ti,tps65217";
+
+	regulators {
+		#address-cells = <1>;
+		#size-cells = <0>;
+
+		dcdc1_reg: regulator at 0 {
+			reg = <0>;
+			regulator-compatible = "dcdc1";
+		};
+
+		dcdc2_reg: regulator at 1 {
+			reg = <1>;
+			regulator-compatible = "dcdc2";
+		};
+
+		dcdc3_reg: regulator at 2 {
+			reg = <2>;
+			regulator-compatible = "dcdc3";
+		};
+
+		ldo1_reg: regulator at 3 {
+			reg = <3>;
+			regulator-compatible = "ldo1";
+		};
+
+		ldo2_reg: regulator at 4 {
+			reg = <4>;
+			regulator-compatible = "ldo2";
+		};
+
+		ldo3_reg: regulator at 5 {
+			reg = <5>;
+			regulator-compatible = "ldo3";
+		};
+
+		ldo4_reg: regulator at 6 {
+			reg = <6>;
+			regulator-compatible = "ldo4";
+		};
+	};
+};
-- 
1.7.9.5

^ permalink raw reply related	[flat|nested] 16+ messages in thread

* [PATCH v2 3/4] arm/dts: Add tps65910 regulator DT data to am335x-evm.dts
  2012-07-24  6:18 [PATCH v2 0/4] Add AM33XX regulators device tree data AnilKumar Ch
  2012-07-24  6:18 ` [PATCH v2 1/4] ARM: OMAP2+: AM33XX: Add tps65910 " AnilKumar Ch
  2012-07-24  6:18 ` [PATCH v2 2/4] ARM: OMAP2+: AM33XX: Add tps65217 " AnilKumar Ch
@ 2012-07-24  6:18 ` AnilKumar Ch
  2012-08-14 14:25   ` AnilKumar, Chimata
  2012-07-24  6:18 ` [PATCH v2 4/4] arm/dts: Add tps65217 regulator DT data to am335x-bone.dts AnilKumar Ch
  2012-08-14 14:25 ` [PATCH v2 0/4] Add AM33XX regulators device tree data AnilKumar, Chimata
  4 siblings, 1 reply; 16+ messages in thread
From: AnilKumar Ch @ 2012-07-24  6:18 UTC (permalink / raw)
  To: linux-arm-kernel

Add tps65910 regulator device tree data to AM335x-EVM by adding
regulator consumers with tightened constraints and regulator-name.
TPS65910 regulator handle can be obtained by using this regulator
name.

This patch also add I2C node with I2C frequency and tps65910 PMIC
I2C slave address.

Signed-off-by: AnilKumar Ch <anilkumar@ti.com>
---
 arch/arm/boot/dts/am335x-evm.dts |   28 ++++++++++++++++++++++++++++
 1 file changed, 28 insertions(+)

diff --git a/arch/arm/boot/dts/am335x-evm.dts b/arch/arm/boot/dts/am335x-evm.dts
index d6a97d9..e4e1ccb 100644
--- a/arch/arm/boot/dts/am335x-evm.dts
+++ b/arch/arm/boot/dts/am335x-evm.dts
@@ -18,3 +18,31 @@
 		reg = <0x80000000 0x10000000>; /* 256 MB */
 	};
 };
+
+&i2c1 {
+	clock-frequency = <400000>;
+
+	tps: tps at 2D {
+		reg = <0x2D>;
+	};
+};
+
+/include/ "tps65910.dtsi"
+
+&vdd1_reg {
+	/* VDD_MPU voltage limits 0.95V - 1.26V with +/-4% tolerance */
+	regulator-name = "vdd_mpu";
+	regulator-min-microvolt = <912500>;
+	regulator-max-microvolt = <1312500>;
+	regulator-boot-on;
+	regulator-always-on;
+};
+
+&vdd2_reg {
+	/* VDD_CORE voltage limits 0.95V - 1.1V with +/-4% tolerance */
+	regulator-name = "vdd_core";
+	regulator-min-microvolt = <912500>;
+	regulator-max-microvolt = <1150000>;
+	regulator-boot-on;
+	regulator-always-on;
+};
-- 
1.7.9.5

^ permalink raw reply related	[flat|nested] 16+ messages in thread

* [PATCH v2 4/4] arm/dts: Add tps65217 regulator DT data to am335x-bone.dts
  2012-07-24  6:18 [PATCH v2 0/4] Add AM33XX regulators device tree data AnilKumar Ch
                   ` (2 preceding siblings ...)
  2012-07-24  6:18 ` [PATCH v2 3/4] arm/dts: Add tps65910 regulator DT data to am335x-evm.dts AnilKumar Ch
@ 2012-07-24  6:18 ` AnilKumar Ch
  2012-08-14 14:25 ` [PATCH v2 0/4] Add AM33XX regulators device tree data AnilKumar, Chimata
  4 siblings, 0 replies; 16+ messages in thread
From: AnilKumar Ch @ 2012-07-24  6:18 UTC (permalink / raw)
  To: linux-arm-kernel

Add tps65217 regulator device tree data to AM335x-Bone by adding
regulator consumers with tightened constraints and regulator-name.
TPS65217 regulator handle can be obtained by using this regulator
name.

This patch also add I2C node with I2C frequency and tps65217 PMIC
I2C slave address.

Signed-off-by: AnilKumar Ch <anilkumar@ti.com>
---
 arch/arm/boot/dts/am335x-bone.dts |   28 ++++++++++++++++++++++++++++
 1 file changed, 28 insertions(+)

diff --git a/arch/arm/boot/dts/am335x-bone.dts b/arch/arm/boot/dts/am335x-bone.dts
index a9af4db..8fdf43a 100644
--- a/arch/arm/boot/dts/am335x-bone.dts
+++ b/arch/arm/boot/dts/am335x-bone.dts
@@ -18,3 +18,31 @@
 		reg = <0x80000000 0x10000000>; /* 256 MB */
 	};
 };
+
+&i2c1 {
+	clock-frequency = <400000>;
+
+	tps: tps at 24 {
+		reg = <0x24>;
+	};
+};
+
+/include/ "tps65217.dtsi"
+
+&dcdc2_reg {
+	/* VDD_MPU voltage limits 0.95V - 1.26V with +/-4% tolerance */
+	regulator-name = "vdd_mpu";
+	regulator-min-microvolt = <925000>;
+	regulator-max-microvolt = <1325000>;
+	regulator-boot-on;
+	regulator-always-on;
+};
+
+&dcdc3_reg {
+	/* VDD_CORE voltage limits 0.95V - 1.1V with +/-4% tolerance */
+	regulator-name = "vdd_core";
+	regulator-min-microvolt = <925000>;
+	regulator-max-microvolt = <1150000>;
+	regulator-boot-on;
+	regulator-always-on;
+};
-- 
1.7.9.5

^ permalink raw reply related	[flat|nested] 16+ messages in thread

* [PATCH v2 0/4] Add AM33XX regulators device tree data
  2012-07-24  6:18 [PATCH v2 0/4] Add AM33XX regulators device tree data AnilKumar Ch
                   ` (3 preceding siblings ...)
  2012-07-24  6:18 ` [PATCH v2 4/4] arm/dts: Add tps65217 regulator DT data to am335x-bone.dts AnilKumar Ch
@ 2012-08-14 14:25 ` AnilKumar, Chimata
  4 siblings, 0 replies; 16+ messages in thread
From: AnilKumar, Chimata @ 2012-08-14 14:25 UTC (permalink / raw)
  To: linux-arm-kernel

Hi Mark,

On Tue, Jul 24, 2012 at 11:48:51, AnilKumar, Chimata wrote:
> This patch series add AM33XX regulators (tps65910/tps65217) device
> tree data to am335x-evm and am335x-bone dts files. These patches
> are based on Tony L "devel-dt" tree and tested on AM335x EVM and
> Bone devices.
> 
> Changes from v1:
> 	- Incorporated all Mark Brown's review comments on v1 by
> 	  * moving all the regulator constraints to corresponding
> 	    DTS file
> 	  * Regulator constraints are added according to board.
> 	- regulator name is added.
> 
> AnilKumar Ch (4):
>   ARM: OMAP2+: AM33XX: Add tps65910 device tree data
>   ARM: OMAP2+: AM33XX: Add tps65217 device tree data
>   arm/dts: Add tps65910 regulator DT data to am335x-evm.dts
>   arm/dts: Add tps65217 regulator DT data to am335x-bone.dts
> 
>  arch/arm/boot/dts/am335x-bone.dts |   28 ++++++++++++
>  arch/arm/boot/dts/am335x-evm.dts  |   28 ++++++++++++
>  arch/arm/boot/dts/tps65217.dtsi   |   56 ++++++++++++++++++++++++
>  arch/arm/boot/dts/tps65910.dtsi   |   86 +++++++++++++++++++++++++++++++++++++
>  4 files changed, 198 insertions(+)
>  create mode 100644 arch/arm/boot/dts/tps65217.dtsi
>  create mode 100644 arch/arm/boot/dts/tps65910.dtsi
> 
> -- 
> 1.7.9.5

With the recent changes in the regulator core driver which disables all
the regulators if always-on flag is not present. So I have to update
these patch to add all the regulator nodes with always-on flag.

I will submit the updated version of patch series.

Regards
AnilKumar

^ permalink raw reply	[flat|nested] 16+ messages in thread

* [PATCH v2 3/4] arm/dts: Add tps65910 regulator DT data to am335x-evm.dts
  2012-07-24  6:18 ` [PATCH v2 3/4] arm/dts: Add tps65910 regulator DT data to am335x-evm.dts AnilKumar Ch
@ 2012-08-14 14:25   ` AnilKumar, Chimata
  2012-08-15 12:53     ` Mark Brown
  0 siblings, 1 reply; 16+ messages in thread
From: AnilKumar, Chimata @ 2012-08-14 14:25 UTC (permalink / raw)
  To: linux-arm-kernel

Hi Mark,

On Tue, Jul 24, 2012 at 11:48:54, AnilKumar, Chimata wrote:
> Add tps65910 regulator device tree data to AM335x-EVM by adding
> regulator consumers with tightened constraints and regulator-name.
> TPS65910 regulator handle can be obtained by using this regulator
> name.
> 
> This patch also add I2C node with I2C frequency and tps65910 PMIC
> I2C slave address.
> 
> Signed-off-by: AnilKumar Ch <anilkumar@ti.com>
> ---
>  arch/arm/boot/dts/am335x-evm.dts |   28 ++++++++++++++++++++++++++++
>  1 file changed, 28 insertions(+)
> 
> diff --git a/arch/arm/boot/dts/am335x-evm.dts b/arch/arm/boot/dts/am335x-evm.dts
> index d6a97d9..e4e1ccb 100644
> --- a/arch/arm/boot/dts/am335x-evm.dts
> +++ b/arch/arm/boot/dts/am335x-evm.dts
> @@ -18,3 +18,31 @@
>  		reg = <0x80000000 0x10000000>; /* 256 MB */
>  	};
>  };
> +
> +&i2c1 {
> +	clock-frequency = <400000>;
> +
> +	tps: tps at 2D {
> +		reg = <0x2D>;
> +	};
> +};
> +
> +/include/ "tps65910.dtsi"
> +
> +&vdd1_reg {
> +	/* VDD_MPU voltage limits 0.95V - 1.26V with +/-4% tolerance */
> +	regulator-name = "vdd_mpu";
> +	regulator-min-microvolt = <912500>;
> +	regulator-max-microvolt = <1312500>;
> +	regulator-boot-on;
> +	regulator-always-on;
> +};

I want to understand how to add parent regulator nodes? Like input-supply
node to regulators.

With "regulator: tps65910: add support for input supply" patch, regulator
registration fails if we are not providing the input_supply node with
proper input supply name.

AM335x EVM have one dedicated input supply which provide supplies to all
the PMIC regulators. According to tps65910 "VDD1 regulator" input supply
is from vcc1 so we have to create a dummy/parent/some node to handle this.
Example below has the details.

In am335x-evm.dts file

vcc1_supply: fixedregulator at 0 {
                compatible = "regulator-fixed";
                regulator-name = "vcc1";
                regulator-boot-on;
};

/include/ "tps65910.dtsi"

&tps {
	regulators {
		vcc1-supply = <&vcc1_supply>;
		...
	};
};

Similarly we have to add 7 more fixed regulators entries to provide input
supply to different PMIC regulators.

Am I doing correct thing? Or is there any better way to handle this?

Regards
AnilKumar

^ permalink raw reply	[flat|nested] 16+ messages in thread

* [PATCH v2 3/4] arm/dts: Add tps65910 regulator DT data to am335x-evm.dts
  2012-08-14 14:25   ` AnilKumar, Chimata
@ 2012-08-15 12:53     ` Mark Brown
  2012-08-15 16:47       ` AnilKumar, Chimata
  0 siblings, 1 reply; 16+ messages in thread
From: Mark Brown @ 2012-08-15 12:53 UTC (permalink / raw)
  To: linux-arm-kernel

On Tue, Aug 14, 2012 at 02:25:18PM +0000, AnilKumar, Chimata wrote:

> AM335x EVM have one dedicated input supply which provide supplies to all
> the PMIC regulators. According to tps65910 "VDD1 regulator" input supply
> is from vcc1 so we have to create a dummy/parent/some node to handle this.
> Example below has the details.

Your device tree should accurately reflect the hardware.

> Similarly we have to add 7 more fixed regulators entries to provide input
> supply to different PMIC regulators.

If you have all these unrelated supplies in the system then your device
tree should accurately reflect that.  However this would be a very
unusual hardware design.  Usually there would be a very small set of
system supply rails, frequently only one.

^ permalink raw reply	[flat|nested] 16+ messages in thread

* [PATCH v2 3/4] arm/dts: Add tps65910 regulator DT data to am335x-evm.dts
  2012-08-15 12:53     ` Mark Brown
@ 2012-08-15 16:47       ` AnilKumar, Chimata
  2012-08-15 16:54         ` Mark Brown
  0 siblings, 1 reply; 16+ messages in thread
From: AnilKumar, Chimata @ 2012-08-15 16:47 UTC (permalink / raw)
  To: linux-arm-kernel

Hi Mark,

On Wed, Aug 15, 2012 at 18:23:39, Mark Brown wrote:
> On Tue, Aug 14, 2012 at 02:25:18PM +0000, AnilKumar, Chimata wrote:
> 
> > AM335x EVM have one dedicated input supply which provide supplies to all
> > the PMIC regulators. According to tps65910 "VDD1 regulator" input supply
> > is from vcc1 so we have to create a dummy/parent/some node to handle this.
> > Example below has the details.
> 
> Your device tree should accurately reflect the hardware.
> 
> > Similarly we have to add 7 more fixed regulators entries to provide input
> > supply to different PMIC regulators.
> 
> If you have all these unrelated supplies in the system then your device
> tree should accurately reflect that.  However this would be a very

In that case I have to add all these fixed regulators.

> unusual hardware design.  Usually there would be a very small set of
> system supply rails, frequently only one.

In case of AM335X-EVM one dedicated supply (5v) feeding to all the input
supplies (vcc1-7 and vccio) of the regulators.

tps65910 PMIC have vcc1-7 and vccio input supplies which are feeding to
all the regulators. (like one - one and one - many).

Tps65910 regulator drivers registration fails if we not providing the
correct input supply with supply name. One option I can see is that
fixed voltage regulators. If we do this then total 21 (8 input supply
fixed regulators and others are out regulators) are present in the system.

If this is the correct approach then I will submit next version of patch.

Thanks
AnilKumar

^ permalink raw reply	[flat|nested] 16+ messages in thread

* [PATCH v2 3/4] arm/dts: Add tps65910 regulator DT data to am335x-evm.dts
  2012-08-15 16:47       ` AnilKumar, Chimata
@ 2012-08-15 16:54         ` Mark Brown
  2012-08-16 13:22           ` AnilKumar, Chimata
  2012-08-16 13:25           ` AnilKumar, Chimata
  0 siblings, 2 replies; 16+ messages in thread
From: Mark Brown @ 2012-08-15 16:54 UTC (permalink / raw)
  To: linux-arm-kernel

On Wed, Aug 15, 2012 at 04:47:02PM +0000, AnilKumar, Chimata wrote:
> On Wed, Aug 15, 2012 at 18:23:39, Mark Brown wrote:

> > If you have all these unrelated supplies in the system then your device
> > tree should accurately reflect that.  However this would be a very

> In that case I have to add all these fixed regulators.

Why?  You then immediately go on to say...

> > unusual hardware design.  Usually there would be a very small set of
> > system supply rails, frequently only one.

> In case of AM335X-EVM one dedicated supply (5v) feeding to all the input
> supplies (vcc1-7 and vccio) of the regulators.

...that they all map onto the same physical supply?

^ permalink raw reply	[flat|nested] 16+ messages in thread

* [PATCH v2 3/4] arm/dts: Add tps65910 regulator DT data to am335x-evm.dts
  2012-08-15 16:54         ` Mark Brown
@ 2012-08-16 13:22           ` AnilKumar, Chimata
  2012-08-16 14:00             ` Mark Brown
  2012-08-16 13:25           ` AnilKumar, Chimata
  1 sibling, 1 reply; 16+ messages in thread
From: AnilKumar, Chimata @ 2012-08-16 13:22 UTC (permalink / raw)
  To: linux-arm-kernel

Mark,

On Wed, Aug 15, 2012 at 22:24:32, Mark Brown wrote:
> On Wed, Aug 15, 2012 at 04:47:02PM +0000, AnilKumar, Chimata wrote:
> > On Wed, Aug 15, 2012 at 18:23:39, Mark Brown wrote:
> 
> > > If you have all these unrelated supplies in the system then your device
> > > tree should accurately reflect that.  However this would be a very
> 
> > In that case I have to add all these fixed regulators.
> 
> Why?  You then immediately go on to say...

Because all the nodes/regulators should be provided/registered otherwise
"regulator_dev_lookup" returns NULL if there are no regulator matches with
the supply_name.

I have gone through this thread
http://patchwork.ozlabs.org/patch/166682/

But problem here is single input supply battery/main is not sufficient.

pmic->desc[i].supply_name = info->vin_name;
with this assignment regulator core searches for exact supply name vcc1 or
vcc2 etc if there are no matches then it will not register any regulators. 

> 
> > > unusual hardware design.  Usually there would be a very small set of
> > > system supply rails, frequently only one.
> 
> > In case of AM335X-EVM one dedicated supply (5v) feeding to all the input
> > supplies (vcc1-7 and vccio) of the regulators.
> 
> ...that they all map onto the same physical supply?
> 

Yes single physical supply, if we want to add single fixed regulator node
to feed all the regulators then driver have to modify to support this.
Similar to revert of "regulator: tps65910: add support for input supply"
Patch.

Thanks
AnilKumar

^ permalink raw reply	[flat|nested] 16+ messages in thread

* [PATCH v2 3/4] arm/dts: Add tps65910 regulator DT data to am335x-evm.dts
  2012-08-15 16:54         ` Mark Brown
  2012-08-16 13:22           ` AnilKumar, Chimata
@ 2012-08-16 13:25           ` AnilKumar, Chimata
  1 sibling, 0 replies; 16+ messages in thread
From: AnilKumar, Chimata @ 2012-08-16 13:25 UTC (permalink / raw)
  To: linux-arm-kernel

Mark,

Small correction

On Thu, Aug 16, 2012 at 18:52:25, AnilKumar, Chimata wrote:
> Mark,
> 
> On Wed, Aug 15, 2012 at 22:24:32, Mark Brown wrote:
> > On Wed, Aug 15, 2012 at 04:47:02PM +0000, AnilKumar, Chimata wrote:
> > > On Wed, Aug 15, 2012 at 18:23:39, Mark Brown wrote:
> > 
> > > > If you have all these unrelated supplies in the system then your device
> > > > tree should accurately reflect that.  However this would be a very
> > 
> > > In that case I have to add all these fixed regulators.
> > 
> > Why?  You then immediately go on to say...
> 
> Because all the nodes/regulators should be provided/registered otherwise
> "regulator_dev_lookup" returns NULL if there are no regulator matches with
> the supply_name.
> 
> I have gone through this thread
> http://patchwork.ozlabs.org/patch/166682/
> 
> But problem here is single input supply battery/main is not sufficient.
> 
> pmic->desc[i].supply_name = info->vin_name;
> with this assignment regulator core searches for exact supply name vcc1 or
> vcc2 etc if there are no matches then it will not register any regulators. 
> 
> > 
> > > > unusual hardware design.  Usually there would be a very small set of
> > > > system supply rails, frequently only one.
> > 
> > > In case of AM335X-EVM one dedicated supply (5v) feeding to all the input
> > > supplies (vcc1-7 and vccio) of the regulators.
> > 
> > ...that they all map onto the same physical supply?
> > 
> 
> Yes single physical supply, if we want to add single fixed regulator node
> to feed all the regulators then driver have to modify to support this.
> Similar to revert of "regulator: tps65910: add support for input supply"
                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Copy/paste error

Similar to revert of this patch "regulator: tps65910: set input_supply on
desc unconditionally"

Thanks
AnilKumar

^ permalink raw reply	[flat|nested] 16+ messages in thread

* [PATCH v2 3/4] arm/dts: Add tps65910 regulator DT data to am335x-evm.dts
  2012-08-16 13:22           ` AnilKumar, Chimata
@ 2012-08-16 14:00             ` Mark Brown
  2012-08-20  6:27               ` AnilKumar, Chimata
  0 siblings, 1 reply; 16+ messages in thread
From: Mark Brown @ 2012-08-16 14:00 UTC (permalink / raw)
  To: linux-arm-kernel

On Thu, Aug 16, 2012 at 01:22:27PM +0000, AnilKumar, Chimata wrote:

> But problem here is single input supply battery/main is not sufficient.

What makes you say this?

> pmic->desc[i].supply_name = info->vin_name;
> with this assignment regulator core searches for exact supply name vcc1 or
> vcc2 etc if there are no matches then it will not register any regulators. 

Why does this mean you need multiple regulators?  A single regulator can
of course supply multiple devices.

^ permalink raw reply	[flat|nested] 16+ messages in thread

* [PATCH v2 3/4] arm/dts: Add tps65910 regulator DT data to am335x-evm.dts
  2012-08-16 14:00             ` Mark Brown
@ 2012-08-20  6:27               ` AnilKumar, Chimata
  2012-08-20 20:07                 ` Mark Brown
  0 siblings, 1 reply; 16+ messages in thread
From: AnilKumar, Chimata @ 2012-08-20  6:27 UTC (permalink / raw)
  To: linux-arm-kernel

Hi Mark,

On Thu, Aug 16, 2012 at 19:30:56, Mark Brown wrote:
> On Thu, Aug 16, 2012 at 01:22:27PM +0000, AnilKumar, Chimata wrote:
> 
> > But problem here is single input supply battery/main is not sufficient.
> 
> What makes you say this?
> 
> > pmic->desc[i].supply_name = info->vin_name;
> > with this assignment regulator core searches for exact supply name vcc1 or
> > vcc2 etc if there are no matches then it will not register any regulators. 
> 
> Why does this mean you need multiple regulators?  A single regulator can
> of course supply multiple devices.

I got your point but tps65910 driver is failing if we add single fixed
regulator. Solution is driver needs to change or add multiple fixed
regulators.

Let's take this example

ocp {
        vcc5v_supply: fixedregulator at 0 {
                compatible = "regulator-fixed";
                regulator-name = "vcc5v";
                regulator-boot-on;
        };
};

/include/ "tps65910.dtsi"

&tps {
        regulators {
                vcc1-supply = <&vcc5v_supply>;
                vcc2-supply = <&vcc5v_supply>;
                vcc3-supply = <&vcc5v_supply>;
                vcc4-supply = <&vcc5v_supply>;
                vcc5-supply = <&vcc5v_supply>;
                vcc6-supply = <&vcc5v_supply>;
                vcc7-supply = <&vcc5v_supply>;
                vccio-supply = <&vcc5v_supply>;

                vrtc_reg: regulator at 0 { /* vrtc input is vcc7 */
                        regulator-always-on;
                };

                ... 
                ...
        };
};

These changes are added to am335x-evm.dts file after this change I
am seeing below error.

vrtc:
tps65910 0-002d: Failed to find supply vcc7
tps65910 0-002d: failed to register tps65910-pmic regulator

To get rid of this error we have to change the driver like this

if (info->vin_name) {
         snprintf(in_supply, 32, "%s-supply", info->vin_name);
         if (of_find_property(np, in_supply, 0))
                  pmic_plat_data->input_supply[idx] = info->vin_name;
}

And

pmic->desc[i].supply_name = pmic_plat_data->input_supply[i];

Regards
AnilKumar

^ permalink raw reply	[flat|nested] 16+ messages in thread

* [PATCH v2 3/4] arm/dts: Add tps65910 regulator DT data to am335x-evm.dts
  2012-08-20  6:27               ` AnilKumar, Chimata
@ 2012-08-20 20:07                 ` Mark Brown
  2012-08-21 10:57                   ` AnilKumar, Chimata
  0 siblings, 1 reply; 16+ messages in thread
From: Mark Brown @ 2012-08-20 20:07 UTC (permalink / raw)
  To: linux-arm-kernel

On Mon, Aug 20, 2012 at 06:27:01AM +0000, AnilKumar, Chimata wrote:
> On Thu, Aug 16, 2012 at 19:30:56, Mark Brown wrote:

> > Why does this mean you need multiple regulators?  A single regulator can
> > of course supply multiple devices.

> I got your point but tps65910 driver is failing if we add single fixed
> regulator. Solution is driver needs to change or add multiple fixed
> regulators.

No, really.  One regulator can supply many things, not being a.

> vrtc:
> tps65910 0-002d: Failed to find supply vcc7
> tps65910 0-002d: failed to register tps65910-pmic regulator

So you've specified a whole bunch of supplies and this one individual
supply is not matching (and it's not the first...).  You should
investigate what's gone wrong there rather than bodging around the
problem.  I can't immediately say anything much based on the information
you've given.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20120820/4e98778b/attachment.sig>

^ permalink raw reply	[flat|nested] 16+ messages in thread

* [PATCH v2 3/4] arm/dts: Add tps65910 regulator DT data to am335x-evm.dts
  2012-08-20 20:07                 ` Mark Brown
@ 2012-08-21 10:57                   ` AnilKumar, Chimata
  0 siblings, 0 replies; 16+ messages in thread
From: AnilKumar, Chimata @ 2012-08-21 10:57 UTC (permalink / raw)
  To: linux-arm-kernel

Hi Mark,

On Tue, Aug 21, 2012 at 01:37:15, Mark Brown wrote:
> On Mon, Aug 20, 2012 at 06:27:01AM +0000, AnilKumar, Chimata wrote:
> > On Thu, Aug 16, 2012 at 19:30:56, Mark Brown wrote:
> 
> > > Why does this mean you need multiple regulators?  A single regulator can
> > > of course supply multiple devices.
> 
> > I got your point but tps65910 driver is failing if we add single fixed
> > regulator. Solution is driver needs to change or add multiple fixed
> > regulators.
> 
> No, really.  One regulator can supply many things, not being a.
> 
> > vrtc:
> > tps65910 0-002d: Failed to find supply vcc7
> > tps65910 0-002d: failed to register tps65910-pmic regulator
> 
> So you've specified a whole bunch of supplies and this one individual
> supply is not matching (and it's not the first...).  You should
> investigate what's gone wrong there rather than bodging around the
> problem.  I can't immediately say anything much based on the information
> you've given.
> 

Sorry for the noise in this issue, I found the root cause. I
was defining the supply names like this which is wrong.

&tps {
        regulators {
                vcc1-supply = <&vcc5v_supply>;
                vcc2-supply = <&vcc5v_supply>;
                vcc3-supply = <&vcc5v_supply>;
                vcc4-supply = <&vcc5v_supply>;
                vcc5-supply = <&vcc5v_supply>;
                vcc6-supply = <&vcc5v_supply>;
                vcc7-supply = <&vcc5v_supply>;
                vccio-supply = <&vcc5v_supply>;

                vrtc_reg: regulator at 0 { /* vrtc input is vcc7 */
                        regulator-always-on;
                };

                ... 
                ...
        };
};

This was suppose to be

&tps {
        vcc1-supply = <&vcc5v_supply>;
        vcc2-supply = <&vcc5v_supply>;
        vcc3-supply = <&vcc5v_supply>;
        vcc4-supply = <&vcc5v_supply>;
        vcc5-supply = <&vcc5v_supply>;
        vcc6-supply = <&vcc5v_supply>;
        vcc7-supply = <&vcc5v_supply>;
        vccio-supply = <&vcc5v_supply>;

        regulators {

                vrtc_reg: regulator at 0 { /* vrtc input is vcc7 */
                        regulator-always-on;
                };

                ... 
                ...
        };
};

Thanks for your continuous feedback.

Thanks
AnilKumar

^ permalink raw reply	[flat|nested] 16+ messages in thread

end of thread, other threads:[~2012-08-21 10:57 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-07-24  6:18 [PATCH v2 0/4] Add AM33XX regulators device tree data AnilKumar Ch
2012-07-24  6:18 ` [PATCH v2 1/4] ARM: OMAP2+: AM33XX: Add tps65910 " AnilKumar Ch
2012-07-24  6:18 ` [PATCH v2 2/4] ARM: OMAP2+: AM33XX: Add tps65217 " AnilKumar Ch
2012-07-24  6:18 ` [PATCH v2 3/4] arm/dts: Add tps65910 regulator DT data to am335x-evm.dts AnilKumar Ch
2012-08-14 14:25   ` AnilKumar, Chimata
2012-08-15 12:53     ` Mark Brown
2012-08-15 16:47       ` AnilKumar, Chimata
2012-08-15 16:54         ` Mark Brown
2012-08-16 13:22           ` AnilKumar, Chimata
2012-08-16 14:00             ` Mark Brown
2012-08-20  6:27               ` AnilKumar, Chimata
2012-08-20 20:07                 ` Mark Brown
2012-08-21 10:57                   ` AnilKumar, Chimata
2012-08-16 13:25           ` AnilKumar, Chimata
2012-07-24  6:18 ` [PATCH v2 4/4] arm/dts: Add tps65217 regulator DT data to am335x-bone.dts AnilKumar Ch
2012-08-14 14:25 ` [PATCH v2 0/4] Add AM33XX regulators device tree data AnilKumar, Chimata

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).