diff mbox

[v4,5/7] ARM: dts: add pbias dt node

Message ID 1386670577-3530-6-git-send-email-balajitk@ti.com (mailing list archive)
State New, archived
Headers show

Commit Message

Balaji T K Dec. 10, 2013, 10:16 a.m. UTC
Add pbias regulator node as a child of system control
module - syscon.

Signed-off-by: Balaji T K <balajitk@ti.com>
---
 arch/arm/boot/dts/dra7.dtsi     |   14 ++++++++++++++
 arch/arm/boot/dts/omap2430.dtsi |   14 ++++++++++++++
 arch/arm/boot/dts/omap3.dtsi    |   14 ++++++++++++++
 arch/arm/boot/dts/omap4.dtsi    |   14 ++++++++++++++
 arch/arm/boot/dts/omap5.dtsi    |   14 ++++++++++++++
 5 files changed, 70 insertions(+), 0 deletions(-)

Comments

Tony Lindgren Dec. 10, 2013, 10:42 p.m. UTC | #1
* Balaji T K <balajitk@ti.com> [131210 02:17]:
> Add pbias regulator node as a child of system control
> module - syscon.
> 
> Signed-off-by: Balaji T K <balajitk@ti.com>
> ---
>  arch/arm/boot/dts/dra7.dtsi     |   14 ++++++++++++++
>  arch/arm/boot/dts/omap2430.dtsi |   14 ++++++++++++++
>  arch/arm/boot/dts/omap3.dtsi    |   14 ++++++++++++++
>  arch/arm/boot/dts/omap4.dtsi    |   14 ++++++++++++++
>  arch/arm/boot/dts/omap5.dtsi    |   14 ++++++++++++++
>  5 files changed, 70 insertions(+), 0 deletions(-)
> 
> diff --git a/arch/arm/boot/dts/dra7.dtsi b/arch/arm/boot/dts/dra7.dtsi
> index d0df4c4..1a52676 100644
> --- a/arch/arm/boot/dts/dra7.dtsi
> +++ b/arch/arm/boot/dts/dra7.dtsi
> @@ -119,6 +119,19 @@
>  			pinctrl-single,function-mask = <0x3fffffff>;
>  		};
>  
> +		tisyscon: tisyscon@4A100600 {
> +			compatible = "ti,control-syscon", "syscon", "simple-bus";
> +			reg = <0x4A002E00 0x4>;

This should map the whole GENERAL area of the SCM register space instead
in one or multiple sections or driver instances. This way the same driver
can be used for the misc SCM registers from other drivers.

If you don't define it that way now, you'll end up with broken child driver
offsets in the .dts files later on.

> +				pbias_regulator: pbias_regulator {
> +					compatible = "regulator-pbias-omap5";
> +					pbias-reg-offset = <0>;
> +					regulator-name = "pbias_regulator";
> +					regulator-min-microvolt = <1800000>;
> +					regulator-max-microvolt = <3000000>;
> +					regulator-enable-ramp-delay = <10>;

Then the pbias_regulator needs to have the standard reg property as an
offset from the SCM GENERAL base address.

Regards,

Tony
--
To unsubscribe from this list: send the line "unsubscribe linux-mmc" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Balaji T K Dec. 12, 2013, 2:58 p.m. UTC | #2
On Wednesday 11 December 2013 04:12 AM, Tony Lindgren wrote:
> * Balaji T K <balajitk@ti.com> [131210 02:17]:
>> Add pbias regulator node as a child of system control
>> module - syscon.
>>
>> Signed-off-by: Balaji T K <balajitk@ti.com>
>> ---
>>   arch/arm/boot/dts/dra7.dtsi     |   14 ++++++++++++++
>>   arch/arm/boot/dts/omap2430.dtsi |   14 ++++++++++++++
>>   arch/arm/boot/dts/omap3.dtsi    |   14 ++++++++++++++
>>   arch/arm/boot/dts/omap4.dtsi    |   14 ++++++++++++++
>>   arch/arm/boot/dts/omap5.dtsi    |   14 ++++++++++++++
>>   5 files changed, 70 insertions(+), 0 deletions(-)
>>
>> diff --git a/arch/arm/boot/dts/dra7.dtsi b/arch/arm/boot/dts/dra7.dtsi
>> index d0df4c4..1a52676 100644
>> --- a/arch/arm/boot/dts/dra7.dtsi
>> +++ b/arch/arm/boot/dts/dra7.dtsi
>> @@ -119,6 +119,19 @@
>>   			pinctrl-single,function-mask = <0x3fffffff>;
>>   		};
>>
>> +		tisyscon: tisyscon@4A100600 {
>> +			compatible = "ti,control-syscon", "syscon", "simple-bus";
>> +			reg = <0x4A002E00 0x4>;
>
> This should map the whole GENERAL area of the SCM register space instead
> in one or multiple sections or driver instances. This way the same driver
> can be used for the misc SCM registers from other drivers.
>
Hi,

OK, make sense, others driver wont have to patch the base address later on.

> If you don't define it that way now, you'll end up with broken child driver
> offsets in the .dts files later on.

yes, Unless someone changes the base and not the offset, given that all are in one dtsi

>
>> +				pbias_regulator: pbias_regulator {
>> +					compatible = "regulator-pbias-omap5";
>> +					pbias-reg-offset = <0>;
>> +					regulator-name = "pbias_regulator";
>> +					regulator-min-microvolt = <1800000>;
>> +					regulator-max-microvolt = <3000000>;
>> +					regulator-enable-ramp-delay = <10>;
>
> Then the pbias_regulator needs to have the standard reg property as an
> offset from the SCM GENERAL base address.

OK

--
To unsubscribe from this list: send the line "unsubscribe linux-mmc" 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/dra7.dtsi b/arch/arm/boot/dts/dra7.dtsi
index d0df4c4..1a52676 100644
--- a/arch/arm/boot/dts/dra7.dtsi
+++ b/arch/arm/boot/dts/dra7.dtsi
@@ -119,6 +119,19 @@ 
 			pinctrl-single,function-mask = <0x3fffffff>;
 		};
 
+		tisyscon: tisyscon@4A100600 {
+			compatible = "ti,control-syscon", "syscon", "simple-bus";
+			reg = <0x4A002E00 0x4>;
+				pbias_regulator: pbias_regulator {
+					compatible = "regulator-pbias-omap5";
+					pbias-reg-offset = <0>;
+					regulator-name = "pbias_regulator";
+					regulator-min-microvolt = <1800000>;
+					regulator-max-microvolt = <3000000>;
+					regulator-enable-ramp-delay = <10>;
+			};
+		};
+
 		sdma: dma-controller@4a056000 {
 			compatible = "ti,omap4430-sdma";
 			reg = <0x4a056000 0x1000>;
@@ -485,6 +498,7 @@ 
 			dmas = <&sdma 61>, <&sdma 62>;
 			dma-names = "tx", "rx";
 			status = "disabled";
+			pbias-supply = <&pbias_regulator>;
 		};
 
 		mmc2: mmc@480b4000 {
diff --git a/arch/arm/boot/dts/omap2430.dtsi b/arch/arm/boot/dts/omap2430.dtsi
index d624345..7d084c4 100644
--- a/arch/arm/boot/dts/omap2430.dtsi
+++ b/arch/arm/boot/dts/omap2430.dtsi
@@ -29,6 +29,19 @@ 
 			pinctrl-single,function-mask = <0x3f>;
 		};
 
+		tisyscon: tisyscon@490024A0 {
+			compatible = "ti,control-syscon", "syscon", "simple-bus";
+			reg = <0x490024A0 0x4>;
+				pbias_regulator: pbias_regulator {
+					compatible = "regulator-pbias-omap2";
+					pbias-reg-offset = <0>;
+					regulator-name = "pbias_regulator";
+					regulator-min-microvolt = <1800000>;
+					regulator-max-microvolt = <3000000>;
+					regulator-enable-ramp-delay = <100>;
+			};
+		};
+
 		gpio1: gpio@4900c000 {
 			compatible = "ti,omap2-gpio";
 			reg = <0x4900c000 0x200>;
@@ -183,6 +196,7 @@ 
 			ti,dual-volt;
 			dmas = <&sdma 61>, <&sdma 62>;
 			dma-names = "tx", "rx";
+			pbias-supply = <&pbias_regulator>;
 		};
 
 		mmc2: mmc@480b4000 {
diff --git a/arch/arm/boot/dts/omap3.dtsi b/arch/arm/boot/dts/omap3.dtsi
index daabf99..88f0179 100644
--- a/arch/arm/boot/dts/omap3.dtsi
+++ b/arch/arm/boot/dts/omap3.dtsi
@@ -137,6 +137,19 @@ 
 			pinctrl-single,function-mask = <0xff1f>;
 		};
 
+		tisyscon: tisyscon@48002520 {
+			compatible = "ti,control-syscon", "syscon", "simple-bus";
+			reg = <0x48002520 0x4>;
+				pbias_regulator: pbias_regulator {
+					compatible = "regulator-pbias-omap3";
+					pbias-reg-offset = <0>;
+					regulator-name = "pbias_regulator";
+					regulator-min-microvolt = <1800000>;
+					regulator-max-microvolt = <3000000>;
+					regulator-enable-ramp-delay = <100>;
+			};
+		};
+
 		gpio1: gpio@48310000 {
 			compatible = "ti,omap3-gpio";
 			reg = <0x48310000 0x200>;
@@ -351,6 +364,7 @@ 
 			ti,dual-volt;
 			dmas = <&sdma 61>, <&sdma 62>;
 			dma-names = "tx", "rx";
+			pbias-supply = <&pbias_regulator>;
 		};
 
 		mmc2: mmc@480b4000 {
diff --git a/arch/arm/boot/dts/omap4.dtsi b/arch/arm/boot/dts/omap4.dtsi
index a1e0585..09e8d52 100644
--- a/arch/arm/boot/dts/omap4.dtsi
+++ b/arch/arm/boot/dts/omap4.dtsi
@@ -134,6 +134,19 @@ 
 			pinctrl-single,function-mask = <0x7fff>;
 		};
 
+		tisyscon: tisyscon@4A100600 {
+			compatible = "ti,control-syscon", "syscon", "simple-bus";
+			reg = <0x4A100600 0x4>;
+				pbias_regulator: pbias_regulator {
+					compatible = "regulator-pbias-omap4";
+					pbias-reg-offset = <0>;
+					regulator-name = "pbias_regulator";
+					regulator-min-microvolt = <1800000>;
+					regulator-max-microvolt = <3000000>;
+					regulator-enable-ramp-delay = <10>;
+			};
+		};
+
 		sdma: dma-controller@4a056000 {
 			compatible = "ti,omap4430-sdma";
 			reg = <0x4a056000 0x1000>;
@@ -367,6 +380,7 @@ 
 			ti,needs-special-reset;
 			dmas = <&sdma 61>, <&sdma 62>;
 			dma-names = "tx", "rx";
+			pbias-supply = <&pbias_regulator>;
 		};
 
 		mmc2: mmc@480b4000 {
diff --git a/arch/arm/boot/dts/omap5.dtsi b/arch/arm/boot/dts/omap5.dtsi
index fc3fad5..93edb2e 100644
--- a/arch/arm/boot/dts/omap5.dtsi
+++ b/arch/arm/boot/dts/omap5.dtsi
@@ -130,6 +130,19 @@ 
 			pinctrl-single,function-mask = <0x7fff>;
 		};
 
+		tisyscon: tisyscon@4A002E00 {
+			compatible = "ti,control-syscon", "syscon", "simple-bus";
+			reg = <0x4A002E00 0x4>;
+				pbias_regulator: pbias_regulator {
+					compatible = "regulator-pbias-omap5";
+					pbias-reg-offset = <0>;
+					regulator-name = "pbias_regulator";
+					regulator-min-microvolt = <1800000>;
+					regulator-max-microvolt = <3000000>;
+					regulator-enable-ramp-delay = <10>;
+			};
+		};
+
 		sdma: dma-controller@4a056000 {
 			compatible = "ti,omap4430-sdma";
 			reg = <0x4a056000 0x1000>;
@@ -409,6 +422,7 @@ 
 			ti,needs-special-reset;
 			dmas = <&sdma 61>, <&sdma 62>;
 			dma-names = "tx", "rx";
+			pbias-supply = <&pbias_regulator>;
 		};
 
 		mmc2: mmc@480b4000 {