omap3: Add basic support for 720MHz part
Subsystems (3)
PATCH 1/1 omap3: Add basic support for 720MHz part
This patch adds support for new speed enhanced parts with ARM and IVA running at 720MHz and 520MHz respectively. These parts can be probed at run-time by reading PRODID.SKUID[3:0] at 0x4830A20C [1].
This patch specifically does following:
* Detect devices capable of 720MHz.
* Add new OPP
* Ensure that OPP is conditionally enabled.
* Check for presence of IVA before attempting to enable the corresponding OPP.
[1] http://focus.ti.com/lit/ug/spruff1d/spruff1d.pdf
---
Since v2:
1) pr_xxx() -> dev_xxx() functions - suggested by Manjunath ([email protected])
2) Add check for presense of IVA - earlier planned to be in a separate patch; but we multiple discussions on optimizations.
3) Do look-up for hwmod corresponding for iva only if iva is present. Should save multiple strcmp()s in _lookup().
Since v1:
1) Using opp_enable() to enable the OPP after the OPP table has been initialized.
2) Starting at 3 levels of indent, the statements had be broken into multiple lines for most of the code. So, opted to create a new static that enables the OPPs corresponding to 720MHz.
3) I have only build tested this patch - will be able to confirm working tomorrow. With any further change, if needed. (However, functionally nothing has changed.)
arch/arm/mach-omap2/control.h | 7 ++++ arch/arm/mach-omap2/id.c | 10 +++++ arch/arm/mach-omap2/opp3xxx_data.c | 63 ++++++++++++++++++++++++++++++++- arch/arm/plat-omap/include/plat/cpu.h | 2 + 4 files changed, 81 insertions(+), 1 deletions(-)
arch/arm/mach-omap2/control.h +7 -0
@@ -365,6 +365,13 @@#define FEAT_NEON 0#define FEAT_NEON_NONE 1 +/* +* Product ID register +*/ +#define OMAP3_PRODID 0x020C + +#define OMAP3_SKUID_MASK 0x0f +#define OMAP3_SKUID_720MHZ 0x08#ifndef __ASSEMBLY__#ifdef CONFIG_ARCH_OMAP2PLUS
arch/arm/mach-omap2/id.c +10 -0
@@ -195,6 +195,15 @@ static void __init omap3_check_features(void)* TODO: Get additional info (where applicable) * e.g. Size of L2 cache. */ + +/* +* Does it support 720MHz? +*/ + status = (OMAP3_SKUID_MASK &read_tap_reg (OMAP3_PRODID )); + +if (status &OMAP3_SKUID_720MHZ ) { + omap3_features |=OMAP3_HAS_720MHZ ; + } }static void __init omap3_check_revision (void )
@@ -445,6 +454,7 @@ static void __init omap3_cpuinfo(void)OMAP3_SHOW_FEATURE (neon);OMAP3_SHOW_FEATURE (isp); OMAP3_SHOW_FEATURE(192mhz_clk); + OMAP3_SHOW_FEATURE(720mhz);printk (")\n" ); }
arch/arm/mach-omap2/opp3xxx_data.c +62 -1
98 lines not on this page · raw message
arch/arm/plat-omap/include/plat/cpu.h +2 -0
@@ -455,6 +455,7 @@ extern u32 omap3_features;#define OMAP3_HAS_ISP BIT(4)#define OMAP3_HAS_192MHZ_CLK BIT(5)#define OMAP3_HAS_IO_WAKEUP BIT(6) +#define OMAP3_HAS_720MHZ BIT(7)#define OMAP3_HAS_FEATURE (feat,flag) \ static inline unsigned int omap3_has_ ##feat(void) \
@@ -469,5 +470,6 @@ OMAP3_HAS_FEATURE(neon, NEON) OMAP3_HAS_FEATURE(isp, ISP) OMAP3_HAS_FEATURE(192mhz_clk, 192MHZ_CLK) OMAP3_HAS_FEATURE(io_wakeup, IO_WAKEUP) +OMAP3_HAS_FEATURE(720mhz, 720MHZ)#endif
Signature · 1 line
1.7.2.2
Couple of minor comments.
Quoted 49 lines · Sanjeev Premi
This patch adds support for new speed enhanced parts with ARM and IVA running at 720MHz and 520MHz respectively. These parts can be probed at run-time by reading PRODID.SKUID[3:0] at
0x4830A20C[1].This patch specifically does following:
* Detect devices capable of 720MHz.
* Add new OPP
* Ensure that OPP is conditionally enabled.
* Check for presence of IVA before attempting to enable the corresponding OPP.[1] http://focus.ti.com/lit/ug/spruff1d/spruff1d.pdf
Signed-off-by Sanjeev Premi <[email protected]>---
Since v2:
1)pr_xxx()->dev_xxx()functions - suggested by Manjunath ([email protected])
2) Add check for presense of IVA - earlier planned to be in a separate patch; but we multiple discussions on optimizations.
3) Do look-up for hwmod corresponding for iva only if iva is present. Should save multiple strcmp()s in_lookup().Since v1:
1) Usingopp_enable()to enable the OPP after the OPP table has been initialized.
2) Starting at 3 levels of indent, the statements had be broken into multiple lines for most of the code. So, opted to create a new static that enables the OPPs corresponding to 720MHz.
3) I have only build tested this patch - will be able to confirm working tomorrow. With any further change, if needed. (However, functionally nothing has changed.)arch/arm/mach-omap2/control.h | 7 ++++
arch/arm/mach-omap2/id.c| 10 +++++arch/arm/mach-omap2/opp3xxx_data.c| 63 ++++++++++++++++++++++++++++++++-arch/arm/plat-omap/include/plat/cpu.h| 2 +4 files changed, 81 insertions(+), 1 deletions(-)arch/arm/mach-omap2/control.h +0
-0
arch/arm/mach-omap2/control.h line 370
Quoted 6 lines
arch/arm/mach-omap2/control.h +3
-0@@ -365,6 +365,13 @@ #define FEAT_NEON 0 #define FEAT_NEON_NONE 1 +/* +* Product ID register +*/
Do not use multiline comment style for single line comments
Quoted 12 lines
arch/arm/mach-omap2/control.h +4
-0+#define OMAP3_PRODID 0x020C + +#define OMAP3_SKUID_MASK 0x0f +#define OMAP3_SKUID_720MHZ 0x08 #ifndef __ASSEMBLY__ #ifdef CONFIG_ARCH_OMAP2PLUSarch/arm/mach-omap2/id.c +0
-0
arch/arm/mach-omap2/id.c static void __init omap3_check_features(void) · line 201
Quoted 7 lines
arch/arm/mach-omap2/id.c +4
-0@@ -195,6 +195,15 @@ static void __init omap3_check_features(void)* TODO: Get additional info (where applicable) * e.g. Size of L2 cache. */ + + /* +* Does it support 720MHz? +*/
Ditto
arch/arm/mach-omap2/id.c static void __init omap3_check_features(void) · line 206
Quoted 5 lines
arch/arm/mach-omap2/id.c +5
-0+ status = (OMAP3_SKUID_MASK & read_tap_reg(OMAP3_PRODID)); + + if (status & OMAP3_SKUID_720MHZ) { + omap3_features |= OMAP3_HAS_720MHZ; + }
No need of { } as there is only one line statement inside the if condition.
arch/arm/mach-omap2/id.c static void __init omap3_cpuinfo(void) · line 460
Quoted 11 lines
arch/arm/mach-omap2/id.c +1
-0} static void __init omap3_check_revision(void)@@ -445,6 +454,7 @@ static void __init omap3_cpuinfo(void) OMAP3_SHOW_FEATURE(neon); OMAP3_SHOW_FEATURE(isp); OMAP3_SHOW_FEATURE(192mhz_clk); + OMAP3_SHOW_FEATURE(720mhz); printk(")\n"); }
<<snip>>
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Quoted 8 lines
-----Original Message-----
From: Varadarajan, Charulatha
Sent: Tuesday, January 18, 2011 2:44 PM
To: Premi, Sanjeev
Cc: [email protected]
Subject: Re: [PATCH] omap3: Add basic support for 720MHz partCouple of minor comments.
[snip]...[snip]
Quoted 11 lines
arch/arm/mach-omap2/control.h line 370
Quoted 9 lines
arch/arm/mach-omap2/control.h +3
-0@@ -365,6 +365,13 @@ #define FEAT_NEON 0 #define FEAT_NEON_NONE 1 +/* +* Product ID register +*/ Do not use multiline comment style for single line comments
[sp] Was only following the multi-line comment stye few lines
above...
Quoted 6 lines
Quoted 6 lines
arch/arm/mach-omap2/control.h +4
-0+#define OMAP3_PRODID 0x020C + +#define OMAP3_SKUID_MASK 0x0f +#define OMAP3_SKUID_720MHZ 0x08
Quoted 16 lines
Quoted 7 lines
arch/arm/mach-omap2/control.h +0
-0#ifndef __ASSEMBLY__ #ifdef CONFIG_ARCH_OMAP2PLUSarch/arm/mach-omap2/id.c +0
-0arch/arm/mach-omap2/id.c static void __init omap3_check_features(void) · line 201
Quoted 7 lines
arch/arm/mach-omap2/id.c +4
-0@@ -195,6 +195,15 @@ static void __init omap3_check_features(void)* TODO: Get additional info (where applicable) * e.g. Size of L2 cache. */ + + /* +* Does it support 720MHz? +*/ Ditto
[sp] Same here.
But since the code is quite evident, I will remove the comment altogether.
Quoted 9 lines
arch/arm/mach-omap2/id.c static void __init omap3_check_features(void) · line 206
Quoted 6 lines
arch/arm/mach-omap2/id.c +5
-0+ status = (OMAP3_SKUID_MASK & read_tap_reg(OMAP3_PRODID)); + + if (status & OMAP3_SKUID_720MHZ) { + omap3_features |= OMAP3_HAS_720MHZ; + }No need of { } as there is only one line statement inside the if condition.
[sp] missed this.
~sanjeev
[snip]...[snip]--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Quoted 6 lines · Sanjeev
Quoted 6 lines
-----Original Message-----
From: Varadarajan, Charulatha
Sent: Tuesday, January 18, 2011 2:44 PM
To: Premi, Sanjeev
Cc: [email protected]
Subject: Re: [PATCH] omap3: Add basic support for 720MHz part
Also do not miss the version number while posting patches.
G, Manjunath Kondaiah
Reviewed-byQuoted 60 lines · Sanjeev
Quoted 8 lines
-----Original Message-----
From: Varadarajan, Charulatha
Sent: Tuesday, January 18, 2011 2:44 PM
To: Premi, Sanjeev
Cc: [email protected]
Subject: Re: [PATCH] omap3: Add basic support for 720MHz partCouple of minor comments.
[snip]...[snip]
Quoted 11 lines
arch/arm/mach-omap2/control.h line 370
Quoted 9 lines
arch/arm/mach-omap2/control.h +3
-0@@ -365,6 +365,13 @@ #define FEAT_NEON 0 #define FEAT_NEON_NONE 1 +/* +* Product ID register +*/ Do not use multiline comment style for single line comments
[sp] Was only following the multi-line comment stye few lines
above...Quoted 6 lines
Quoted 6 lines
arch/arm/mach-omap2/control.h +4
-0+#define OMAP3_PRODID 0x020C + +#define OMAP3_SKUID_MASK 0x0f +#define OMAP3_SKUID_720MHZ 0x08Quoted 16 lines
Quoted 7 lines
arch/arm/mach-omap2/control.h +0
-0#ifndef __ASSEMBLY__ #ifdef CONFIG_ARCH_OMAP2PLUSarch/arm/mach-omap2/id.c +0
-0arch/arm/mach-omap2/id.c static void __init omap3_check_features(void) · line 201
Quoted 7 lines
arch/arm/mach-omap2/id.c +4
-0@@ -195,6 +195,15 @@ static void __init omap3_check_features(void)* TODO: Get additional info (where applicable) * e.g. Size of L2 cache. */ + + /* +* Does it support 720MHz? +*/ Ditto
[sp] Same here.
But since the code is quite evident, I will remove the comment altogether.Quoted 7 lines
Quoted 6 lines
arch/arm/mach-omap2/id.c +5
-0+ status = (OMAP3_SKUID_MASK & read_tap_reg(OMAP3_PRODID)); + + if (status & OMAP3_SKUID_720MHZ) { + omap3_features |= OMAP3_HAS_720MHZ; + }
Quoted 4 lines
Quoted 2 lines
No need of { } as there is only one line statement inside the if condition.
[sp] missed this.
Looks fine. Feel free to add after the above changes:
-Manjunath
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Quoted 7 lines
-----Original Message-----
From: G, Manjunath Kondaiah [mailto:[email protected]]
Sent: Thursday, January 20, 2011 4:51 PM
To: Premi, Sanjeev
Cc: Varadarajan, Charulatha; [email protected]
Subject: Re: [PATCH] omap3: Add basic support for 720MHz part
[snip]
Quoted 5 lines
Looks fine. Feel free to add after the above changes:
Reviewed-by G, Manjunath Kondaiah <[email protected]>
Sorry, noticed this mail after sending the patch from linux box :(
Quoted 3 lines
-Manjunath
Op 18 jan 2011, om 08:49 heeft Sanjeev Premi het volgende geschreven:
Quoted 11 lines
This patch adds support for new speed enhanced parts with ARM and IVA running at 720MHz and 520MHz respectively. These parts can be probed at run-time by reading PRODID.SKUID[3:0] at
0x4830A20C[1].This patch specifically does following:
* Detect devices capable of 720MHz.
* Add new OPP
* Ensure that OPP is conditionally enabled.
* Check for presence of IVA before attempting to enable the corresponding OPP.
Thanks for the updated patch!
I'm still having problem using this together with DVFS, the kernel won't scale beyond 600MHz because 600MHz and 720MHz share the same voltage. Thara, Nishant, do you have any suggestions on how to convince the kernel that 2 frequencies can share the same voltage settings?
If that isn't possible, should we lower the voltages for the lower opps when detecting a 720MHz capable SoC? It would make sense that if 720MHz works at X volt that 600MHz would work at less than X volt. (I don't have a PDF reader at hand to check the TRM at the moment).
Complete tree at http://dominion.thruhere.net/git/cgit.cgi/linux-omap/log/?h=koen/beagle-next but this can be reproduced as well by merging Thara's dvfs branch and applying Sanjeevs patch.
regards,
Koen
Koen Kooi wrote, on 01/18/2011 05:38 PM:
Quoted 15 lines
Op 18 jan 2011, om 08:49 heeft Sanjeev Premi het volgende geschreven:
Quoted 11 lines
This patch adds support for new speed enhanced parts with ARM and IVA running at 720MHz and 520MHz respectively. These parts can be probed at run-time by reading PRODID.SKUID[3:0] at
0x4830A20C[1].This patch specifically does following:
* Detect devices capable of 720MHz.
* Add new OPP
* Ensure that OPP is conditionally enabled.
* Check for presence of IVA before attempting to enable the corresponding OPP.
Quoted 3 lines
Thanks for the updated patch!
I'm still having problem using this together with DVFS, the kernel won't scale beyond 600MHz because 600MHz and 720MHz share the same voltage. Thara, Nishant, do you have any suggestions on how to convince the kernel that 2 frequencies can share the same voltage settings?
+ Vishwa
Quoted 4 lines
If that isn't possible, should we lower the voltages for the lower opps when detecting a 720MHz capable SoC? It would make sense that if 720MHz works at X volt that 600MHz would work at less than X volt. (I don't have a PDF reader at hand to check the TRM at the moment).
Complete tree at http://dominion.thruhere.net/git/cgit.cgi/linux-omap/log/?h=koen/beagle-next but this can be reproduced as well by merging Thara's dvfs branch and applying Sanjeevs patch.
I suspect the problem lies here:
http://dominion.thruhere.net/git/cgit.cgi/linux-omap/tree/arch/arm/mach-omap2/voltage.c?h=koen/beagle-next#n1847
if two OPP frequencies have same voltage, the api introduced in
http://dominion.thruhere.net/git/cgit.cgi/linux-omap/commit/?h=koen/beagle-next&id=fd2991c20a8f770c7b8f5a29b3cbb17b9fca4768
will return back the first OPP entry which matches, which would be the lower frequency as OPPs are organized in the OPP layer in increasing order.
Signature · 2 lines
Regards, Nishanth Menon
Kooi,
Quoted 24 lines
-----Original Message-----
From: Nishanth Menon [mailto:[email protected]]
Sent: Tuesday, January 18, 2011 10:19 PM
To: Koen Kooi
Cc: Sanjeev Premi; l-o List; [email protected]; Vishwanath Sripathy
Subject: Re: [PATCH] omap3: Add basic support for 720MHz partKoen Kooi wrote, on 01/18/2011 05:38 PM:
Quoted 2 lines
Op 18 jan 2011, om 08:49 heeft Sanjeev Premi het volgende
geschreven:
Quoted 13 lines
Quoted 12 lines
This patch adds support for new speed enhanced parts with ARM and IVA running at 720MHz and 520MHz respectively. These parts can be probed at run-time by reading PRODID.SKUID[3:0] at
0x4830A20C[1].This patch specifically does following:
* Detect devices capable of 720MHz.
* Add new OPP
* Ensure that OPP is conditionally enabled.
* Check for presence of IVA before attempting to enable the corresponding OPP.
Quoted 8 lines
Quoted 3 lines
Thanks for the updated patch!
I'm still having problem using this together with DVFS, the kernel
won't scale beyond 600MHz because 600MHz and 720MHz share the same voltage. Thara, Nishant, do you have any suggestions on how to convince the kernel that 2 frequencies can share the same voltage settings?
+ Vishwa
Yes, this is a limitation with the current set of DVFS patches. With the next version of DVFS patches (will be out soon) this feature is going to be supported. That means you can have 2 opps with the same voltage but with different frequency. The device will be configured based on user requested frequency.
Vishwa
Quoted 3 lines
Quoted 3 lines
If that isn't possible, should we lower the voltages for the lower
opps
Quoted 24 lines
when detecting a 720MHz capable SoC? It would make sense that if 720MHz works at X volt that 600MHz would work at less than X volt. (I don't have a PDF reader at hand to check the TRM at the moment).
Quoted 2 lines
Complete tree at http://dominion.thruhere.net/git/cgit.cgi/linux-
omap/log/?h=koen/beagle-next but this can be reproduced as well by merging Thara's dvfs branch and applying Sanjeevs patch. I suspect the problem lies here:
http://dominion.thruhere.net/git/cgit.cgi/linux-
omap/tree/arch/arm/mach-omap2/voltage.c?h=koen/beagle- next#n1847
if two OPP frequencies have same voltage, the api introduced in
http://dominion.thruhere.net/git/cgit.cgi/linux-
omap/commit/?h=koen/beagle- next&id=fd2991c20a8f770c7b8f5a29b3cbb17b9fca4768will return back the first OPP entry which matches, which would be the lower frequency as OPPs are organized in the OPP layer in increasing order.
--
Regards,
Nishanth Menon
Op 18 jan 2011, om 18:18 heeft Vishwanath Sripathy het volgende geschreven:
Quoted 34 lines
Kooi,
Quoted 24 lines
-----Original Message-----
From: Nishanth Menon [mailto:[email protected]]
Sent: Tuesday, January 18, 2011 10:19 PM
To: Koen Kooi
Cc: Sanjeev Premi; l-o List; [email protected]; Vishwanath Sripathy
Subject: Re: [PATCH] omap3: Add basic support for 720MHz partKoen Kooi wrote, on 01/18/2011 05:38 PM:
Quoted 2 lines
Op 18 jan 2011, om 08:49 heeft Sanjeev Premi het volgende
geschreven:
Quoted 13 lines
Quoted 12 lines
This patch adds support for new speed enhanced parts with ARM and IVA running at 720MHz and 520MHz respectively. These parts can be probed at run-time by reading PRODID.SKUID[3:0] at
0x4830A20C[1].This patch specifically does following:
* Detect devices capable of 720MHz.
* Add new OPP
* Ensure that OPP is conditionally enabled.
* Check for presence of IVA before attempting to enable the corresponding OPP.Quoted 8 lines
Quoted 3 lines
Thanks for the updated patch!
I'm still having problem using this together with DVFS, the kernel
won't scale beyond 600MHz because 600MHz and 720MHz share the same voltage. Thara, Nishant, do you have any suggestions on how to convince the kernel that 2 frequencies can share the same voltage settings?
+ Vishwa
Quoted 5 lines
Yes, this is a limitation with the current set of DVFS patches. With the next version of DVFS patches (will be out soon) this feature is going to be supported. That means you can have 2 opps with the same voltage but with different frequency. The device will be configured based on user requested frequency.
Just to have a crude hack, would something like this work?:
/* MPU OPP6 */
- OPP_INITIALIZER("mpu", false, 720000000, 1350000),
+ OPP_INITIALIZER("mpu", false, 720000000, 1350001),
Or will I fall into a (post)divider trap where the kernel panics because it can't do that exact voltage?
The TRM[1] chickens out with the OPP definitions:
------------------>8--------------------------------------------------------------- Six generic processor OPPs can be defined as:
1. OPP6 (VDD1 = v4, (MPU_CLK = fmpu5, IVA2_CLK = fiva5))
2. OPP5 (VDD1 = v4, (MPU_CLK = fmpu4, IVA2_CLK = fiva4))
3. OPP4 (VDD1 = v3, (MPU_CLK = fmpu3, IVA2_CLK = fiva3))
4. OPP3 (VDD1 = v2 , (MPU_CLK = fmpu2, IVA2_CLK = fiva2))
5. OPP2 (VDD1 = v1 , (MPU_CLK = fmpu1, IVA2_CLK = fiva1))
6. OPP1 (VDD1 = v0 , (MPU_CLK = fmpu0, IVA2_CLK = fiva0))
where v4 > v3 > v2 > v1 > v0, ------------------8<---------------------------------------------------------------
My limited sample size of 3 board (2x beagle C4, 1x overo tide) shows [email protected] works as well, but I don't know how much slack that has. And I haven't check if the hardware can do 1.3V exactly or has rounded up.
So, what's the quickest way with the current code to get 720MHz "working"? I've voided my warranty on everything already, so that isn't a problem :)
regards,
Koen
[1] spruf98m.pdf page 355
Kooi,
Quoted 37 lines
-----Original Message-----
From: Koen Kooi [mailto:[email protected]]
Sent: Tuesday, January 18, 2011 11:47 PM
To: Vishwanath Sripathy
Cc: Nishanth Menon; Sanjeev Premi; l-o List; Thara Gopinath
Subject: Re: [PATCH] omap3: Add basic support for 720MHz partOp 18 jan 2011, om 18:18 heeft Vishwanath Sripathy het volgende geschreven:
Quoted 26 lines
Kooi,
Quoted 24 lines
-----Original Message-----
From: Nishanth Menon [mailto:[email protected]]
Sent: Tuesday, January 18, 2011 10:19 PM
To: Koen Kooi
Cc: Sanjeev Premi; l-o List; [email protected]; Vishwanath Sripathy
Subject: Re: [PATCH] omap3: Add basic support for 720MHz partKoen Kooi wrote, on 01/18/2011 05:38 PM:
Quoted 2 lines
Op 18 jan 2011, om 08:49 heeft Sanjeev Premi het volgende
geschreven:
Quoted 13 lines
Quoted 12 lines
This patch adds support for new speed enhanced parts with ARM and IVA running at 720MHz and 520MHz respectively. These parts can be probed at run-time by reading PRODID.SKUID[3:0] at
0x4830A20C[1].This patch specifically does following:
* Detect devices capable of 720MHz.
* Add new OPP
* Ensure that OPP is conditionally enabled.
* Check for presence of IVA before attempting to enable the corresponding OPP.
Quoted 11 lines
Quoted 5 lines
Quoted 5 lines
Quoted 3 lines
Thanks for the updated patch!
I'm still having problem using this together with DVFS, the kernel
won't scale beyond 600MHz because 600MHz and 720MHz share the same voltage. Thara, Nishant, do you have any suggestions on how
to
Quoted 5 lines
Quoted 3 lines
convince the kernel that 2 frequencies can share the same voltage settings?
+ VishwaYes, this is a limitation with the current set of DVFS patches. With the next version of DVFS patches (will be out soon) this feature
is
Quoted 11 lines
Quoted 2 lines
going to be supported. That means you can have 2 opps with the same voltage but with different frequency. The device will be configured
based
Quoted 1 line
on user requested frequency.
Just to have a crude hack, would something like this work?:
/* MPU OPP6 */(quoted diff) +1
-1- OPP_INITIALIZER("mpu", false, 720000000, 1350000), + OPP_INITIALIZER("mpu", false, 720000000, 1350001),
Quoted 1 line
Or will I fall into a (post)divider trap where the kernel panics because
it
Quoted 5 lines
can't do that exact voltage?
The TRM[1] chickens out with the OPP definitions:
------------------>8------------------------------------------------------
------
Quoted 10 lines
---
Six generic processor OPPs can be defined as:
1. OPP6 (VDD1 = v4, (MPU_CLK= fmpu5,IVA2_CLK= fiva5))
2. OPP5 (VDD1 = v4, (MPU_CLK= fmpu4,IVA2_CLK= fiva4))
3. OPP4 (VDD1 = v3, (MPU_CLK= fmpu3,IVA2_CLK= fiva3))
4. OPP3 (VDD1 = v2 , (MPU_CLK= fmpu2,IVA2_CLK= fiva2))
5. OPP2 (VDD1 = v1 , (MPU_CLK= fmpu1,IVA2_CLK= fiva1))
6. OPP1 (VDD1 = v0 , (MPU_CLK= fmpu0,IVA2_CLK= fiva0)) where v4 > v3 > v2 > v1 > v0,
------------------8<------------------------------------------------------
------
Quoted 9 lines
---
My limited sample size of 3 board (2x beagle C4, 1x overo tide) shows [email protected] works as well, but I don't know how much slack that has. And I haven't check if the hardware can do 1.3V exactly or has rounded up.
So, what's the quickest way with the current code to get 720MHz "working"? I've voided my warranty on everything already, so that isn't
a
Quoted 1 line
problem :)
If you want a quick hack, you can modify the voltage for 700M marginally (like you have done above). But it needs to be done in multiple places. You need to modify IVA OPP6 entry in opp table and OPP6 voltage value in voltage.h as well besides above change. This should work.
Vishwa
Quoted 6 lines
regards,
Koen
[1] spruf98m.pdf page 355
Vishwanath Sripathy wrote, on 01/19/2011 10:56 AM:
Quoted 4 lines
If you want a quick hack, you can modify the voltage for 700M marginally (like you have done above). But it needs to be done in multiple places. You need to modify IVA OPP6 entry in opp table and OPP6 voltage value in
voltage.has well besides above change. This should work.
we may want to be sure about keeping the additional voltages in 1 step increment (12.5mV - to ensure twl conversion routines sane)- i think we may be pretty much maxed out for the tps chip used, no?
Signature · 2 lines
Regards, Nishanth Menon
Op 19 jan 2011, om 10:06 heeft Nishanth Menon het volgende geschreven:
Quoted 6 lines
Vishwanath Sripathy wrote, on 01/19/2011 10:56 AM:
Quoted 4 lines
If you want a quick hack, you can modify the voltage for 700M marginally (like you have done above). But it needs to be done in multiple places. You need to modify IVA OPP6 entry in opp table and OPP6 voltage value in
voltage.has well besides above change. This should work.we may want to be sure about keeping the additional voltages in 1 step increment (12.5mV - to ensure twl conversion routines sane)- i think we may be pretty much maxed out for the tps chip used, no?
Not using the 12.5mV steps gives me:
[ 3.076873] calc_dep_vdd_volt: Not able to find a matching volt forvdd_core corresponding to vdd_mpu 1350001 volt [ 3.095306] omap_voltage_scale: Error in calculating dependent vdd voltagesfor vdd_mpu
It does seem to work, though:
root@usrp-e1xx:~# grep MIPS /proc/cpuinfo BogoMIPS : 717.37
I think I'll just drop the OPP5 voltage by 12.5mV since I know what silicon my usrp-e1xx has, but I can't really give out that patch to others, since someone might replace the overo with another one.
This is the hack I ended up using:
arch/arm/mach-omap2/opp3xxx_data.c +2 -2
@@ -37,7 +37,7 @@ static struct omap_opp_def __initdata omap34xx_opp_def_list[] = {/* MPU OPP5 */ OPP_INITIALIZER ("mpu" , true,600000000 ,1350000 ),/* MPU OPP6 */ - OPP_INITIALIZER("mpu", false, 720000000, 1350000), + OPP_INITIALIZER("mpu", false, 720000000, 1350001),/* * L3 OPP1 - 41.5 MHz is disabled because: The voltage for that OPP is
@@ -64,7 +64,7 @@ static struct omap_opp_def __initdata omap34xx_opp_def_list[] = {/* DSP OPP5 */ OPP_INITIALIZER ("iva" , true,430000000 ,1350000 ),/* DSP OPP6 */ - OPP_INITIALIZER("iva", false, 520000000, 1350000), + OPP_INITIALIZER("iva", false, 520000000, 1350001), }; static struct omap_opp_def __initdata omap36xx_opp_def_list[] = {
arch/arm/mach-omap2/voltage.c +1 -0
@@ -324,6 +324,7 @@ static struct omap_volt_data omap34xx_vddmpu_volt_data[] = {VOLT_DATA_DEFINE (OMAP3430_VDD_MPU_OPP3_UV ,OMAP343X_CONTROL_FUSE_OPP3_VDD1 ,0xf9 ,0x18 ),VOLT_DATA_DEFINE (OMAP3430_VDD_MPU_OPP4_UV ,OMAP343X_CONTROL_FUSE_OPP4_VDD1 ,0xf9 ,0x18 ),VOLT_DATA_DEFINE (OMAP3430_VDD_MPU_OPP5_UV ,OMAP343X_CONTROL_FUSE_OPP5_VDD1 ,0xf9 ,0x18 ), +VOLT_DATA_DEFINE (OMAP3430_VDD_MPU_OPP6_UV ,OMAP343X_CONTROL_FUSE_OPP5_VDD1 ,0xf9 ,0x18 ), VOLT_DATA_DEFINE(0, 0, 0, 0), };
arch/arm/plat-omap/include/plat/voltage.h +1 -0
@@ -31,6 +31,7 @@#define OMAP3430_VDD_MPU_OPP3_UV 1200000#define OMAP3430_VDD_MPU_OPP4_UV 1270000#define OMAP3430_VDD_MPU_OPP5_UV 1350000 +#define OMAP3430_VDD_MPU_OPP6_UV 1350001#define OMAP3430_VDD_CORE_OPP1_UV 975000#define OMAP3430_VDD_CORE_OPP2_UV 1050000
Quoted 6 lines
-----Original Message-----
From: Koen Kooi [mailto:[email protected]]
Sent: Tuesday, January 18, 2011 11:47 PM
To: Sripathy, Vishwanath
Cc: Menon, Nishanth; Premi, Sanjeev; l-o List; Gopinath, Thara
Subject: Re: [PATCH] omap3: Add basic support for 720MHz part
[snip]...[snip]
Quoted 1 line
The TRM[1] chickens out with the OPP definitions:
Refer to page 122 of the OMAP3503 datasheet for the OPP definitions:
http://www.ti.com/litv/pdf/sprs505f
The nominal voltage for both (VDD1) OPP5 and OPP6 is 1.35V.
~sanjeev
Quoted 7 lines
-----Original Message-----
From: Koen Kooi [mailto:[email protected]]
Sent: Tuesday, January 18, 2011 9:08 PM
To: Premi, Sanjeev
Cc: l-o List; Menon, Nishanth; Gopinath, Thara
Subject: Re: [PATCH] omap3: Add basic support for 720MHz part
[snip]...[snip]
Quoted 8 lines
Thanks for the updated patch!
I'm still having problem using this together with DVFS, the kernel won't scale beyond 600MHz because 600MHz and 720MHz share the same voltage. Thara, Nishant, do you have any suggestions on how to convince the kernel that 2 frequencies can share the same voltage settings?
Koen,
I still haven't spent time testing with DVFS.
There are few issue that need to be resolved with the DVFS infra before DVFS can be functional.
Would like this patch to be de-coupled from DVFS discussions. It was not the intent of the patch...
Am working to list all the issues and possible solutions for the DVFS... getting delayed due to other activities.
~sanjeev
[snip]...[snip]
Op 19 jan 2011, om 10:49 heeft Premi, Sanjeev het volgende geschreven:
Quoted 19 lines
Quoted 7 lines
-----Original Message-----
From: Koen Kooi [mailto:[email protected]]
Sent: Tuesday, January 18, 2011 9:08 PM
To: Premi, Sanjeev
Cc: l-o List; Menon, Nishanth; Gopinath, Thara
Subject: Re: [PATCH] omap3: Add basic support for 720MHz part[snip]...[snip]
Quoted 8 lines
Thanks for the updated patch!
I'm still having problem using this together with DVFS, the kernel won't scale beyond 600MHz because 600MHz and 720MHz share the same voltage. Thara, Nishant, do you have any suggestions on how to convince the kernel that 2 frequencies can share the same voltage settings?
Koen,
Quoted 7 lines
I still haven't spent time testing with DVFS.
There are few issue that need to be resolved with the DVFS infra before DVFS can be functional.
Would like this patch to be de-coupled from DVFS discussions. It was not the intent of the patch...
It was not my intent to couple it to DVFS discussions, I just used it as an example to highlight the bugs I'm hitting with DVFS and 720MHz operation :) I don't want this patch to be held back by bugs in the DVFS code!