linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v3 0/4] Add AM33XX regulators device tree data
@ 2012-08-21 11:17 AnilKumar Ch
  2012-08-21 11:17 ` [PATCH v3 1/4] arm/dts: regulator: Add tps65910 " AnilKumar Ch
                   ` (4 more replies)
  0 siblings, 5 replies; 25+ messages in thread
From: AnilKumar Ch @ 2012-08-21 11:17 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 with these patches
http://www.mail-archive.com/linux-omap at vger.kernel.org/msg73843.html
and these patches has been tested on AM335x EVM and Bone devices.

Changes from v2:
	- Added remaining regulator nodes with always on flag.
	  With out this flag regulator core calls for disable
	  regulators after init, which make device hang.
	- Modified tps65910 DTS entires with respect to tps65910
	  input supply.

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/dts: regulator: Add tps65910 device tree data
  arm/dts: regulator: 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 |   54 +++++++++++++++++++++
 arch/arm/boot/dts/am335x-evm.dts  |   94 +++++++++++++++++++++++++++++++++++++
 arch/arm/boot/dts/tps65217.dtsi   |   56 ++++++++++++++++++++++
 arch/arm/boot/dts/tps65910.dtsi   |   86 +++++++++++++++++++++++++++++++++
 4 files changed, 290 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] 25+ messages in thread

* [PATCH v3 1/4] arm/dts: regulator: Add tps65910 device tree data
  2012-08-21 11:17 [PATCH v3 0/4] Add AM33XX regulators device tree data AnilKumar Ch
@ 2012-08-21 11:17 ` AnilKumar Ch
  2012-08-21 15:48   ` Stephen Warren
  2012-08-21 11:17 ` [PATCH v3 2/4] arm/dts: regulator: Add tps65217 " AnilKumar Ch
                   ` (3 subsequent siblings)
  4 siblings, 1 reply; 25+ messages in thread
From: AnilKumar Ch @ 2012-08-21 11:17 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 compatiable
name provided in tps65910 DT file.

All tps65910 PMIC regulator device tree nodes are placed in a
seperate 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] 25+ messages in thread

* [PATCH v3 2/4] arm/dts: regulator: Add tps65217 device tree data
  2012-08-21 11:17 [PATCH v3 0/4] Add AM33XX regulators device tree data AnilKumar Ch
  2012-08-21 11:17 ` [PATCH v3 1/4] arm/dts: regulator: Add tps65910 " AnilKumar Ch
@ 2012-08-21 11:17 ` AnilKumar Ch
  2012-08-21 11:17 ` [PATCH v3 3/4] arm/dts: Add tps65910 regulator DT data to am335x-evm.dts AnilKumar Ch
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 25+ messages in thread
From: AnilKumar Ch @ 2012-08-21 11:17 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 compatiable
name provided in tps65217 DT file.

All tps65910 PMIC regulator device tree nodes are placed in a
seperate 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] 25+ messages in thread

* [PATCH v3 3/4] arm/dts: Add tps65910 regulator DT data to am335x-evm.dts
  2012-08-21 11:17 [PATCH v3 0/4] Add AM33XX regulators device tree data AnilKumar Ch
  2012-08-21 11:17 ` [PATCH v3 1/4] arm/dts: regulator: Add tps65910 " AnilKumar Ch
  2012-08-21 11:17 ` [PATCH v3 2/4] arm/dts: regulator: Add tps65217 " AnilKumar Ch
@ 2012-08-21 11:17 ` AnilKumar Ch
  2012-08-21 11:17 ` [PATCH v3 4/4] arm/dts: Add tps65217 regulator DT data to am335x-bone.dts AnilKumar Ch
  2012-08-21 13:57 ` [PATCH v3 0/4] Add AM33XX regulators device tree data Mark Brown
  4 siblings, 0 replies; 25+ messages in thread
From: AnilKumar Ch @ 2012-08-21 11:17 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 |   94 ++++++++++++++++++++++++++++++++++++++
 1 file changed, 94 insertions(+)

diff --git a/arch/arm/boot/dts/am335x-evm.dts b/arch/arm/boot/dts/am335x-evm.dts
index 1e1fc15..f9c28a5 100644
--- a/arch/arm/boot/dts/am335x-evm.dts
+++ b/arch/arm/boot/dts/am335x-evm.dts
@@ -38,5 +38,99 @@
 		dcan1: d_can at 481D0000 {
 			status = "okay";
 		};
+
+		i2c1: i2c at 44E0B000 {
+			status = "okay";
+			clock-frequency = <400000>;
+
+			tps: tps at 2D {
+				reg = <0x2D>;
+			};
+		};
+	};
+
+	vbat: fixedregulator at 0 {
+		compatible = "regulator-fixed";
+		regulator-name = "vbat";
+		regulator-min-microvolt = <5000000>;
+		regulator-max-microvolt = <5000000>;
+		regulator-boot-on;
+	};
+};
+
+/include/ "tps65910.dtsi"
+
+&tps {
+	vcc1-supply = <&vbat>;
+	vcc2-supply = <&vbat>;
+	vcc3-supply = <&vbat>;
+	vcc4-supply = <&vbat>;
+	vcc5-supply = <&vbat>;
+	vcc6-supply = <&vbat>;
+	vcc7-supply = <&vbat>;
+	vccio-supply = <&vbat>;
+
+	regulators {
+		vrtc_reg: regulator at 0 {
+			regulator-always-on;
+		};
+
+		vio_reg: regulator at 1 {
+			regulator-always-on;
+		};
+
+		vdd1_reg: regulator at 2 {
+			/* 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: regulator at 3 {
+			/* 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;
+		};
+
+		vdd3_reg: regulator at 4 {
+			regulator-always-on;
+		};
+
+		vdig1_reg: regulator at 5 {
+			regulator-always-on;
+		};
+
+		vdig2_reg: regulator at 6 {
+			regulator-always-on;
+		};
+
+		vpll_reg: regulator at 7 {
+			regulator-always-on;
+		};
+
+		vdac_reg: regulator at 8 {
+			regulator-always-on;
+		};
+
+		vaux1_reg: regulator at 9 {
+			regulator-always-on;
+		};
+
+		vaux2_reg: regulator at 10 {
+			regulator-always-on;
+		};
+
+		vaux33_reg: regulator at 11 {
+			regulator-always-on;
+		};
+
+		vmmc_reg: regulator at 12 {
+			regulator-always-on;
+		};
 	};
 };
-- 
1.7.9.5

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

* [PATCH v3 4/4] arm/dts: Add tps65217 regulator DT data to am335x-bone.dts
  2012-08-21 11:17 [PATCH v3 0/4] Add AM33XX regulators device tree data AnilKumar Ch
                   ` (2 preceding siblings ...)
  2012-08-21 11:17 ` [PATCH v3 3/4] arm/dts: Add tps65910 regulator DT data to am335x-evm.dts AnilKumar Ch
@ 2012-08-21 11:17 ` AnilKumar Ch
  2012-08-23 14:13   ` Koen Kooi
  2012-08-21 13:57 ` [PATCH v3 0/4] Add AM33XX regulators device tree data Mark Brown
  4 siblings, 1 reply; 25+ messages in thread
From: AnilKumar Ch @ 2012-08-21 11:17 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 |   54 +++++++++++++++++++++++++++++++++++++
 1 file changed, 54 insertions(+)

diff --git a/arch/arm/boot/dts/am335x-bone.dts b/arch/arm/boot/dts/am335x-bone.dts
index 58f5042..f1c2772 100644
--- a/arch/arm/boot/dts/am335x-bone.dts
+++ b/arch/arm/boot/dts/am335x-bone.dts
@@ -36,5 +36,59 @@
 		uart1: serial at 44E09000 {
 			status = "okay";
 		};
+
+		i2c1: i2c at 44E0B000 {
+			status = "okay";
+			clock-frequency = <400000>;
+
+			tps: tps at 24 {
+				reg = <0x24>;
+			};
+
+		};
+	};
+};
+
+/include/ "tps65217.dtsi"
+
+&tps {
+	regulators {
+		dcdc1_reg: regulator at 0 {
+			regulator-always-on;
+		};
+
+		dcdc2_reg: regulator at 1 {
+			/* 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: regulator at 2 {
+			/* 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;
+		};
+
+		ldo1_reg: regulator at 3 {
+			regulator-always-on;
+		};
+
+		ldo2_reg: regulator at 4 {
+			regulator-always-on;
+		};
+
+		ldo3_reg: regulator at 5 {
+			regulator-always-on;
+		};
+
+		ldo4_reg: regulator at 6 {
+			regulator-always-on;
+		};
 	};
 };
-- 
1.7.9.5

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

* [PATCH v3 0/4] Add AM33XX regulators device tree data
  2012-08-21 11:17 [PATCH v3 0/4] Add AM33XX regulators device tree data AnilKumar Ch
                   ` (3 preceding siblings ...)
  2012-08-21 11:17 ` [PATCH v3 4/4] arm/dts: Add tps65217 regulator DT data to am335x-bone.dts AnilKumar Ch
@ 2012-08-21 13:57 ` Mark Brown
  2012-08-30 21:01   ` Tony Lindgren
  4 siblings, 1 reply; 25+ messages in thread
From: Mark Brown @ 2012-08-21 13:57 UTC (permalink / raw)
  To: linux-arm-kernel

On Tue, Aug 21, 2012 at 04:47:26PM +0530, AnilKumar Ch 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 with these patches
> http://www.mail-archive.com/linux-omap at vger.kernel.org/msg73843.html
> and these patches has been tested on AM335x EVM and Bone devices.

Reviewed-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
-------------- 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/20120821/b5531c5a/attachment.sig>

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

* [PATCH v3 1/4] arm/dts: regulator: Add tps65910 device tree data
  2012-08-21 11:17 ` [PATCH v3 1/4] arm/dts: regulator: Add tps65910 " AnilKumar Ch
@ 2012-08-21 15:48   ` Stephen Warren
  2012-08-21 16:38     ` Mark Brown
  0 siblings, 1 reply; 25+ messages in thread
From: Stephen Warren @ 2012-08-21 15:48 UTC (permalink / raw)
  To: linux-arm-kernel

On 08/21/2012 05:17 AM, AnilKumar Ch wrote:
> Add device tree data for tps65910 regulator by adding all tps65910
> regulator nodes. Regulator is initialized based on compatiable
> name provided in tps65910 DT file.
> 
> All tps65910 PMIC regulator device tree nodes are placed in a
> seperate device tree include file (tps65910.dtsi). This patch
> was tested on AM335x-EVM.

This .dtsi file adds a node for every single regulator within the
TPS65910, which in turn means that of_regulator_match() will find a node
for every regulator, and in turn every regulator will be registered. On
some boards, not all of those regulators will be used, and hence we
don't want all of them to be registered.

If we backport the /delete-node/ feature I implemented, perhaps we could
solve that; see:

http://comments.gmane.org/gmane.linux.drivers.devicetree/19170

> diff --git a/arch/arm/boot/dts/tps65910.dtsi b/arch/arm/boot/dts/tps65910.dtsi

I wonder if there shouldn't be some better common location for .dtsi
files that are ancilliary chips, rather than ARM-specific?

> +&tps {
> +	compatible = "ti,tps65910";

Perhaps this file should expect some more unique label than just "tps".
Many boards have many power-related chips, all with model names that
start with "tps"; I foresee conflict here.

If dtc allowed /include/ inside a node rather than just at the
top-level, that might solve this. Or, #defines to the board .dts could
define the label name, and the .dtsi reference that label name.

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

* [PATCH v3 1/4] arm/dts: regulator: Add tps65910 device tree data
  2012-08-21 15:48   ` Stephen Warren
@ 2012-08-21 16:38     ` Mark Brown
  2012-08-21 18:05       ` Stephen Warren
  0 siblings, 1 reply; 25+ messages in thread
From: Mark Brown @ 2012-08-21 16:38 UTC (permalink / raw)
  To: linux-arm-kernel

On Tue, Aug 21, 2012 at 09:48:21AM -0600, Stephen Warren wrote:

> This .dtsi file adds a node for every single regulator within the
> TPS65910, which in turn means that of_regulator_match() will find a node
> for every regulator, and in turn every regulator will be registered. On
> some boards, not all of those regulators will be used, and hence we
> don't want all of them to be registered.

This isn't the general view for the regualtor API - we generally want
all regulators to be registered in order to allow us to see what's going
on with things even if we've not figured them out from software.

> If dtc allowed /include/ inside a node rather than just at the
> top-level, that might solve this. Or, #defines to the board .dts could
> define the label name, and the .dtsi reference that label name.

I do constantly wish that more of the people churning out DT stuff would
look at the tooling around it :/
-------------- 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/20120821/9e93ce4f/attachment.sig>

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

* [PATCH v3 1/4] arm/dts: regulator: Add tps65910 device tree data
  2012-08-21 16:38     ` Mark Brown
@ 2012-08-21 18:05       ` Stephen Warren
  2012-08-21 18:08         ` Mark Brown
  0 siblings, 1 reply; 25+ messages in thread
From: Stephen Warren @ 2012-08-21 18:05 UTC (permalink / raw)
  To: linux-arm-kernel

On 08/21/2012 10:38 AM, Mark Brown wrote:
> On Tue, Aug 21, 2012 at 09:48:21AM -0600, Stephen Warren wrote:
> 
>> This .dtsi file adds a node for every single regulator within
>> the TPS65910, which in turn means that of_regulator_match() will
>> find a node for every regulator, and in turn every regulator will
>> be registered. On some boards, not all of those regulators will
>> be used, and hence we don't want all of them to be registered.
> 
> This isn't the general view for the regualtor API - we generally
> want all regulators to be registered in order to allow us to see
> what's going on with things even if we've not figured them out from
> software.

Oh, I said the above specifically because when I added the LDO
configuration for the regulators that weren't used to the Tegra .dts
files, you told me to remove it, based on the comment I put in there
that they weren't used on the board.

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

* [PATCH v3 1/4] arm/dts: regulator: Add tps65910 device tree data
  2012-08-21 18:05       ` Stephen Warren
@ 2012-08-21 18:08         ` Mark Brown
  2012-08-24 20:16           ` Tony Lindgren
  0 siblings, 1 reply; 25+ messages in thread
From: Mark Brown @ 2012-08-21 18:08 UTC (permalink / raw)
  To: linux-arm-kernel

On Tue, Aug 21, 2012 at 12:05:15PM -0600, Stephen Warren wrote:
> On 08/21/2012 10:38 AM, Mark Brown wrote:

> > This isn't the general view for the regualtor API - we generally
> > want all regulators to be registered in order to allow us to see
> > what's going on with things even if we've not figured them out from
> > software.

> Oh, I said the above specifically because when I added the LDO
> configuration for the regulators that weren't used to the Tegra .dts
> files, you told me to remove it, based on the comment I put in there
> that they weren't used on the board.

The board shouldn't have to define the regulators, the regulator driver
really ought to be able to figure out that they're there by itself if
there's no configuration based purely on knowing which chip is there.
>From that point of view it's OK for the chip .dtsi to have them (though
ideally the driver wouldn't *need* that either) which was what was
happening here.
-------------- 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/20120821/76819cec/attachment.sig>

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

* [PATCH v3 4/4] arm/dts: Add tps65217 regulator DT data to am335x-bone.dts
  2012-08-21 11:17 ` [PATCH v3 4/4] arm/dts: Add tps65217 regulator DT data to am335x-bone.dts AnilKumar Ch
@ 2012-08-23 14:13   ` Koen Kooi
  2012-08-24  5:50     ` AnilKumar, Chimata
  0 siblings, 1 reply; 25+ messages in thread
From: Koen Kooi @ 2012-08-23 14:13 UTC (permalink / raw)
  To: linux-arm-kernel


Op 21 aug. 2012, om 13:17 heeft AnilKumar Ch <anilkumar@ti.com> het volgende geschreven:

> 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>

I tried this and the kernel immediately crashes on my beaglebone. Could you upload the complete git tree and .config you used to test this to somewhere public please?

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

* [PATCH v3 4/4] arm/dts: Add tps65217 regulator DT data to am335x-bone.dts
  2012-08-23 14:13   ` Koen Kooi
@ 2012-08-24  5:50     ` AnilKumar, Chimata
  2012-08-24  6:28       ` Koen Kooi
  0 siblings, 1 reply; 25+ messages in thread
From: AnilKumar, Chimata @ 2012-08-24  5:50 UTC (permalink / raw)
  To: linux-arm-kernel

Hi Koen,

On Thu, Aug 23, 2012 at 19:43:48, Koen Kooi wrote:
> 
> Op 21 aug. 2012, om 13:17 heeft AnilKumar Ch <anilkumar@ti.com> het volgende geschreven:
> 
> > 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>
> 
> I tried this and the kernel immediately crashes on my beaglebone. Could you upload the complete git tree and .config you used to test this to somewhere public please?

Use this repo to test on beaglebone
https://github.com/hvaibhav/am335x-linux/commits/am335x-upstream-staging-pinctrl

This wiki talks about how to build and use?
https://github.com/hvaibhav/am335x-linux/wiki/How-To-Use-Upstream-Tree

Note: Enable tps65217 regulator in kernel config.

Regards
AnilKumar

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

* [PATCH v3 4/4] arm/dts: Add tps65217 regulator DT data to am335x-bone.dts
  2012-08-24  5:50     ` AnilKumar, Chimata
@ 2012-08-24  6:28       ` Koen Kooi
  2012-08-24  7:26         ` AnilKumar, Chimata
  0 siblings, 1 reply; 25+ messages in thread
From: Koen Kooi @ 2012-08-24  6:28 UTC (permalink / raw)
  To: linux-arm-kernel


Op 24 aug. 2012, om 07:50 heeft "AnilKumar, Chimata" <anilkumar@ti.com> het volgende geschreven:

> Hi Koen,
> 
> On Thu, Aug 23, 2012 at 19:43:48, Koen Kooi wrote:
>> 
>> Op 21 aug. 2012, om 13:17 heeft AnilKumar Ch <anilkumar@ti.com> het volgende geschreven:
>> 
>>> 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>
>> 
>> I tried this and the kernel immediately crashes on my beaglebone. Could you upload the complete git tree and .config you used to test this to somewhere public please?
> 
> Use this repo to test on beaglebone
> https://github.com/hvaibhav/am335x-linux/commits/am335x-upstream-staging-pinctrl
> 
> This wiki talks about how to build and use?
> https://github.com/hvaibhav/am335x-linux/wiki/How-To-Use-Upstream-Tree
> 
> Note: Enable tps65217 regulator in kernel config.

I used that repo and as a seperate test I rebased that to latest mainline, same thing: as soon as I turn on the TPS in the .config it crashes on boot. Is the pinctrl repo the *exact* repo you used to test the patches on beaglebone?

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

* [PATCH v3 4/4] arm/dts: Add tps65217 regulator DT data to am335x-bone.dts
  2012-08-24  6:28       ` Koen Kooi
@ 2012-08-24  7:26         ` AnilKumar, Chimata
  2012-08-24  7:56           ` Koen Kooi
  0 siblings, 1 reply; 25+ messages in thread
From: AnilKumar, Chimata @ 2012-08-24  7:26 UTC (permalink / raw)
  To: linux-arm-kernel

Hi Koen,

On Fri, Aug 24, 2012 at 11:58:34, Koen Kooi wrote:
> 
> Op 24 aug. 2012, om 07:50 heeft "AnilKumar, Chimata" <anilkumar@ti.com> het volgende geschreven:
> 
> > Hi Koen,
> > 
> > On Thu, Aug 23, 2012 at 19:43:48, Koen Kooi wrote:
> >> 
> >> Op 21 aug. 2012, om 13:17 heeft AnilKumar Ch <anilkumar@ti.com> het volgende geschreven:
> >> 
> >>> 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>
> >> 
> >> I tried this and the kernel immediately crashes on my beaglebone. Could you upload the complete git tree and .config you used to test this to somewhere public please?
> > 
> > Use this repo to test on beaglebone
> > https://github.com/hvaibhav/am335x-linux/commits/am335x-upstream-staging-pinctrl
> > 
> > This wiki talks about how to build and use?
> > https://github.com/hvaibhav/am335x-linux/wiki/How-To-Use-Upstream-Tree
> > 
> > Note: Enable tps65217 regulator in kernel config.
> 
> I used that repo and as a seperate test I rebased that to latest mainline, same thing: as soon as I turn on the TPS in the .config it crashes on boot. Is the pinctrl repo the *exact* repo you used to test the patches on beaglebone?

I tested on latest mainline after merging to
am335x-upstream-staging-pinctrl (voltage also changing)

Can you share your .config and uImage?

My config details:- (After merge)
1. omap2plus_defconfig
2. Enable tps65217 MFD driver
3. Enable tps65217 regulator driver

Thanks
AnilKumar

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

* [PATCH v3 4/4] arm/dts: Add tps65217 regulator DT data to am335x-bone.dts
  2012-08-24  7:26         ` AnilKumar, Chimata
@ 2012-08-24  7:56           ` Koen Kooi
  2012-08-24  8:02             ` Koen Kooi
  0 siblings, 1 reply; 25+ messages in thread
From: Koen Kooi @ 2012-08-24  7:56 UTC (permalink / raw)
  To: linux-arm-kernel


Op 24 aug. 2012, om 09:26 heeft "AnilKumar, Chimata" <anilkumar@ti.com> het volgende geschreven:

> Hi Koen,
> 
> On Fri, Aug 24, 2012 at 11:58:34, Koen Kooi wrote:
>> 
>> Op 24 aug. 2012, om 07:50 heeft "AnilKumar, Chimata" <anilkumar@ti.com> het volgende geschreven:
>> 
>>> Hi Koen,
>>> 
>>> On Thu, Aug 23, 2012 at 19:43:48, Koen Kooi wrote:
>>>> 
>>>> Op 21 aug. 2012, om 13:17 heeft AnilKumar Ch <anilkumar@ti.com> het volgende geschreven:
>>>> 
>>>>> 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>
>>>> 
>>>> I tried this and the kernel immediately crashes on my beaglebone. Could you upload the complete git tree and .config you used to test this to somewhere public please?
>>> 
>>> Use this repo to test on beaglebone
>>> https://github.com/hvaibhav/am335x-linux/commits/am335x-upstream-staging-pinctrl
>>> 
>>> This wiki talks about how to build and use?
>>> https://github.com/hvaibhav/am335x-linux/wiki/How-To-Use-Upstream-Tree
>>> 
>>> Note: Enable tps65217 regulator in kernel config.
>> 
>> I used that repo and as a seperate test I rebased that to latest mainline, same thing: as soon as I turn on the TPS in the .config it crashes on boot. Is the pinctrl repo the *exact* repo you used to test the patches on beaglebone?
> 
> I tested on latest mainline after merging to
> am335x-upstream-staging-pinctrl (voltage also changing)
> 
> Can you share your .config and uImage?

Config: https://github.com/beagleboard/kernel/blob/beaglebone-3.6/patches/configs/beaglebone

> My config details:- (After merge)
> 1. omap2plus_defconfig
> 2. Enable tps65217 MFD driver
> 3. Enable tps65217 regulator driver


I rebased onto latest mainline and refreshed the base patches from Vaibhav and I now get: 

[    0.246796] tps65217 0-0024: TPS65217 ID 0xf version 1.1

So it boots! I don't know what made it break before, but it's working now :)

regards,

Koen

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

* [PATCH v3 4/4] arm/dts: Add tps65217 regulator DT data to am335x-bone.dts
  2012-08-24  7:56           ` Koen Kooi
@ 2012-08-24  8:02             ` Koen Kooi
  2012-08-28  5:34               ` AnilKumar, Chimata
  0 siblings, 1 reply; 25+ messages in thread
From: Koen Kooi @ 2012-08-24  8:02 UTC (permalink / raw)
  To: linux-arm-kernel


Op 24 aug. 2012, om 09:56 heeft Koen Kooi <koen@dominion.thruhere.net> het volgende geschreven:

> 
> Op 24 aug. 2012, om 09:26 heeft "AnilKumar, Chimata" <anilkumar@ti.com> het volgende geschreven:
> 
>> Hi Koen,
>> 
>> On Fri, Aug 24, 2012 at 11:58:34, Koen Kooi wrote:
>>> 
>>> Op 24 aug. 2012, om 07:50 heeft "AnilKumar, Chimata" <anilkumar@ti.com> het volgende geschreven:
>>> 
>>>> Hi Koen,
>>>> 
>>>> On Thu, Aug 23, 2012 at 19:43:48, Koen Kooi wrote:
>>>>> 
>>>>> Op 21 aug. 2012, om 13:17 heeft AnilKumar Ch <anilkumar@ti.com> het volgende geschreven:
>>>>> 
>>>>>> 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>
>>>>> 
>>>>> I tried this and the kernel immediately crashes on my beaglebone. Could you upload the complete git tree and .config you used to test this to somewhere public please?
>>>> 
>>>> Use this repo to test on beaglebone
>>>> https://github.com/hvaibhav/am335x-linux/commits/am335x-upstream-staging-pinctrl
>>>> 
>>>> This wiki talks about how to build and use?
>>>> https://github.com/hvaibhav/am335x-linux/wiki/How-To-Use-Upstream-Tree
>>>> 
>>>> Note: Enable tps65217 regulator in kernel config.
>>> 
>>> I used that repo and as a seperate test I rebased that to latest mainline, same thing: as soon as I turn on the TPS in the .config it crashes on boot. Is the pinctrl repo the *exact* repo you used to test the patches on beaglebone?
>> 
>> I tested on latest mainline after merging to
>> am335x-upstream-staging-pinctrl (voltage also changing)
>> 
>> Can you share your .config and uImage?
> 
> Config: https://github.com/beagleboard/kernel/blob/beaglebone-3.6/patches/configs/beaglebone
> 
>> My config details:- (After merge)
>> 1. omap2plus_defconfig
>> 2. Enable tps65217 MFD driver
>> 3. Enable tps65217 regulator driver
> 
> 
> I rebased onto latest mainline and refreshed the base patches from Vaibhav and I now get: 
> 
> [    0.246796] tps65217 0-0024: TPS65217 ID 0xf version 1.1
> 
> So it boots! I don't know what made it break before, but it's working now :)

*sigh* I'm an idiot:

root at beaglebone:~# uname -a
Linux beaglebone 3.6.0-rc3-00103-gfd02083 #86 SMP Fri Aug 24 09:45:54 CEST 2012 armv7l GNU/Linux
root at beaglebone:~# zcat /proc/config.gz | grep 217
CONFIG_MFD_TPS65217=y
# CONFIG_REGULATOR_TPS65217 is not set

Will retry with regulator driver actually turned on in a bit.

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

* [PATCH v3 1/4] arm/dts: regulator: Add tps65910 device tree data
  2012-08-21 18:08         ` Mark Brown
@ 2012-08-24 20:16           ` Tony Lindgren
  2012-08-27 16:51             ` Mark Brown
  0 siblings, 1 reply; 25+ messages in thread
From: Tony Lindgren @ 2012-08-24 20:16 UTC (permalink / raw)
  To: linux-arm-kernel

* Mark Brown <broonie@opensource.wolfsonmicro.com> [120821 11:09]:
> On Tue, Aug 21, 2012 at 12:05:15PM -0600, Stephen Warren wrote:
> > On 08/21/2012 10:38 AM, Mark Brown wrote:
> 
> > > This isn't the general view for the regualtor API - we generally
> > > want all regulators to be registered in order to allow us to see
> > > what's going on with things even if we've not figured them out from
> > > software.
> 
> > Oh, I said the above specifically because when I added the LDO
> > configuration for the regulators that weren't used to the Tegra .dts
> > files, you told me to remove it, based on the comment I put in there
> > that they weren't used on the board.
> 
> The board shouldn't have to define the regulators, the regulator driver
> really ought to be able to figure out that they're there by itself if
> there's no configuration based purely on knowing which chip is there.
> From that point of view it's OK for the chip .dtsi to have them (though
> ideally the driver wouldn't *need* that either) which was what was
> happening here.

So I assume no changes needed here then?

Regards,

Tony

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

* [PATCH v3 1/4] arm/dts: regulator: Add tps65910 device tree data
  2012-08-24 20:16           ` Tony Lindgren
@ 2012-08-27 16:51             ` Mark Brown
  0 siblings, 0 replies; 25+ messages in thread
From: Mark Brown @ 2012-08-27 16:51 UTC (permalink / raw)
  To: linux-arm-kernel

On Fri, Aug 24, 2012 at 01:16:34PM -0700, Tony Lindgren wrote:
> * Mark Brown <broonie@opensource.wolfsonmicro.com> [120821 11:09]:

> > The board shouldn't have to define the regulators, the regulator driver
> > really ought to be able to figure out that they're there by itself if
> > there's no configuration based purely on knowing which chip is there.
> > From that point of view it's OK for the chip .dtsi to have them (though
> > ideally the driver wouldn't *need* that either) which was what was
> > happening here.

> So I assume no changes needed here then?

Seems that way.

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

* [PATCH v3 4/4] arm/dts: Add tps65217 regulator DT data to am335x-bone.dts
  2012-08-24  8:02             ` Koen Kooi
@ 2012-08-28  5:34               ` AnilKumar, Chimata
  2012-09-05 13:29                 ` Koen Kooi
  0 siblings, 1 reply; 25+ messages in thread
From: AnilKumar, Chimata @ 2012-08-28  5:34 UTC (permalink / raw)
  To: linux-arm-kernel

Hi Koen,

On Fri, Aug 24, 2012 at 13:32:17, Koen Kooi wrote:
> 
> Op 24 aug. 2012, om 09:56 heeft Koen Kooi <koen@dominion.thruhere.net> het volgende geschreven:
> 
> > 
> > Op 24 aug. 2012, om 09:26 heeft "AnilKumar, Chimata" <anilkumar@ti.com> het volgende geschreven:
> > 
> >> Hi Koen,
> >> 
> >> On Fri, Aug 24, 2012 at 11:58:34, Koen Kooi wrote:
> >>> 
> >>> Op 24 aug. 2012, om 07:50 heeft "AnilKumar, Chimata" <anilkumar@ti.com> het volgende geschreven:
> >>> 
> >>>> Hi Koen,
> >>>> 
> >>>> On Thu, Aug 23, 2012 at 19:43:48, Koen Kooi wrote:
> >>>>> 
> >>>>> Op 21 aug. 2012, om 13:17 heeft AnilKumar Ch <anilkumar@ti.com> het volgende geschreven:
> >>>>> 
> >>>>>> 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>
> >>>>> 
> >>>>> I tried this and the kernel immediately crashes on my beaglebone. Could you upload the complete git tree and .config you used to test this to somewhere public please?
> >>>> 
> >>>> Use this repo to test on beaglebone
> >>>> https://github.com/hvaibhav/am335x-linux/commits/am335x-upstream-staging-pinctrl
> >>>> 
> >>>> This wiki talks about how to build and use?
> >>>> https://github.com/hvaibhav/am335x-linux/wiki/How-To-Use-Upstream-Tree
> >>>> 
> >>>> Note: Enable tps65217 regulator in kernel config.
> >>> 
> >>> I used that repo and as a seperate test I rebased that to latest mainline, same thing: as soon as I turn on the TPS in the .config it crashes on boot. Is the pinctrl repo the *exact* repo you used to test the patches on beaglebone?
> >> 
> >> I tested on latest mainline after merging to
> >> am335x-upstream-staging-pinctrl (voltage also changing)
> >> 
> >> Can you share your .config and uImage?
> > 
> > Config: https://github.com/beagleboard/kernel/blob/beaglebone-3.6/patches/configs/beaglebone
> > 
> >> My config details:- (After merge)
> >> 1. omap2plus_defconfig
> >> 2. Enable tps65217 MFD driver
> >> 3. Enable tps65217 regulator driver
> > 
> > 
> > I rebased onto latest mainline and refreshed the base patches from Vaibhav and I now get: 
> > 
> > [    0.246796] tps65217 0-0024: TPS65217 ID 0xf version 1.1
> > 
> > So it boots! I don't know what made it break before, but it's working now :)
> 
> *sigh* I'm an idiot:
> 
> root at beaglebone:~# uname -a
> Linux beaglebone 3.6.0-rc3-00103-gfd02083 #86 SMP Fri Aug 24 09:45:54 CEST 2012 armv7l GNU/Linux
> root at beaglebone:~# zcat /proc/config.gz | grep 217
> CONFIG_MFD_TPS65217=y
> # CONFIG_REGULATOR_TPS65217 is not set
> 
> Will retry with regulator driver actually turned on in a bit.

Is it working after enabling the regulator?

Thanks
AnilKumar

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

* [PATCH v3 0/4] Add AM33XX regulators device tree data
  2012-08-21 13:57 ` [PATCH v3 0/4] Add AM33XX regulators device tree data Mark Brown
@ 2012-08-30 21:01   ` Tony Lindgren
  0 siblings, 0 replies; 25+ messages in thread
From: Tony Lindgren @ 2012-08-30 21:01 UTC (permalink / raw)
  To: linux-arm-kernel

* Mark Brown <broonie@opensource.wolfsonmicro.com> [120821 06:58]:
> On Tue, Aug 21, 2012 at 04:47:26PM +0530, AnilKumar Ch 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 with these patches
> > http://www.mail-archive.com/linux-omap at vger.kernel.org/msg73843.html
> > and these patches has been tested on AM335x EVM and Bone devices.
> 
> Reviewed-by: Mark Brown <broonie@opensource.wolfsonmicro.com>

Applying these into omap devel-dt branch.

Tony

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

* [PATCH v3 4/4] arm/dts: Add tps65217 regulator DT data to am335x-bone.dts
  2012-08-28  5:34               ` AnilKumar, Chimata
@ 2012-09-05 13:29                 ` Koen Kooi
  2012-09-05 14:24                   ` Matt Porter
  0 siblings, 1 reply; 25+ messages in thread
From: Koen Kooi @ 2012-09-05 13:29 UTC (permalink / raw)
  To: linux-arm-kernel


Op 28 aug. 2012, om 07:34 heeft "AnilKumar, Chimata" <anilkumar@ti.com> het volgende geschreven:

> Hi Koen,
> 
> On Fri, Aug 24, 2012 at 13:32:17, Koen Kooi wrote:
>> 
>> Op 24 aug. 2012, om 09:56 heeft Koen Kooi <koen@dominion.thruhere.net> het volgende geschreven:
>> 
>>> 
>>> Op 24 aug. 2012, om 09:26 heeft "AnilKumar, Chimata" <anilkumar@ti.com> het volgende geschreven:
>>> 
>>>> Hi Koen,
>>>> 
>>>> On Fri, Aug 24, 2012 at 11:58:34, Koen Kooi wrote:
>>>>> 
>>>>> Op 24 aug. 2012, om 07:50 heeft "AnilKumar, Chimata" <anilkumar@ti.com> het volgende geschreven:
>>>>> 
>>>>>> Hi Koen,
>>>>>> 
>>>>>> On Thu, Aug 23, 2012 at 19:43:48, Koen Kooi wrote:
>>>>>>> 
>>>>>>> Op 21 aug. 2012, om 13:17 heeft AnilKumar Ch <anilkumar@ti.com> het volgende geschreven:
>>>>>>> 
>>>>>>>> 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>
>>>>>>> 
>>>>>>> I tried this and the kernel immediately crashes on my beaglebone. Could you upload the complete git tree and .config you used to test this to somewhere public please?
>>>>>> 
>>>>>> Use this repo to test on beaglebone
>>>>>> https://github.com/hvaibhav/am335x-linux/commits/am335x-upstream-staging-pinctrl
>>>>>> 
>>>>>> This wiki talks about how to build and use?
>>>>>> https://github.com/hvaibhav/am335x-linux/wiki/How-To-Use-Upstream-Tree
>>>>>> 
>>>>>> Note: Enable tps65217 regulator in kernel config.
>>>>> 
>>>>> I used that repo and as a seperate test I rebased that to latest mainline, same thing: as soon as I turn on the TPS in the .config it crashes on boot. Is the pinctrl repo the *exact* repo you used to test the patches on beaglebone?
>>>> 
>>>> I tested on latest mainline after merging to
>>>> am335x-upstream-staging-pinctrl (voltage also changing)
>>>> 
>>>> Can you share your .config and uImage?
>>> 
>>> Config: https://github.com/beagleboard/kernel/blob/beaglebone-3.6/patches/configs/beaglebone
>>> 
>>>> My config details:- (After merge)
>>>> 1. omap2plus_defconfig
>>>> 2. Enable tps65217 MFD driver
>>>> 3. Enable tps65217 regulator driver
>>> 
>>> 
>>> I rebased onto latest mainline and refreshed the base patches from Vaibhav and I now get: 
>>> 
>>> [    0.246796] tps65217 0-0024: TPS65217 ID 0xf version 1.1
>>> 
>>> So it boots! I don't know what made it break before, but it's working now :)
>> 
>> *sigh* I'm an idiot:
>> 
>> root at beaglebone:~# uname -a
>> Linux beaglebone 3.6.0-rc3-00103-gfd02083 #86 SMP Fri Aug 24 09:45:54 CEST 2012 armv7l GNU/Linux
>> root at beaglebone:~# zcat /proc/config.gz | grep 217
>> CONFIG_MFD_TPS65217=y
>> # CONFIG_REGULATOR_TPS65217 is not set
>> 
>> Will retry with regulator driver actually turned on in a bit.
> 
> Is it working after enabling the regulator?

It took me a while to get back to this problem, but it still isn't working for me. I did manage to get more info on the error:

root at bone-mainline:~# insmod tps65217-regulator.ko
[   32.754419] Unable to handle kernel NULL pointer dereference at virtual address 000000c8
[   32.763087] pgd = cea60000
[   32.765969] [000000c8] *pgd=8fbed831, *pte=00000000, *ppte=00000000
[   32.772617] Internal error: Oops: 17 [#1] SMP THUMB2
[   32.777827] Modules linked in: tps65217_regulator(+) ip_tables x_tables snd_soc_omap snd_soc_core regmap_spi snd_pcm snd_timer snd soundcore snd_page_alloc ipv6
[   32.792976] CPU: 0    Not tainted  (3.6.0-rc4 #109)
[   32.798106] PC is at regmap_read+0x8/0x38
[   32.802315] LR is at regulator_get_voltage_sel_regmap+0x15/0x38
[   32.808525] pc : [<c0233c8c>]    lr : [<c0208619>]    psr: 60000033
[   32.808525] sp : ceb2fd20  ip : 00000000  fp : c0ba6168
[   32.820565] r10: c0619fac  r9 : cf926840  r8 : cf0278b0
[   32.826045] r7 : cf92c008  r6 : cf115d40  r5 : 0000000e  r4 : 00000000
[   32.832892] r3 : bf946440  r2 : ceb2fd34  r1 : 0000000e  r0 : 0000000e
[   32.839740] Flags: nZCv  IRQs on  FIQs on  Mode SVC_32  ISA Thumb  Segment user
[   32.847406] Control: 50c5387d  Table: 8ea60019  DAC: 00000015
[   32.853431] Process insmod (pid: 176, stack limit = 0xceb2e2f8)
[   32.859638] Stack: (0xceb2fd20 to 0xceb30000)
[   32.864214] fd20: cf027800 bf946440 cf115d40 c0208619 00000001 c00a59b1 cf027800 c0206cc3
[   32.872796] fd40: cf027800 c0209d65 c00fefcb 00000000 c0626ef0 ceb2fd7c cf027810 00000000
[   32.881379] fd60: 00000000 c00fefcb c0379721 ceb28b40 00000001 c061bf74 60000013 00000000
[   32.889961] fd80: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
[   32.898542] fda0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
[   32.907128] fdc0: 00000000 00000000 00000000 00000000 cf072950 00000044 cf92c008 c0db8fd0
[   32.915712] fde0: bf946440 bf948001 00000028 00000030 000003fb bf946397 cf92c008 cf926840
[   32.924296] fe00: cf92c410 c0db8fd0 00000000 00000000 00000000 00000000 bf946768 cf92c008
[   32.932878] fe20: c0baa0b0 c0baa0c0 bf946768 c022af2b c022af19 c022a30d 00000000 cf92c008
[   32.941460] fe40: bf946768 cf92c03c 00000000 bf948001 00000028 c022a49d bf946768 c022a44d
[   32.950041] fe60: 00000000 c0229375 cf81a0a8 cf926810 bf946768 c062d2d8 cea25dc0 c0229cf1
[   32.958623] fe80: bf94665c bf946768 bf946768 bf946854 ceb2e000 00000000 bf948001 c022a839
[   32.967204] fea0: 00000000 c0648640 bf946854 ceb2e000 00000000 bf948001 00000028 bf948009
[   32.975787] fec0: 00000000 c00085ed bf946854 c0047b4b 00000000 cd8fa780 cf8001c0 00000000
[   32.984367] fee0: bf94689c bf946854 00000001 ceb4ef00 00000001 00000030 000003fb c006c94b
[   32.992947] ff00: bf946860 00007fff c006bd2d c0008311 00000002 c0b6bff4 bf9469a8 ceb2e000
[   33.001527] ff20: 00012008 00012008 d0e80000 00019f6b d0e93310 d0e9308b d0e99b70 000009bc
[   33.010108] ff40: 00000c2c 00000000 00000000 0000003b 0000003c 00000021 0000001e 0000001c
[   33.018687] ff60: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 c052ba38
[   33.027267] ff80: 00008a28 00008a28 00012008 bede2eb0 00000080 c000cac4 ceb2e000 00000000
[   33.035844] ffa0: 00000000 c000c921 00008a28 00012008 00012018 00019f6b 00012008 b6f5f248
[   33.044426] ffc0: 00008a28 00012008 bede2eb0 00000080 00020000 00000000 00000003 00000000
[   33.053004] ffe0: 00019f6b bede2c3c 00008c9c b6efd654 60000010 00012018 0070756b 000193fe
[   33.061592] [<c0233c8c>] (regmap_read+0x8/0x38) from [<c0208619>] (regulator_get_voltage_sel_regmap+0x15/0x38)
[   33.072101] [<c0208619>] (regulator_get_voltage_sel_regmap+0x15/0x38) from [<c0206cc3>] (_regulator_get_voltage+0xf/0x40)
[   33.083604] [<c0206cc3>] (_regulator_get_voltage+0xf/0x40) from [<c0209d65>] (regulator_register+0x471/0xe98)
[   33.094028] [<c0209d65>] (regulator_register+0x471/0xe98) from [<bf946397>] (tps65217_regulator_probe+0x5a/0x74 [tps65217_regulator])
[   33.106640] [<bf946397>] (tps65217_regulator_probe+0x5a/0x74 [tps65217_regulator]) from [<c022af2b>] (platform_drv_probe+0x13/0x14)
[   33.119053] [<c022af2b>] (platform_drv_probe+0x13/0x14) from [<c022a30d>] (driver_probe_device+0x69/0x1a8)
[   33.129187] [<c022a30d>] (driver_probe_device+0x69/0x1a8) from [<c022a49d>] (__driver_attach+0x51/0x54)
[   33.139047] [<c022a49d>] (__driver_attach+0x51/0x54) from [<c0229375>] (bus_for_each_dev+0x29/0x44)
[   33.148544] [<c0229375>] (bus_for_each_dev+0x29/0x44) from [<c0229cf1>] (bus_add_driver+0x7d/0x194)
[   33.158039] [<c0229cf1>] (bus_add_driver+0x7d/0x194) from [<c022a839>] (driver_register+0x3d/0xc8)
[   33.167448] [<c022a839>] (driver_register+0x3d/0xc8) from [<bf948009>] (tps65217_regulator_init+0x8/0xf [tps65217_regulator])
[   33.179320] [<bf948009>] (tps65217_regulator_init+0x8/0xf [tps65217_regulator]) from [<c00085ed>] (do_one_initcall+0x25/0x11c)
[   33.191279] [<c00085ed>] (do_one_initcall+0x25/0x11c) from [<c006c94b>] (sys_init_module+0x9b/0x13bc)
[   33.200961] [<c006c94b>] (sys_init_module+0x9b/0x13bc) from [<c000c921>] (ret_fast_syscall+0x1/0x50)
[   33.210542] Code: b570 4604 460d 4608 (f8d4) 10c8 
[   33.215917] ---[ end trace 59e3bd0a3e19dc28 ]---
Segmentation fault

That's linus' tree + devel-dt + vaibhav am335x base patches.

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

* [PATCH v3 4/4] arm/dts: Add tps65217 regulator DT data to am335x-bone.dts
  2012-09-05 13:29                 ` Koen Kooi
@ 2012-09-05 14:24                   ` Matt Porter
  2012-09-05 14:29                     ` Koen Kooi
  0 siblings, 1 reply; 25+ messages in thread
From: Matt Porter @ 2012-09-05 14:24 UTC (permalink / raw)
  To: linux-arm-kernel

On Wed, Sep 05, 2012 at 03:29:30PM +0200, Koen Kooi wrote:
> 
> Op 28 aug. 2012, om 07:34 heeft "AnilKumar, Chimata" <anilkumar@ti.com> het volgende geschreven:
> 
> > Hi Koen,
> > 
> > On Fri, Aug 24, 2012 at 13:32:17, Koen Kooi wrote:
> >> 
> >> Op 24 aug. 2012, om 09:56 heeft Koen Kooi <koen@dominion.thruhere.net> het volgende geschreven:
> >> 
> >>> 
> >>> Op 24 aug. 2012, om 09:26 heeft "AnilKumar, Chimata" <anilkumar@ti.com> het volgende geschreven:
> >>> 
> >>>> Hi Koen,
> >>>> 
> >>>> On Fri, Aug 24, 2012 at 11:58:34, Koen Kooi wrote:
> >>>>> 
> >>>>> Op 24 aug. 2012, om 07:50 heeft "AnilKumar, Chimata" <anilkumar@ti.com> het volgende geschreven:
> >>>>> 
> >>>>>> Hi Koen,
> >>>>>> 
> >>>>>> On Thu, Aug 23, 2012 at 19:43:48, Koen Kooi wrote:
> >>>>>>> 
> >>>>>>> Op 21 aug. 2012, om 13:17 heeft AnilKumar Ch <anilkumar@ti.com> het volgende geschreven:
> >>>>>>> 
> >>>>>>>> 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>
> >>>>>>> 
> >>>>>>> I tried this and the kernel immediately crashes on my beaglebone. Could you upload the complete git tree and .config you used to test this to somewhere public please?
> >>>>>> 
> >>>>>> Use this repo to test on beaglebone
> >>>>>> https://github.com/hvaibhav/am335x-linux/commits/am335x-upstream-staging-pinctrl
> >>>>>> 
> >>>>>> This wiki talks about how to build and use?
> >>>>>> https://github.com/hvaibhav/am335x-linux/wiki/How-To-Use-Upstream-Tree
> >>>>>> 
> >>>>>> Note: Enable tps65217 regulator in kernel config.
> >>>>> 
> >>>>> I used that repo and as a seperate test I rebased that to latest mainline, same thing: as soon as I turn on the TPS in the .config it crashes on boot. Is the pinctrl repo the *exact* repo you used to test the patches on beaglebone?
> >>>> 
> >>>> I tested on latest mainline after merging to
> >>>> am335x-upstream-staging-pinctrl (voltage also changing)
> >>>> 
> >>>> Can you share your .config and uImage?
> >>> 
> >>> Config: https://github.com/beagleboard/kernel/blob/beaglebone-3.6/patches/configs/beaglebone
> >>> 
> >>>> My config details:- (After merge)
> >>>> 1. omap2plus_defconfig
> >>>> 2. Enable tps65217 MFD driver
> >>>> 3. Enable tps65217 regulator driver
> >>> 
> >>> 
> >>> I rebased onto latest mainline and refreshed the base patches from Vaibhav and I now get: 
> >>> 
> >>> [    0.246796] tps65217 0-0024: TPS65217 ID 0xf version 1.1
> >>> 
> >>> So it boots! I don't know what made it break before, but it's working now :)
> >> 
> >> *sigh* I'm an idiot:
> >> 
> >> root at beaglebone:~# uname -a
> >> Linux beaglebone 3.6.0-rc3-00103-gfd02083 #86 SMP Fri Aug 24 09:45:54 CEST 2012 armv7l GNU/Linux
> >> root at beaglebone:~# zcat /proc/config.gz | grep 217
> >> CONFIG_MFD_TPS65217=y
> >> # CONFIG_REGULATOR_TPS65217 is not set
> >> 
> >> Will retry with regulator driver actually turned on in a bit.
> > 
> > Is it working after enabling the regulator?
> 
> It took me a while to get back to this problem, but it still isn't working for me. I did manage to get more info on the error:
> 
> root at bone-mainline:~# insmod tps65217-regulator.ko
> [   32.754419] Unable to handle kernel NULL pointer dereference at virtual address 000000c8
> [   32.763087] pgd = cea60000
> [   32.765969] [000000c8] *pgd=8fbed831, *pte=00000000, *ppte=00000000
> [   32.772617] Internal error: Oops: 17 [#1] SMP THUMB2
> [   32.777827] Modules linked in: tps65217_regulator(+) ip_tables x_tables snd_soc_omap snd_soc_core regmap_spi snd_pcm snd_timer snd soundcore snd_page_alloc ipv6
> [   32.792976] CPU: 0    Not tainted  (3.6.0-rc4 #109)
> [   32.798106] PC is at regmap_read+0x8/0x38
> [   32.802315] LR is at regulator_get_voltage_sel_regmap+0x15/0x38

I just got to this same point last night as I needed this working to
test omap_hsmmc with edma dmaengine...

The problem is that the tps65217-regulator driver is handing the wrong
device to regulator_register() and it contains a null regmap. This patch
passes in the the parent dev to fix it. Maybe I missed another patch
that addresses this in a different way, such as the regulator devices
being stuffed with the regmap devres?

-Matt

>From 40d118bebc5eaf2a8df4f8b5e113b892a3210f96 Mon Sep 17 00:00:00 2001
From: Matt Porter <mporter@ti.com>
Date: Wed, 5 Sep 2012 10:09:50 -0400
Subject: [PATCH] regulator: tps65217: fix crash during registration

The struct device for each platform device bound to this
driver is a child to the parent mfd device. The parent device
is the one that actually contains the regmap devres so fix the
null pointer dereference during the first regmap access in
registration by passing in the parent device.

Signed-off-by: Matt Porter <mporter@ti.com>
---
 drivers/regulator/tps65217-regulator.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/regulator/tps65217-regulator.c b/drivers/regulator/tps65217-regulator.c
index 6caa222..af4916c 100644
--- a/drivers/regulator/tps65217-regulator.c
+++ b/drivers/regulator/tps65217-regulator.c
@@ -292,7 +292,7 @@ static int __devinit tps65217_regulator_probe(struct platform_device *pdev)
 	tps = dev_to_tps65217(pdev->dev.parent);
 	tps->info[pdev->id] = info;
 
-	config.dev = &pdev->dev;
+	config.dev = pdev->dev.parent;
 	config.of_node = pdev->dev.of_node;
 	config.init_data = pdev->dev.platform_data;
 	config.driver_data = tps;
-- 
1.7.9.5

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

* [PATCH v3 4/4] arm/dts: Add tps65217 regulator DT data to am335x-bone.dts
  2012-09-05 14:24                   ` Matt Porter
@ 2012-09-05 14:29                     ` Koen Kooi
  2012-09-08  6:38                       ` AnilKumar, Chimata
  0 siblings, 1 reply; 25+ messages in thread
From: Koen Kooi @ 2012-09-05 14:29 UTC (permalink / raw)
  To: linux-arm-kernel


Op 5 sep. 2012, om 16:24 heeft Matt Porter <mporter@ti.com> het volgende geschreven:

> On Wed, Sep 05, 2012 at 03:29:30PM +0200, Koen Kooi wrote:
>> 
>> Op 28 aug. 2012, om 07:34 heeft "AnilKumar, Chimata" <anilkumar@ti.com> het volgende geschreven:
>> 
>>> Hi Koen,
>>> 
>>> On Fri, Aug 24, 2012 at 13:32:17, Koen Kooi wrote:
>>>> 
>>>> Op 24 aug. 2012, om 09:56 heeft Koen Kooi <koen@dominion.thruhere.net> het volgende geschreven:
>>>> 
>>>>> 
>>>>> Op 24 aug. 2012, om 09:26 heeft "AnilKumar, Chimata" <anilkumar@ti.com> het volgende geschreven:
>>>>> 
>>>>>> Hi Koen,
>>>>>> 
>>>>>> On Fri, Aug 24, 2012 at 11:58:34, Koen Kooi wrote:
>>>>>>> 
>>>>>>> Op 24 aug. 2012, om 07:50 heeft "AnilKumar, Chimata" <anilkumar@ti.com> het volgende geschreven:
>>>>>>> 
>>>>>>>> Hi Koen,
>>>>>>>> 
>>>>>>>> On Thu, Aug 23, 2012 at 19:43:48, Koen Kooi wrote:
>>>>>>>>> 
>>>>>>>>> Op 21 aug. 2012, om 13:17 heeft AnilKumar Ch <anilkumar@ti.com> het volgende geschreven:
>>>>>>>>> 
>>>>>>>>>> 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>
>>>>>>>>> 
>>>>>>>>> I tried this and the kernel immediately crashes on my beaglebone. Could you upload the complete git tree and .config you used to test this to somewhere public please?
>>>>>>>> 
>>>>>>>> Use this repo to test on beaglebone
>>>>>>>> https://github.com/hvaibhav/am335x-linux/commits/am335x-upstream-staging-pinctrl
>>>>>>>> 
>>>>>>>> This wiki talks about how to build and use?
>>>>>>>> https://github.com/hvaibhav/am335x-linux/wiki/How-To-Use-Upstream-Tree
>>>>>>>> 
>>>>>>>> Note: Enable tps65217 regulator in kernel config.
>>>>>>> 
>>>>>>> I used that repo and as a seperate test I rebased that to latest mainline, same thing: as soon as I turn on the TPS in the .config it crashes on boot. Is the pinctrl repo the *exact* repo you used to test the patches on beaglebone?
>>>>>> 
>>>>>> I tested on latest mainline after merging to
>>>>>> am335x-upstream-staging-pinctrl (voltage also changing)
>>>>>> 
>>>>>> Can you share your .config and uImage?
>>>>> 
>>>>> Config: https://github.com/beagleboard/kernel/blob/beaglebone-3.6/patches/configs/beaglebone
>>>>> 
>>>>>> My config details:- (After merge)
>>>>>> 1. omap2plus_defconfig
>>>>>> 2. Enable tps65217 MFD driver
>>>>>> 3. Enable tps65217 regulator driver
>>>>> 
>>>>> 
>>>>> I rebased onto latest mainline and refreshed the base patches from Vaibhav and I now get: 
>>>>> 
>>>>> [    0.246796] tps65217 0-0024: TPS65217 ID 0xf version 1.1
>>>>> 
>>>>> So it boots! I don't know what made it break before, but it's working now :)
>>>> 
>>>> *sigh* I'm an idiot:
>>>> 
>>>> root at beaglebone:~# uname -a
>>>> Linux beaglebone 3.6.0-rc3-00103-gfd02083 #86 SMP Fri Aug 24 09:45:54 CEST 2012 armv7l GNU/Linux
>>>> root at beaglebone:~# zcat /proc/config.gz | grep 217
>>>> CONFIG_MFD_TPS65217=y
>>>> # CONFIG_REGULATOR_TPS65217 is not set
>>>> 
>>>> Will retry with regulator driver actually turned on in a bit.
>>> 
>>> Is it working after enabling the regulator?
>> 
>> It took me a while to get back to this problem, but it still isn't working for me. I did manage to get more info on the error:
>> 
>> root at bone-mainline:~# insmod tps65217-regulator.ko
>> [   32.754419] Unable to handle kernel NULL pointer dereference at virtual address 000000c8
>> [   32.763087] pgd = cea60000
>> [   32.765969] [000000c8] *pgd=8fbed831, *pte=00000000, *ppte=00000000
>> [   32.772617] Internal error: Oops: 17 [#1] SMP THUMB2
>> [   32.777827] Modules linked in: tps65217_regulator(+) ip_tables x_tables snd_soc_omap snd_soc_core regmap_spi snd_pcm snd_timer snd soundcore snd_page_alloc ipv6
>> [   32.792976] CPU: 0    Not tainted  (3.6.0-rc4 #109)
>> [   32.798106] PC is at regmap_read+0x8/0x38
>> [   32.802315] LR is at regulator_get_voltage_sel_regmap+0x15/0x38
> 
> I just got to this same point last night as I needed this working to
> test omap_hsmmc with edma dmaengine...
> 
> The problem is that the tps65217-regulator driver is handing the wrong
> device to regulator_register() and it contains a null regmap. This patch
> passes in the the parent dev to fix it. Maybe I missed another patch
> that addresses this in a different way, such as the regulator devices
> being stuffed with the regmap devres?
> 
> -Matt
> 
> From 40d118bebc5eaf2a8df4f8b5e113b892a3210f96 Mon Sep 17 00:00:00 2001
> From: Matt Porter <mporter@ti.com>
> Date: Wed, 5 Sep 2012 10:09:50 -0400
> Subject: [PATCH] regulator: tps65217: fix crash during registration
> 
> The struct device for each platform device bound to this
> driver is a child to the parent mfd device. The parent device
> is the one that actually contains the regmap devres so fix the
> null pointer dereference during the first regmap access in
> registration by passing in the parent device.
> 
> Signed-off-by: Matt Porter <mporter@ti.com>
> ---
> drivers/regulator/tps65217-regulator.c |    2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/regulator/tps65217-regulator.c b/drivers/regulator/tps65217-regulator.c
> index 6caa222..af4916c 100644
> --- a/drivers/regulator/tps65217-regulator.c
> +++ b/drivers/regulator/tps65217-regulator.c
> @@ -292,7 +292,7 @@ static int __devinit tps65217_regulator_probe(struct platform_device *pdev)
> 	tps = dev_to_tps65217(pdev->dev.parent);
> 	tps->info[pdev->id] = info;
> 
> -	config.dev = &pdev->dev;
> +	config.dev = pdev->dev.parent;
> 	config.of_node = pdev->dev.of_node;
> 	config.init_data = pdev->dev.platform_data;
> 	config.driver_data = tps;
> -- 
> 1.7.9.5

That patch fixes it for me:

Tested-by: Koen Kooi <koen@dominion.thruhere.net>

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

* [PATCH v3 4/4] arm/dts: Add tps65217 regulator DT data to am335x-bone.dts
  2012-09-05 14:29                     ` Koen Kooi
@ 2012-09-08  6:38                       ` AnilKumar, Chimata
  2012-09-10 16:26                         ` Matt Porter
  0 siblings, 1 reply; 25+ messages in thread
From: AnilKumar, Chimata @ 2012-09-08  6:38 UTC (permalink / raw)
  To: linux-arm-kernel

On Wed, Sep 05, 2012 at 19:59:54, Koen Kooi wrote:
> 
> Op 5 sep. 2012, om 16:24 heeft Matt Porter <mporter@ti.com> het volgende geschreven:
> 
> > On Wed, Sep 05, 2012 at 03:29:30PM +0200, Koen Kooi wrote:
> >> 
> >> Op 28 aug. 2012, om 07:34 heeft "AnilKumar, Chimata" <anilkumar@ti.com> het volgende geschreven:
> >> 
> >>> Hi Koen,
> >>> 
> >>> On Fri, Aug 24, 2012 at 13:32:17, Koen Kooi wrote:
> >>>> 
> >>>> Op 24 aug. 2012, om 09:56 heeft Koen Kooi <koen@dominion.thruhere.net> het volgende geschreven:
> >>>> 
> >>>>> 
> >>>>> Op 24 aug. 2012, om 09:26 heeft "AnilKumar, Chimata" <anilkumar@ti.com> het volgende geschreven:
> >>>>> 
> >>>>>> Hi Koen,
> >>>>>> 
> >>>>>> On Fri, Aug 24, 2012 at 11:58:34, Koen Kooi wrote:
> >>>>>>> 
> >>>>>>> Op 24 aug. 2012, om 07:50 heeft "AnilKumar, Chimata" <anilkumar@ti.com> het volgende geschreven:
> >>>>>>> 
> >>>>>>>> Hi Koen,
> >>>>>>>> 
> >>>>>>>> On Thu, Aug 23, 2012 at 19:43:48, Koen Kooi wrote:
> >>>>>>>>> 
> >>>>>>>>> Op 21 aug. 2012, om 13:17 heeft AnilKumar Ch <anilkumar@ti.com> het volgende geschreven:
> >>>>>>>>> 
> >>>>>>>>>> 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>
> >>>>>>>>> 
> >>>>>>>>> I tried this and the kernel immediately crashes on my beaglebone. Could you upload the complete git tree and .config you used to test this to somewhere public please?
> >>>>>>>> 
> >>>>>>>> Use this repo to test on beaglebone
> >>>>>>>> https://github.com/hvaibhav/am335x-linux/commits/am335x-upstream-staging-pinctrl
> >>>>>>>> 
> >>>>>>>> This wiki talks about how to build and use?
> >>>>>>>> https://github.com/hvaibhav/am335x-linux/wiki/How-To-Use-Upstream-Tree
> >>>>>>>> 
> >>>>>>>> Note: Enable tps65217 regulator in kernel config.
> >>>>>>> 
> >>>>>>> I used that repo and as a seperate test I rebased that to latest mainline, same thing: as soon as I turn on the TPS in the .config it crashes on boot. Is the pinctrl repo the *exact* repo you used to test the patches on beaglebone?
> >>>>>> 
> >>>>>> I tested on latest mainline after merging to
> >>>>>> am335x-upstream-staging-pinctrl (voltage also changing)
> >>>>>> 
> >>>>>> Can you share your .config and uImage?
> >>>>> 
> >>>>> Config: https://github.com/beagleboard/kernel/blob/beaglebone-3.6/patches/configs/beaglebone
> >>>>> 
> >>>>>> My config details:- (After merge)
> >>>>>> 1. omap2plus_defconfig
> >>>>>> 2. Enable tps65217 MFD driver
> >>>>>> 3. Enable tps65217 regulator driver
> >>>>> 
> >>>>> 
> >>>>> I rebased onto latest mainline and refreshed the base patches from Vaibhav and I now get: 
> >>>>> 
> >>>>> [    0.246796] tps65217 0-0024: TPS65217 ID 0xf version 1.1
> >>>>> 
> >>>>> So it boots! I don't know what made it break before, but it's working now :)
> >>>> 
> >>>> *sigh* I'm an idiot:
> >>>> 
> >>>> root at beaglebone:~# uname -a
> >>>> Linux beaglebone 3.6.0-rc3-00103-gfd02083 #86 SMP Fri Aug 24 09:45:54 CEST 2012 armv7l GNU/Linux
> >>>> root at beaglebone:~# zcat /proc/config.gz | grep 217
> >>>> CONFIG_MFD_TPS65217=y
> >>>> # CONFIG_REGULATOR_TPS65217 is not set
> >>>> 
> >>>> Will retry with regulator driver actually turned on in a bit.
> >>> 
> >>> Is it working after enabling the regulator?
> >> 
> >> It took me a while to get back to this problem, but it still isn't working for me. I did manage to get more info on the error:
> >> 
> >> root at bone-mainline:~# insmod tps65217-regulator.ko
> >> [   32.754419] Unable to handle kernel NULL pointer dereference at virtual address 000000c8
> >> [   32.763087] pgd = cea60000
> >> [   32.765969] [000000c8] *pgd=8fbed831, *pte=00000000, *ppte=00000000
> >> [   32.772617] Internal error: Oops: 17 [#1] SMP THUMB2
> >> [   32.777827] Modules linked in: tps65217_regulator(+) ip_tables x_tables snd_soc_omap snd_soc_core regmap_spi snd_pcm snd_timer snd soundcore snd_page_alloc ipv6
> >> [   32.792976] CPU: 0    Not tainted  (3.6.0-rc4 #109)
> >> [   32.798106] PC is at regmap_read+0x8/0x38
> >> [   32.802315] LR is at regulator_get_voltage_sel_regmap+0x15/0x38
> > 
> > I just got to this same point last night as I needed this working to
> > test omap_hsmmc with edma dmaengine...
> > 
> > The problem is that the tps65217-regulator driver is handing the wrong
> > device to regulator_register() and it contains a null regmap. This patch
> > passes in the the parent dev to fix it. Maybe I missed another patch
> > that addresses this in a different way, such as the regulator devices
> > being stuffed with the regmap devres?
> > 
> > -Matt
> > 
> > From 40d118bebc5eaf2a8df4f8b5e113b892a3210f96 Mon Sep 17 00:00:00 2001
> > From: Matt Porter <mporter@ti.com>
> > Date: Wed, 5 Sep 2012 10:09:50 -0400
> > Subject: [PATCH] regulator: tps65217: fix crash during registration
> > 
> > The struct device for each platform device bound to this
> > driver is a child to the parent mfd device. The parent device
> > is the one that actually contains the regmap devres so fix the
> > null pointer dereference during the first regmap access in
> > registration by passing in the parent device.
> > 
> > Signed-off-by: Matt Porter <mporter@ti.com>
> > ---
> > drivers/regulator/tps65217-regulator.c |    2 +-
> > 1 file changed, 1 insertion(+), 1 deletion(-)
> > 
> > diff --git a/drivers/regulator/tps65217-regulator.c b/drivers/regulator/tps65217-regulator.c
> > index 6caa222..af4916c 100644
> > --- a/drivers/regulator/tps65217-regulator.c
> > +++ b/drivers/regulator/tps65217-regulator.c
> > @@ -292,7 +292,7 @@ static int __devinit tps65217_regulator_probe(struct platform_device *pdev)
> > 	tps = dev_to_tps65217(pdev->dev.parent);
> > 	tps->info[pdev->id] = info;
> > 
> > -	config.dev = &pdev->dev;
> > +	config.dev = pdev->dev.parent;
> > 	config.of_node = pdev->dev.of_node;
> > 	config.init_data = pdev->dev.platform_data;
> > 	config.driver_data = tps;
> > -- 
> > 1.7.9.5
> 
> That patch fixes it for me:

This patch is not required, added a new feature to core.c file to address
this. https://lkml.org/lkml/2012/9/7/390

Thanks
AnilKumar

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

* [PATCH v3 4/4] arm/dts: Add tps65217 regulator DT data to am335x-bone.dts
  2012-09-08  6:38                       ` AnilKumar, Chimata
@ 2012-09-10 16:26                         ` Matt Porter
  0 siblings, 0 replies; 25+ messages in thread
From: Matt Porter @ 2012-09-10 16:26 UTC (permalink / raw)
  To: linux-arm-kernel

On Sat, Sep 08, 2012 at 06:38:21AM +0000, AnilKumar, Chimata wrote:
> On Wed, Sep 05, 2012 at 19:59:54, Koen Kooi wrote:
> > 
> > Op 5 sep. 2012, om 16:24 heeft Matt Porter <mporter@ti.com> het volgende geschreven:
> > 
> > > On Wed, Sep 05, 2012 at 03:29:30PM +0200, Koen Kooi wrote:
> > >> 
> > >> Op 28 aug. 2012, om 07:34 heeft "AnilKumar, Chimata" <anilkumar@ti.com> het volgende geschreven:
> > >> 
> > >>> Hi Koen,
> > >>> 
> > >>> On Fri, Aug 24, 2012 at 13:32:17, Koen Kooi wrote:
> > >>>> 
> > >>>> Op 24 aug. 2012, om 09:56 heeft Koen Kooi <koen@dominion.thruhere.net> het volgende geschreven:
> > >>>> 
> > >>>>> 
> > >>>>> Op 24 aug. 2012, om 09:26 heeft "AnilKumar, Chimata" <anilkumar@ti.com> het volgende geschreven:
> > >>>>> 
> > >>>>>> Hi Koen,
> > >>>>>> 
> > >>>>>> On Fri, Aug 24, 2012 at 11:58:34, Koen Kooi wrote:
> > >>>>>>> 
> > >>>>>>> Op 24 aug. 2012, om 07:50 heeft "AnilKumar, Chimata" <anilkumar@ti.com> het volgende geschreven:
> > >>>>>>> 
> > >>>>>>>> Hi Koen,
> > >>>>>>>> 
> > >>>>>>>> On Thu, Aug 23, 2012 at 19:43:48, Koen Kooi wrote:
> > >>>>>>>>> 
> > >>>>>>>>> Op 21 aug. 2012, om 13:17 heeft AnilKumar Ch <anilkumar@ti.com> het volgende geschreven:
> > >>>>>>>>> 
> > >>>>>>>>>> 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>
> > >>>>>>>>> 
> > >>>>>>>>> I tried this and the kernel immediately crashes on my beaglebone. Could you upload the complete git tree and .config you used to test this to somewhere public please?
> > >>>>>>>> 
> > >>>>>>>> Use this repo to test on beaglebone
> > >>>>>>>> https://github.com/hvaibhav/am335x-linux/commits/am335x-upstream-staging-pinctrl
> > >>>>>>>> 
> > >>>>>>>> This wiki talks about how to build and use?
> > >>>>>>>> https://github.com/hvaibhav/am335x-linux/wiki/How-To-Use-Upstream-Tree
> > >>>>>>>> 
> > >>>>>>>> Note: Enable tps65217 regulator in kernel config.
> > >>>>>>> 
> > >>>>>>> I used that repo and as a seperate test I rebased that to latest mainline, same thing: as soon as I turn on the TPS in the .config it crashes on boot. Is the pinctrl repo the *exact* repo you used to test the patches on beaglebone?
> > >>>>>> 
> > >>>>>> I tested on latest mainline after merging to
> > >>>>>> am335x-upstream-staging-pinctrl (voltage also changing)
> > >>>>>> 
> > >>>>>> Can you share your .config and uImage?
> > >>>>> 
> > >>>>> Config: https://github.com/beagleboard/kernel/blob/beaglebone-3.6/patches/configs/beaglebone
> > >>>>> 
> > >>>>>> My config details:- (After merge)
> > >>>>>> 1. omap2plus_defconfig
> > >>>>>> 2. Enable tps65217 MFD driver
> > >>>>>> 3. Enable tps65217 regulator driver
> > >>>>> 
> > >>>>> 
> > >>>>> I rebased onto latest mainline and refreshed the base patches from Vaibhav and I now get: 
> > >>>>> 
> > >>>>> [    0.246796] tps65217 0-0024: TPS65217 ID 0xf version 1.1
> > >>>>> 
> > >>>>> So it boots! I don't know what made it break before, but it's working now :)
> > >>>> 
> > >>>> *sigh* I'm an idiot:
> > >>>> 
> > >>>> root at beaglebone:~# uname -a
> > >>>> Linux beaglebone 3.6.0-rc3-00103-gfd02083 #86 SMP Fri Aug 24 09:45:54 CEST 2012 armv7l GNU/Linux
> > >>>> root at beaglebone:~# zcat /proc/config.gz | grep 217
> > >>>> CONFIG_MFD_TPS65217=y
> > >>>> # CONFIG_REGULATOR_TPS65217 is not set
> > >>>> 
> > >>>> Will retry with regulator driver actually turned on in a bit.
> > >>> 
> > >>> Is it working after enabling the regulator?
> > >> 
> > >> It took me a while to get back to this problem, but it still isn't working for me. I did manage to get more info on the error:
> > >> 
> > >> root at bone-mainline:~# insmod tps65217-regulator.ko
> > >> [   32.754419] Unable to handle kernel NULL pointer dereference at virtual address 000000c8
> > >> [   32.763087] pgd = cea60000
> > >> [   32.765969] [000000c8] *pgd=8fbed831, *pte=00000000, *ppte=00000000
> > >> [   32.772617] Internal error: Oops: 17 [#1] SMP THUMB2
> > >> [   32.777827] Modules linked in: tps65217_regulator(+) ip_tables x_tables snd_soc_omap snd_soc_core regmap_spi snd_pcm snd_timer snd soundcore snd_page_alloc ipv6
> > >> [   32.792976] CPU: 0    Not tainted  (3.6.0-rc4 #109)
> > >> [   32.798106] PC is at regmap_read+0x8/0x38
> > >> [   32.802315] LR is at regulator_get_voltage_sel_regmap+0x15/0x38
> > > 
> > > I just got to this same point last night as I needed this working to
> > > test omap_hsmmc with edma dmaengine...
> > > 
> > > The problem is that the tps65217-regulator driver is handing the wrong
> > > device to regulator_register() and it contains a null regmap. This patch
> > > passes in the the parent dev to fix it. Maybe I missed another patch
> > > that addresses this in a different way, such as the regulator devices
> > > being stuffed with the regmap devres?
> > > 
> > > -Matt
> > > 
> > > From 40d118bebc5eaf2a8df4f8b5e113b892a3210f96 Mon Sep 17 00:00:00 2001
> > > From: Matt Porter <mporter@ti.com>
> > > Date: Wed, 5 Sep 2012 10:09:50 -0400
> > > Subject: [PATCH] regulator: tps65217: fix crash during registration
> > > 
> > > The struct device for each platform device bound to this
> > > driver is a child to the parent mfd device. The parent device
> > > is the one that actually contains the regmap devres so fix the
> > > null pointer dereference during the first regmap access in
> > > registration by passing in the parent device.
> > > 
> > > Signed-off-by: Matt Porter <mporter@ti.com>
> > > ---
> > > drivers/regulator/tps65217-regulator.c |    2 +-
> > > 1 file changed, 1 insertion(+), 1 deletion(-)
> > > 
> > > diff --git a/drivers/regulator/tps65217-regulator.c b/drivers/regulator/tps65217-regulator.c
> > > index 6caa222..af4916c 100644
> > > --- a/drivers/regulator/tps65217-regulator.c
> > > +++ b/drivers/regulator/tps65217-regulator.c
> > > @@ -292,7 +292,7 @@ static int __devinit tps65217_regulator_probe(struct platform_device *pdev)
> > > 	tps = dev_to_tps65217(pdev->dev.parent);
> > > 	tps->info[pdev->id] = info;
> > > 
> > > -	config.dev = &pdev->dev;
> > > +	config.dev = pdev->dev.parent;
> > > 	config.of_node = pdev->dev.of_node;
> > > 	config.init_data = pdev->dev.platform_data;
> > > 	config.driver_data = tps;
> > > -- 
> > > 1.7.9.5
> > 
> > That patch fixes it for me:
> 
> This patch is not required, added a new feature to core.c file to address
> this. https://lkml.org/lkml/2012/9/7/390

Looks good, thanks for addressing it in the core.

-Matt

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

end of thread, other threads:[~2012-09-10 16:26 UTC | newest]

Thread overview: 25+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-08-21 11:17 [PATCH v3 0/4] Add AM33XX regulators device tree data AnilKumar Ch
2012-08-21 11:17 ` [PATCH v3 1/4] arm/dts: regulator: Add tps65910 " AnilKumar Ch
2012-08-21 15:48   ` Stephen Warren
2012-08-21 16:38     ` Mark Brown
2012-08-21 18:05       ` Stephen Warren
2012-08-21 18:08         ` Mark Brown
2012-08-24 20:16           ` Tony Lindgren
2012-08-27 16:51             ` Mark Brown
2012-08-21 11:17 ` [PATCH v3 2/4] arm/dts: regulator: Add tps65217 " AnilKumar Ch
2012-08-21 11:17 ` [PATCH v3 3/4] arm/dts: Add tps65910 regulator DT data to am335x-evm.dts AnilKumar Ch
2012-08-21 11:17 ` [PATCH v3 4/4] arm/dts: Add tps65217 regulator DT data to am335x-bone.dts AnilKumar Ch
2012-08-23 14:13   ` Koen Kooi
2012-08-24  5:50     ` AnilKumar, Chimata
2012-08-24  6:28       ` Koen Kooi
2012-08-24  7:26         ` AnilKumar, Chimata
2012-08-24  7:56           ` Koen Kooi
2012-08-24  8:02             ` Koen Kooi
2012-08-28  5:34               ` AnilKumar, Chimata
2012-09-05 13:29                 ` Koen Kooi
2012-09-05 14:24                   ` Matt Porter
2012-09-05 14:29                     ` Koen Kooi
2012-09-08  6:38                       ` AnilKumar, Chimata
2012-09-10 16:26                         ` Matt Porter
2012-08-21 13:57 ` [PATCH v3 0/4] Add AM33XX regulators device tree data Mark Brown
2012-08-30 21:01   ` Tony Lindgren

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).