diff mbox

ARM: tegra: cardhu: add dt entry for PMIC TPS65911.

Message ID 1341414479-6446-1-git-send-email-ldewangan@nvidia.com
State Superseded, archived
Headers show

Commit Message

Laxman Dewangan July 4, 2012, 3:07 p.m. UTC
Tegra30 based platform "cardhu" have the power management
IC TPS65911 for the regulator.
Adding DT entry for this device.

Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
---
Enabling the gpio/regulators of this device.

 arch/arm/boot/dts/tegra30-cardhu.dts |  121 ++++++++++++++++++++++++++++++++++
 1 files changed, 121 insertions(+), 0 deletions(-)

Comments

Stephen Warren July 5, 2012, 7:16 p.m. UTC | #1
On 07/04/2012 09:07 AM, Laxman Dewangan wrote:
> Tegra30 based platform "cardhu" have the power management
> IC TPS65911 for the regulator.
> Adding DT entry for this device.
> 
> Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>

I recall there were some differences between Cardhu A02 and A04. Does
this patch apply equally to both?

Please have a look at the recent threads re: various Tegra20 boards'
regulator .dts files, and see the results at:

git://nv-tegra.nvidia.com/user/swarren/linux-2.6 linux-next_common

Most of these comments are driven by comments made in the review of
those patches.

In the patch description, can you please specify where you got all the
values from, and any discrepancies.

> diff --git a/arch/arm/boot/dts/tegra30-cardhu.dts b/arch/arm/boot/dts/tegra30-cardhu.dts

> +				vdd1_reg: regulator@0 {
> +					reg = <0>;
> +					regulator-compatible = "vdd1";
> +					regulator-name = "vdd_1v2_gen";

It'd be good to list all the signals that these regulators drive
directly; the schematics "rename" the signals quite a lot.

> +					regulator-min-microvolt = < 600000>;
> +					regulator-max-microvolt = <1500000>;

Similarly, the contraints should list the exact voltage that's required
of the regulators, not a range. Right now, there is no DVFS in the
mainline kernel, so even for rails where DVFS could be used in the
future, we should specify the single voltage we want these rails to run
at without DVFS for now.

> +					regulator-always-on;
> +					regulator-boot-on;

These properties aren't in the same order in all the nodes. It'd be nice
to have them ordered the same way everywhere.

I'm not sure if it really makes sense to specify regulator-boot-on,
since there's no way to know what SW has run before the kernel which
might have turned off the regulator; regulator-always-on seems to cover
all necessary use-cases.
--
To unsubscribe from this list: send the line "unsubscribe linux-tegra" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Laxman Dewangan July 6, 2012, 10:07 a.m. UTC | #2
On Friday 06 July 2012 12:46 AM, Stephen Warren wrote:
> On 07/04/2012 09:07 AM, Laxman Dewangan wrote:
>> Tegra30 based platform "cardhu" have the power management
>> IC TPS65911 for the regulator.
>> Adding DT entry for this device.
>>
>> Signed-off-by: Laxman Dewangan<ldewangan@nvidia.com>
> I recall there were some differences between Cardhu A02 and A04. Does
> this patch apply equally to both?

Yes, this piece is common. I already sent the splitting A02 and A04 
which is having some differences in the fixed regulator GPIOs. It is 
pending for internal review.

> Please have a look at the recent threads re: various Tegra20 boards'
> regulator .dts files, and see the results at:
>
> git://nv-tegra.nvidia.com/user/swarren/linux-2.6 linux-next_common
>
> Most of these comments are driven by comments made in the review of
> those patches.
>
> In the patch description, can you please specify where you got all the
> values from, and any discrepancies.

Ok, I will do.

>> diff --git a/arch/arm/boot/dts/tegra30-cardhu.dts b/arch/arm/boot/dts/tegra30-cardhu.dts
>> +				vdd1_reg: regulator@0 {
>> +					reg =<0>;
>> +					regulator-compatible = "vdd1";
>> +					regulator-name = "vdd_1v2_gen";
> It'd be good to list all the signals that these regulators drive
> directly; the schematics "rename" the signals quite a lot.

Will add wherever it is possible.

>> +					regulator-min-microvolt =<  600000>;
>> +					regulator-max-microvolt =<1500000>;
> Similarly, the contraints should list the exact voltage that's required
> of the regulators, not a range. Right now, there is no DVFS in the
> mainline kernel, so even for rails where DVFS could be used in the
> future, we should specify the single voltage we want these rails to run
> at without DVFS for now.
>
Fine, will provide the one voltage.
>> +					regulator-always-on;
>> +					regulator-boot-on;
> These properties aren't in the same order in all the nodes. It'd be nice
> to have them ordered the same way everywhere.
>
> I'm not sure if it really makes sense to specify regulator-boot-on,
> since there's no way to know what SW has run before the kernel which
> might have turned off the regulator; regulator-always-on seems to cover
> all necessary use-cases.

--
To unsubscribe from this list: send the line "unsubscribe linux-tegra" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/arch/arm/boot/dts/tegra30-cardhu.dts b/arch/arm/boot/dts/tegra30-cardhu.dts
index c169bce..e769434 100644
--- a/arch/arm/boot/dts/tegra30-cardhu.dts
+++ b/arch/arm/boot/dts/tegra30-cardhu.dts
@@ -126,6 +126,127 @@ 
 			ti,vsel0-state-high;
 			ti,vsel1-state-high;
 		};
+
+		tps65911: tps65911@2d {
+			compatible = "ti,tps65911";
+			reg = <0x2d>;
+
+			#gpio-cells = <2>;
+			gpio-controller;
+
+			regulators {
+				#address-cells = <1>;
+				#size-cells = <0>;
+
+				vdd1_reg: regulator@0 {
+					reg = <0>;
+					regulator-compatible = "vdd1";
+					regulator-name = "vdd_1v2_gen";
+					regulator-min-microvolt = < 600000>;
+					regulator-max-microvolt = <1500000>;
+					regulator-always-on;
+					regulator-boot-on;
+				};
+
+				vdd2_reg: regulator@1 {
+					reg = <1>;
+					regulator-compatible = "vdd2";
+					regulator-name = "vdd_1v5_gen";
+					regulator-min-microvolt = < 600000>;
+					regulator-max-microvolt = <1500000>;
+					regulator-boot-on;
+					regulator-always-on;
+				};
+
+				vddctrl_reg: regulator@2 {
+					reg = <2>;
+					regulator-compatible = "vddctrl";
+					regulator-name = "vdd_1v0_gen";
+					regulator-min-microvolt = < 600000>;
+					regulator-max-microvolt = <1400000>;
+					regulator-always-on;
+					regulator-boot-on;
+				};
+
+				vio_reg: regulator@3 {
+					reg = <3>;
+					regulator-compatible = "vio";
+					regulator-name = "vdd_1v8_gen";
+					regulator-min-microvolt = <1800000>;
+					regulator-max-microvolt = <1800000>;
+					regulator-always-on;
+					regulator-boot-on;
+				};
+
+				ldo1_reg: regulator@4 {
+					reg = <4>;
+					regulator-compatible = "ldo1";
+					regulator-name = "vdd_pmu_ldo1";
+					regulator-min-microvolt = <1000000>;
+					regulator-max-microvolt = <3300000>;
+				};
+
+				ldo2_reg: regulator@5 {
+					reg = <5>;
+					regulator-compatible = "ldo2";
+					regulator-name = "vdd_pmu_ldo2";
+					regulator-min-microvolt = <1050000>;
+					regulator-max-microvolt = <1050000>;
+				};
+
+				ldo3_reg: regulator@6 {
+					reg = <6>;
+					regulator-compatible = "ldo3";
+					regulator-name = "vdd_pmu_ldo3";
+					regulator-min-microvolt = <1000000>;
+					regulator-max-microvolt = <3300000>;
+				};
+
+				ldo4_reg: regulator@7 {
+					reg = <7>;
+					regulator-compatible = "ldo4";
+					regulator-name = "vdd_pmu_ldo4";
+					regulator-min-microvolt = <1000000>;
+					regulator-max-microvolt = <3300000>;
+					regulator-always-on;
+				};
+
+				ldo5_reg: regulator@8 {
+					reg = <8>;
+					regulator-compatible = "ldo5";
+					regulator-name = "vdd_pmu_ldo5";
+					regulator-min-microvolt = <1000000>;
+					regulator-max-microvolt = <3300000>;
+				};
+
+				ldo6_reg: regulator@9 {
+					reg = <9>;
+					regulator-compatible = "ldo6";
+					regulator-name = "vdd_pmu_ldo6";
+					regulator-min-microvolt = <1200000>;
+					regulator-max-microvolt = <1200000>;
+				};
+
+				ldo7_reg: regulator@10 {
+					reg = <10>;
+					regulator-compatible = "ldo7";
+					regulator-name = "vdd_pmu_ldo7";
+					regulator-min-microvolt = <1200000>;
+					regulator-max-microvolt = <1200000>;
+					regulator-always-on;
+					regulator-boot-on;
+				};
+
+				ldo8_reg: regulator@11 {
+					reg = <11>;
+					regulator-compatible = "ldo8";
+					regulator-name = "vdd_pmu_ldo8";
+					regulator-min-microvolt = <1000000>;
+					regulator-max-microvolt = <3300000>;
+					regulator-always-on;
+				};
+			};
+		};
 	};
 
 	ahub {