diff mbox

[V2,9/9] ARM: dts: tegra: add the PM configurations of PMC

Message ID 1363061043-9680-1-git-send-email-josephl@nvidia.com (mailing list archive)
State New, archived
Headers show

Commit Message

Joseph Lo March 12, 2013, 4:04 a.m. UTC
Adding the PM configuration of PMC when the platform support suspend
function.

Signed-off-by: Joseph Lo <josephl@nvidia.com>
---
V2:
* no change
---
 arch/arm/boot/dts/tegra20-harmony.dts   | 6 ++++++
 arch/arm/boot/dts/tegra20-paz00.dts     | 7 +++++++
 arch/arm/boot/dts/tegra20-seaboard.dts  | 6 ++++++
 arch/arm/boot/dts/tegra20-trimslice.dts | 9 +++++++++
 arch/arm/boot/dts/tegra20-ventana.dts   | 6 ++++++
 arch/arm/boot/dts/tegra20-whistler.dts  | 8 ++++++++
 arch/arm/boot/dts/tegra30-beaver.dts    | 7 +++++++
 arch/arm/boot/dts/tegra30-cardhu.dtsi   | 7 +++++++
 8 files changed, 56 insertions(+)

Comments

Marc Dietrich March 12, 2013, 10:43 a.m. UTC | #1
Joseph,

Am Dienstag, 12. März 2013, 12:04:03 schrieb Joseph Lo:
> Adding the PM configuration of PMC when the platform support suspend
> function.
> 
> Signed-off-by: Joseph Lo <josephl@nvidia.com>
> ---
> V2:
> * no change
> ---
>  arch/arm/boot/dts/tegra20-harmony.dts   | 6 ++++++
>  arch/arm/boot/dts/tegra20-paz00.dts     | 7 +++++++
>  arch/arm/boot/dts/tegra20-seaboard.dts  | 6 ++++++
>  arch/arm/boot/dts/tegra20-trimslice.dts | 9 +++++++++
>  arch/arm/boot/dts/tegra20-ventana.dts   | 6 ++++++
>  arch/arm/boot/dts/tegra20-whistler.dts  | 8 ++++++++
>  arch/arm/boot/dts/tegra30-beaver.dts    | 7 +++++++
>  arch/arm/boot/dts/tegra30-cardhu.dtsi   | 7 +++++++
>  8 files changed, 56 insertions(+)
> 
> [...]
>
> diff --git a/arch/arm/boot/dts/tegra20-paz00.dts
> b/arch/arm/boot/dts/tegra20-paz00.dts index 41e82e3..cd8e798 100644
> --- a/arch/arm/boot/dts/tegra20-paz00.dts
> +++ b/arch/arm/boot/dts/tegra20-paz00.dts
> @@ -415,6 +415,13 @@
> 
>  	pmc {
>  		nvidia,invert-interrupt;
> +		nvidia,suspend-mode = <2>;
> +		nvidia,cpu-pwr-good-time = <5000>;

should be 2000

> +		nvidia,cpu-pwr-off-time = <5000>;

should be 0

> +		nvidia,core-pwr-good-time = <3845 3845>;

mmh, no idea here. original source [1] shows 0x7e7e ticks which translates to 
1 sec?

> +		nvidia,core-pwr-off-time = <3875>;

should be 0

> +		nvidia,sys-clock-req-active-high;
> +		nvidia,combined-power-req;

paz00 has no combined power req.

>  	};
> 
>  	usb@c5000000 {

[1]: http://gitorious.org/ac100/kernel/blobs/2.6.32/arch/arm/mach-tegra/odm_kit/query/paz00/nvodm_query.c#line649

Marc
Joseph Lo March 13, 2013, 2:43 a.m. UTC | #2
Hi Marc,

On Tue, 2013-03-12 at 18:43 +0800, Marc Dietrich wrote:
> Am Dienstag, 12. März 2013, 12:04:03 schrieb Joseph Lo:
> > Adding the PM configuration of PMC when the platform support suspend
> > function.
> > 
> > Signed-off-by: Joseph Lo <josephl@nvidia.com>
> > ---
> > V2:
> > * no change
> > ---
> >  arch/arm/boot/dts/tegra20-harmony.dts   | 6 ++++++
> >  arch/arm/boot/dts/tegra20-paz00.dts     | 7 +++++++
> >  arch/arm/boot/dts/tegra20-seaboard.dts  | 6 ++++++
> >  arch/arm/boot/dts/tegra20-trimslice.dts | 9 +++++++++
> >  arch/arm/boot/dts/tegra20-ventana.dts   | 6 ++++++
> >  arch/arm/boot/dts/tegra20-whistler.dts  | 8 ++++++++
> >  arch/arm/boot/dts/tegra30-beaver.dts    | 7 +++++++
> >  arch/arm/boot/dts/tegra30-cardhu.dtsi   | 7 +++++++
> >  8 files changed, 56 insertions(+)
> > 
> > [...]
> >
> > diff --git a/arch/arm/boot/dts/tegra20-paz00.dts
> > b/arch/arm/boot/dts/tegra20-paz00.dts index 41e82e3..cd8e798 100644
> > --- a/arch/arm/boot/dts/tegra20-paz00.dts
> > +++ b/arch/arm/boot/dts/tegra20-paz00.dts
> > @@ -415,6 +415,13 @@
> > 
> >  	pmc {
> >  		nvidia,invert-interrupt;
> > +		nvidia,suspend-mode = <2>;
> > +		nvidia,cpu-pwr-good-time = <5000>;
> 
> should be 2000
> 
> > +		nvidia,cpu-pwr-off-time = <5000>;
> 
> should be 0
> 
> > +		nvidia,core-pwr-good-time = <3845 3845>;
> 
> mmh, no idea here. original source [1] shows 0x7e7e ticks which translates to 
> 1 sec?
> 
The ticks was based on the 32KHz clock domain. I translate it to uS.

> > +		nvidia,core-pwr-off-time = <3875>;
> 
> should be 0
> 
> > +		nvidia,sys-clock-req-active-high;
> > +		nvidia,combined-power-req;
> 
> paz00 has no combined power req.
> 
> >  	};
> > 
> >  	usb@c5000000 {
> 
> [1]: http://gitorious.org/ac100/kernel/blobs/2.6.32/arch/arm/mach-tegra/odm_kit/query/paz00/nvodm_query.c#line649
> 
Thanks for your review and point me out the detail information about
paz00 board.

Joseph
Stephen Warren March 13, 2013, 4:14 a.m. UTC | #3
On 03/12/2013 08:43 PM, Joseph Lo wrote:
> Hi Marc,
> 
> On Tue, 2013-03-12 at 18:43 +0800, Marc Dietrich wrote:
>> Am Dienstag, 12. März 2013, 12:04:03 schrieb Joseph Lo:
>>> Adding the PM configuration of PMC when the platform support suspend
>>> function.

>>> +		nvidia,core-pwr-good-time = <3845 3845>;
>>
>> mmh, no idea here. original source [1] shows 0x7e7e ticks which translates to 
>> 1 sec?
>>
> The ticks was based on the 32KHz clock domain. I translate it to uS.

>>> 0x7e7e * (1.0/32000) * 1000000
1011937.4999999999

Oh, I suppose perhaps the 0x7e7e value is both values packed together,
so this should be:

>>> 0x7e * (1.0/32000) * 1000000
3937.5
Joseph Lo March 13, 2013, 4:57 a.m. UTC | #4
On Wed, 2013-03-13 at 12:14 +0800, Stephen Warren wrote:
> On 03/12/2013 08:43 PM, Joseph Lo wrote:
> > Hi Marc,
> > 
> > On Tue, 2013-03-12 at 18:43 +0800, Marc Dietrich wrote:
> >> Am Dienstag, 12. März 2013, 12:04:03 schrieb Joseph Lo:
> >>> Adding the PM configuration of PMC when the platform support suspend
> >>> function.
> 
> >>> +		nvidia,core-pwr-good-time = <3845 3845>;
> >>
> >> mmh, no idea here. original source [1] shows 0x7e7e ticks which translates to 
> >> 1 sec?
> >>
> > The ticks was based on the 32KHz clock domain. I translate it to uS.
> 
> >>> 0x7e7e * (1.0/32000) * 1000000
> 1011937.4999999999
> 
> Oh, I suppose perhaps the 0x7e7e value is both values packed together,
> so this should be:
> 
> >>> 0x7e * (1.0/32000) * 1000000
> 3937.5
Yes.

0x7e * (1.0/32768) * 1000000 = 3845

Thanks,
Joseph
diff mbox

Patch

diff --git a/arch/arm/boot/dts/tegra20-harmony.dts b/arch/arm/boot/dts/tegra20-harmony.dts
index 3532853..06f4f68 100644
--- a/arch/arm/boot/dts/tegra20-harmony.dts
+++ b/arch/arm/boot/dts/tegra20-harmony.dts
@@ -416,6 +416,12 @@ 
 
 	pmc {
 		nvidia,invert-interrupt;
+		nvidia,suspend-mode = <2>;
+		nvidia,cpu-pwr-good-time = <5000>;
+		nvidia,cpu-pwr-off-time = <5000>;
+		nvidia,core-pwr-good-time = <3845 3845>;
+		nvidia,core-pwr-off-time = <3875>;
+		nvidia,sys-clock-req-active-high;
 	};
 
 	usb@c5000000 {
diff --git a/arch/arm/boot/dts/tegra20-paz00.dts b/arch/arm/boot/dts/tegra20-paz00.dts
index 41e82e3..cd8e798 100644
--- a/arch/arm/boot/dts/tegra20-paz00.dts
+++ b/arch/arm/boot/dts/tegra20-paz00.dts
@@ -415,6 +415,13 @@ 
 
 	pmc {
 		nvidia,invert-interrupt;
+		nvidia,suspend-mode = <2>;
+		nvidia,cpu-pwr-good-time = <5000>;
+		nvidia,cpu-pwr-off-time = <5000>;
+		nvidia,core-pwr-good-time = <3845 3845>;
+		nvidia,core-pwr-off-time = <3875>;
+		nvidia,sys-clock-req-active-high;
+		nvidia,combined-power-req;
 	};
 
 	usb@c5000000 {
diff --git a/arch/arm/boot/dts/tegra20-seaboard.dts b/arch/arm/boot/dts/tegra20-seaboard.dts
index fd0e1cf..fd2a109 100644
--- a/arch/arm/boot/dts/tegra20-seaboard.dts
+++ b/arch/arm/boot/dts/tegra20-seaboard.dts
@@ -517,6 +517,12 @@ 
 
 	pmc {
 		nvidia,invert-interrupt;
+		nvidia,suspend-mode = <2>;
+		nvidia,cpu-pwr-good-time = <5000>;
+		nvidia,cpu-pwr-off-time = <5000>;
+		nvidia,core-pwr-good-time = <3845 3845>;
+		nvidia,core-pwr-off-time = <3875>;
+		nvidia,sys-clock-req-active-high;
 	};
 
 	memory-controller@7000f400 {
diff --git a/arch/arm/boot/dts/tegra20-trimslice.dts b/arch/arm/boot/dts/tegra20-trimslice.dts
index 3cfd9ed..e210b24 100644
--- a/arch/arm/boot/dts/tegra20-trimslice.dts
+++ b/arch/arm/boot/dts/tegra20-trimslice.dts
@@ -300,6 +300,15 @@ 
 		};
 	};
 
+	pmc {
+		nvidia,suspend-mode = <2>;
+		nvidia,cpu-pwr-good-time = <5000>;
+		nvidia,cpu-pwr-off-time = <5000>;
+		nvidia,core-pwr-good-time = <3845 3845>;
+		nvidia,core-pwr-off-time = <3875>;
+		nvidia,sys-clock-req-active-high;
+	};
+
 	usb@c5000000 {
 		status = "okay";
 		nvidia,vbus-gpio = <&gpio 170 0>; /* gpio PV2 */
diff --git a/arch/arm/boot/dts/tegra20-ventana.dts b/arch/arm/boot/dts/tegra20-ventana.dts
index 826a6cc..0d6b8d7 100644
--- a/arch/arm/boot/dts/tegra20-ventana.dts
+++ b/arch/arm/boot/dts/tegra20-ventana.dts
@@ -493,6 +493,12 @@ 
 
 	pmc {
 		nvidia,invert-interrupt;
+		nvidia,suspend-mode = <2>;
+		nvidia,cpu-pwr-good-time = <2000>;
+		nvidia,cpu-pwr-off-time = <100>;
+		nvidia,core-pwr-good-time = <3845 3845>;
+		nvidia,core-pwr-off-time = <458>;
+		nvidia,sys-clock-req-active-high;
 	};
 
 	usb@c5000000 {
diff --git a/arch/arm/boot/dts/tegra20-whistler.dts b/arch/arm/boot/dts/tegra20-whistler.dts
index 847383f..073e65a 100644
--- a/arch/arm/boot/dts/tegra20-whistler.dts
+++ b/arch/arm/boot/dts/tegra20-whistler.dts
@@ -496,6 +496,14 @@ 
 
 	pmc {
 		nvidia,invert-interrupt;
+		nvidia,suspend-mode = <2>;
+		nvidia,cpu-pwr-good-time = <2000>;
+		nvidia,cpu-pwr-off-time = <1000>;
+		nvidia,core-pwr-good-time = <0 3845>;
+		nvidia,core-pwr-off-time = <93727>;
+		nvidia,core-power-req-active-high;
+		nvidia,sys-clock-req-active-high;
+		nvidia,combined-power-req;
 	};
 
 	usb@c5000000 {
diff --git a/arch/arm/boot/dts/tegra30-beaver.dts b/arch/arm/boot/dts/tegra30-beaver.dts
index 89eb495..698a634 100644
--- a/arch/arm/boot/dts/tegra30-beaver.dts
+++ b/arch/arm/boot/dts/tegra30-beaver.dts
@@ -253,6 +253,13 @@ 
 	pmc {
 		status = "okay";
 		nvidia,invert-interrupt;
+		nvidia,suspend-mode = <2>;
+		nvidia,cpu-pwr-good-time = <2000>;
+		nvidia,cpu-pwr-off-time = <200>;
+		nvidia,core-pwr-good-time = <3845 3845>;
+		nvidia,core-pwr-off-time = <0>;
+		nvidia,core-power-req-active-high;
+		nvidia,sys-clock-req-active-high;
 	};
 
 	sdhci@78000000 {
diff --git a/arch/arm/boot/dts/tegra30-cardhu.dtsi b/arch/arm/boot/dts/tegra30-cardhu.dtsi
index b448fca..4e26020 100644
--- a/arch/arm/boot/dts/tegra30-cardhu.dtsi
+++ b/arch/arm/boot/dts/tegra30-cardhu.dtsi
@@ -307,6 +307,13 @@ 
 	pmc {
 		status = "okay";
 		nvidia,invert-interrupt;
+		nvidia,suspend-mode = <2>;
+		nvidia,cpu-pwr-good-time = <2000>;
+		nvidia,cpu-pwr-off-time = <200>;
+		nvidia,core-pwr-good-time = <3845 3845>;
+		nvidia,core-pwr-off-time = <0>;
+		nvidia,core-power-req-active-high;
+		nvidia,sys-clock-req-active-high;
 	};
 
 	sdhci@78000000 {