* [PATCH 0/2] OMAP3: Beagle: enable 800MHz for xm @ 2011-01-05 20:49 Nishanth Menon 2011-01-05 20:49 ` [PATCH 1/2] omap3|4: opp: make omapx_opp_init non-static Nishanth Menon 2011-01-05 20:49 ` [PATCH 2/2] OMAP3: beagle xm: enable upto 800MHz OPP Nishanth Menon 0 siblings, 2 replies; 15+ messages in thread From: Nishanth Menon @ 2011-01-05 20:49 UTC (permalink / raw) To: linux-arm-kernel Source: git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap-2.6.git branch: omap-for-linus (dc69d1a omap2: Make OMAP2PLUS select OMAP_DM_TIMER) Nishanth Menon (2): omap3|4: opp: make omapx_opp_init non-static OMAP3: beagle xm: enable upto 800MHz OPP arch/arm/mach-omap2/board-omap3beagle.c | 52 +++++++++++++++++++++++++++++++ arch/arm/mach-omap2/opp3xxx_data.c | 3 +- arch/arm/mach-omap2/opp4xxx_data.c | 3 +- 3 files changed, 56 insertions(+), 2 deletions(-) Tested: Beagle XM with Angstrom Tested-by: Koen Kooi <koen@beagleboard.org> Regards, Nishanth Menon ^ permalink raw reply [flat|nested] 15+ messages in thread
* [PATCH 1/2] omap3|4: opp: make omapx_opp_init non-static 2011-01-05 20:49 [PATCH 0/2] OMAP3: Beagle: enable 800MHz for xm Nishanth Menon @ 2011-01-05 20:49 ` Nishanth Menon 2011-02-01 22:01 ` Kevin Hilman 2011-01-05 20:49 ` [PATCH 2/2] OMAP3: beagle xm: enable upto 800MHz OPP Nishanth Menon 1 sibling, 1 reply; 15+ messages in thread From: Nishanth Menon @ 2011-01-05 20:49 UTC (permalink / raw) To: linux-arm-kernel omap3 and omap4 opp_init should be made non-static to allow for platform specific opp table tweaking. making these static conflicts with the definition in pm.h(global) as well. we include pm.h as well to ensure that there are no such prototype conflicts with actual implementation in the future. Signed-off-by: Nishanth Menon <nm@ti.com> --- arch/arm/mach-omap2/opp3xxx_data.c | 3 ++- arch/arm/mach-omap2/opp4xxx_data.c | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/arch/arm/mach-omap2/opp3xxx_data.c b/arch/arm/mach-omap2/opp3xxx_data.c index 0486fce..fd3a1af 100644 --- a/arch/arm/mach-omap2/opp3xxx_data.c +++ b/arch/arm/mach-omap2/opp3xxx_data.c @@ -21,6 +21,7 @@ #include <plat/cpu.h> #include "omap_opp_data.h" +#include "pm.h" static struct omap_opp_def __initdata omap34xx_opp_def_list[] = { /* MPU OPP1 */ @@ -88,7 +89,7 @@ static struct omap_opp_def __initdata omap36xx_opp_def_list[] = { /** * omap3_opp_init() - initialize omap3 opp table */ -static int __init omap3_opp_init(void) +int __init omap3_opp_init(void) { int r = -ENODEV; diff --git a/arch/arm/mach-omap2/opp4xxx_data.c b/arch/arm/mach-omap2/opp4xxx_data.c index a11fa56..f0e9939 100644 --- a/arch/arm/mach-omap2/opp4xxx_data.c +++ b/arch/arm/mach-omap2/opp4xxx_data.c @@ -22,6 +22,7 @@ #include <plat/cpu.h> #include "omap_opp_data.h" +#include "pm.h" static struct omap_opp_def __initdata omap44xx_opp_def_list[] = { /* MPU OPP1 - OPP50 */ @@ -42,7 +43,7 @@ static struct omap_opp_def __initdata omap44xx_opp_def_list[] = { /** * omap4_opp_init() - initialize omap4 opp table */ -static int __init omap4_opp_init(void) +int __init omap4_opp_init(void) { int r = -ENODEV; -- 1.6.3.3 ^ permalink raw reply related [flat|nested] 15+ messages in thread
* [PATCH 1/2] omap3|4: opp: make omapx_opp_init non-static 2011-01-05 20:49 ` [PATCH 1/2] omap3|4: opp: make omapx_opp_init non-static Nishanth Menon @ 2011-02-01 22:01 ` Kevin Hilman 0 siblings, 0 replies; 15+ messages in thread From: Kevin Hilman @ 2011-02-01 22:01 UTC (permalink / raw) To: linux-arm-kernel Nishanth Menon <nm@ti.com> writes: > omap3 and omap4 opp_init should be made non-static to allow > for platform specific opp table tweaking. making these static > conflicts with the definition in pm.h(global) as well. > we include pm.h as well to ensure that there are no such prototype > conflicts with actual implementation in the future. > > Signed-off-by: Nishanth Menon <nm@ti.com> Thanks, queuing for 2.6.39 (branch: for_2.6.39/pm-misc) Kevin > --- > arch/arm/mach-omap2/opp3xxx_data.c | 3 ++- > arch/arm/mach-omap2/opp4xxx_data.c | 3 ++- > 2 files changed, 4 insertions(+), 2 deletions(-) > > diff --git a/arch/arm/mach-omap2/opp3xxx_data.c b/arch/arm/mach-omap2/opp3xxx_data.c > index 0486fce..fd3a1af 100644 > --- a/arch/arm/mach-omap2/opp3xxx_data.c > +++ b/arch/arm/mach-omap2/opp3xxx_data.c > @@ -21,6 +21,7 @@ > #include <plat/cpu.h> > > #include "omap_opp_data.h" > +#include "pm.h" > > static struct omap_opp_def __initdata omap34xx_opp_def_list[] = { > /* MPU OPP1 */ > @@ -88,7 +89,7 @@ static struct omap_opp_def __initdata omap36xx_opp_def_list[] = { > /** > * omap3_opp_init() - initialize omap3 opp table > */ > -static int __init omap3_opp_init(void) > +int __init omap3_opp_init(void) > { > int r = -ENODEV; > > diff --git a/arch/arm/mach-omap2/opp4xxx_data.c b/arch/arm/mach-omap2/opp4xxx_data.c > index a11fa56..f0e9939 100644 > --- a/arch/arm/mach-omap2/opp4xxx_data.c > +++ b/arch/arm/mach-omap2/opp4xxx_data.c > @@ -22,6 +22,7 @@ > #include <plat/cpu.h> > > #include "omap_opp_data.h" > +#include "pm.h" > > static struct omap_opp_def __initdata omap44xx_opp_def_list[] = { > /* MPU OPP1 - OPP50 */ > @@ -42,7 +43,7 @@ static struct omap_opp_def __initdata omap44xx_opp_def_list[] = { > /** > * omap4_opp_init() - initialize omap4 opp table > */ > -static int __init omap4_opp_init(void) > +int __init omap4_opp_init(void) > { > int r = -ENODEV; ^ permalink raw reply [flat|nested] 15+ messages in thread
* [PATCH 2/2] OMAP3: beagle xm: enable upto 800MHz OPP 2011-01-05 20:49 [PATCH 0/2] OMAP3: Beagle: enable 800MHz for xm Nishanth Menon 2011-01-05 20:49 ` [PATCH 1/2] omap3|4: opp: make omapx_opp_init non-static Nishanth Menon @ 2011-01-05 20:49 ` Nishanth Menon 2011-01-05 23:28 ` Kevin Hilman 2011-01-07 13:04 ` Aaro Koskinen 1 sibling, 2 replies; 15+ messages in thread From: Nishanth Menon @ 2011-01-05 20:49 UTC (permalink / raw) To: linux-arm-kernel Beagle XM uses 3730 and the board design allows enabling 800MHz and 1GHz OPPs. However, We need Smart reflex class 1.5 and ABB to enable 1GHz safely. For the moment, we tweak the default table to allow for 800Mhz OPP usage. Reported-by: Koen Kooi <koen@beagleboard.org> Tested-by: Koen Kooi <koen@beagleboard.org> Signed-off-by: Nishanth Menon <nm@ti.com> --- arch/arm/mach-omap2/board-omap3beagle.c | 50 +++++++++++++++++++++++++++++++ 1 files changed, 50 insertions(+), 0 deletions(-) diff --git a/arch/arm/mach-omap2/board-omap3beagle.c b/arch/arm/mach-omap2/board-omap3beagle.c index 6c12760..0b99b80 100644 --- a/arch/arm/mach-omap2/board-omap3beagle.c +++ b/arch/arm/mach-omap2/board-omap3beagle.c @@ -23,6 +23,7 @@ #include <linux/gpio.h> #include <linux/input.h> #include <linux/gpio_keys.h> +#include <linux/opp.h> #include <linux/mtd/mtd.h> #include <linux/mtd/partitions.h> @@ -44,10 +45,12 @@ #include <plat/gpmc.h> #include <plat/nand.h> #include <plat/usb.h> +#include <plat/omap_device.h> #include "mux.h" #include "hsmmc.h" #include "timer-gp.h" +#include "pm.h" #define NAND_BLOCK_SIZE SZ_128K @@ -556,6 +559,52 @@ static struct omap_musb_board_data musb_board_data = { .power = 100, }; +static void __init beagle_opp_init(void) +{ + int r = 0; + + /* Initialize the omap3 opp table */ + if (omap3_opp_init()) { + pr_err("%s: opp default init failed\n", __func__); + return; + } + + /* Custom OPP enabled for XM */ + if (omap3_beagle_get_rev() == OMAP3BEAGLE_BOARD_XM) { + struct omap_hwmod *mh = omap_hwmod_lookup("mpu"); + struct omap_hwmod *dh = omap_hwmod_lookup("iva"); + struct device *dev; + + if (!mh || !dh) { + pr_err("%s: Aiee.. no mpu/dsp devices? %p %p\n", + __func__, mh, dh); + r = -EINVAL; + } else { + /* Enable MPU 1GHz and lower opps */ + dev = &mh->od->pdev.dev; + r = opp_enable(dev, 800000000); + /* TODO: MPU 1GHz needs SR and ABB */ + + /* Enable IVA 800MHz and lower opps */ + dev = &dh->od->pdev.dev; + r |= opp_enable(dev, 660000000); + /* TODO: DSP 800MHz needs SR and ABB */ + } + if (r) { + pr_err("%s: failed to enable higher opp %d\n", + __func__, r); + /* + * Cleanup - disable the higher freqs - we dont care + * about the results + */ + dev = &mh->od->pdev.dev; + opp_disable(dev, 800000000); + dev = &dh->od->pdev.dev; + opp_disable(dev, 660000000); + } + } +} + static void __init omap3_beagle_init(void) { omap3_mux_init(board_mux, OMAP_PACKAGE_CBB); @@ -579,6 +628,7 @@ static void __init omap3_beagle_init(void) omap_mux_init_signal("sdrc_cke1", OMAP_PIN_OUTPUT); beagle_display_init(); + beagle_opp_init(); } MACHINE_START(OMAP3_BEAGLE, "OMAP3 Beagle Board") -- 1.6.3.3 ^ permalink raw reply related [flat|nested] 15+ messages in thread
* [PATCH 2/2] OMAP3: beagle xm: enable upto 800MHz OPP 2011-01-05 20:49 ` [PATCH 2/2] OMAP3: beagle xm: enable upto 800MHz OPP Nishanth Menon @ 2011-01-05 23:28 ` Kevin Hilman 2011-01-06 12:24 ` Nishanth Menon 2011-01-07 13:04 ` Aaro Koskinen 1 sibling, 1 reply; 15+ messages in thread From: Kevin Hilman @ 2011-01-05 23:28 UTC (permalink / raw) To: linux-arm-kernel Nishanth Menon <nm@ti.com> writes: > Beagle XM uses 3730 and the board design allows enabling 800MHz and 1GHz > OPPs. However, We need Smart reflex class 1.5 and ABB to enable 1GHz safely. > For the moment, we tweak the default table to allow for 800Mhz OPP usage. Isn't this common to any board using 3730 (or 3630?) IOW, what is Beagle specific about this? Kevin > Reported-by: Koen Kooi <koen@beagleboard.org> > Tested-by: Koen Kooi <koen@beagleboard.org> > > Signed-off-by: Nishanth Menon <nm@ti.com> > --- > arch/arm/mach-omap2/board-omap3beagle.c | 50 +++++++++++++++++++++++++++++++ > 1 files changed, 50 insertions(+), 0 deletions(-) > > diff --git a/arch/arm/mach-omap2/board-omap3beagle.c b/arch/arm/mach-omap2/board-omap3beagle.c > index 6c12760..0b99b80 100644 > --- a/arch/arm/mach-omap2/board-omap3beagle.c > +++ b/arch/arm/mach-omap2/board-omap3beagle.c > @@ -23,6 +23,7 @@ > #include <linux/gpio.h> > #include <linux/input.h> > #include <linux/gpio_keys.h> > +#include <linux/opp.h> > > #include <linux/mtd/mtd.h> > #include <linux/mtd/partitions.h> > @@ -44,10 +45,12 @@ > #include <plat/gpmc.h> > #include <plat/nand.h> > #include <plat/usb.h> > +#include <plat/omap_device.h> > > #include "mux.h" > #include "hsmmc.h" > #include "timer-gp.h" > +#include "pm.h" > > #define NAND_BLOCK_SIZE SZ_128K > > @@ -556,6 +559,52 @@ static struct omap_musb_board_data musb_board_data = { > .power = 100, > }; > > +static void __init beagle_opp_init(void) > +{ > + int r = 0; > + > + /* Initialize the omap3 opp table */ > + if (omap3_opp_init()) { > + pr_err("%s: opp default init failed\n", __func__); > + return; > + } > + > + /* Custom OPP enabled for XM */ > + if (omap3_beagle_get_rev() == OMAP3BEAGLE_BOARD_XM) { > + struct omap_hwmod *mh = omap_hwmod_lookup("mpu"); > + struct omap_hwmod *dh = omap_hwmod_lookup("iva"); > + struct device *dev; > + > + if (!mh || !dh) { > + pr_err("%s: Aiee.. no mpu/dsp devices? %p %p\n", > + __func__, mh, dh); > + r = -EINVAL; > + } else { > + /* Enable MPU 1GHz and lower opps */ > + dev = &mh->od->pdev.dev; > + r = opp_enable(dev, 800000000); > + /* TODO: MPU 1GHz needs SR and ABB */ > + > + /* Enable IVA 800MHz and lower opps */ > + dev = &dh->od->pdev.dev; > + r |= opp_enable(dev, 660000000); > + /* TODO: DSP 800MHz needs SR and ABB */ > + } > + if (r) { > + pr_err("%s: failed to enable higher opp %d\n", > + __func__, r); > + /* > + * Cleanup - disable the higher freqs - we dont care > + * about the results > + */ > + dev = &mh->od->pdev.dev; > + opp_disable(dev, 800000000); > + dev = &dh->od->pdev.dev; > + opp_disable(dev, 660000000); > + } > + } > +} > + > static void __init omap3_beagle_init(void) > { > omap3_mux_init(board_mux, OMAP_PACKAGE_CBB); > @@ -579,6 +628,7 @@ static void __init omap3_beagle_init(void) > omap_mux_init_signal("sdrc_cke1", OMAP_PIN_OUTPUT); > > beagle_display_init(); > + beagle_opp_init(); > } > > MACHINE_START(OMAP3_BEAGLE, "OMAP3 Beagle Board") ^ permalink raw reply [flat|nested] 15+ messages in thread
* [PATCH 2/2] OMAP3: beagle xm: enable upto 800MHz OPP 2011-01-05 23:28 ` Kevin Hilman @ 2011-01-06 12:24 ` Nishanth Menon 2011-01-06 13:00 ` Koen Kooi 0 siblings, 1 reply; 15+ messages in thread From: Nishanth Menon @ 2011-01-06 12:24 UTC (permalink / raw) To: linux-arm-kernel Kevin Hilman wrote, on 01/05/2011 05:28 PM: > Nishanth Menon<nm@ti.com> writes: > >> Beagle XM uses 3730 and the board design allows enabling 800MHz and 1GHz >> OPPs. However, We need Smart reflex class 1.5 and ABB to enable 1GHz safely. >> For the moment, we tweak the default table to allow for 800Mhz OPP usage. > > Isn't this common to any board using 3730 (or 3630?) no it is not. only certain boards are capable of higher frequencies - there is a procedure called PDN analysis and vmin search that needs to be performed to guarentee this. > > IOW, what is Beagle specific about this? beagle is one of the boards capable of higher frequencies. > > Kevin > >> Reported-by: Koen Kooi<koen@beagleboard.org> >> Tested-by: Koen Kooi<koen@beagleboard.org> >> >> Signed-off-by: Nishanth Menon<nm@ti.com> >> --- >> arch/arm/mach-omap2/board-omap3beagle.c | 50 +++++++++++++++++++++++++++++++ >> 1 files changed, 50 insertions(+), 0 deletions(-) >> >> diff --git a/arch/arm/mach-omap2/board-omap3beagle.c b/arch/arm/mach-omap2/board-omap3beagle.c >> index 6c12760..0b99b80 100644 >> --- a/arch/arm/mach-omap2/board-omap3beagle.c >> +++ b/arch/arm/mach-omap2/board-omap3beagle.c >> @@ -23,6 +23,7 @@ >> #include<linux/gpio.h> >> #include<linux/input.h> >> #include<linux/gpio_keys.h> >> +#include<linux/opp.h> >> >> #include<linux/mtd/mtd.h> >> #include<linux/mtd/partitions.h> >> @@ -44,10 +45,12 @@ >> #include<plat/gpmc.h> >> #include<plat/nand.h> >> #include<plat/usb.h> >> +#include<plat/omap_device.h> >> >> #include "mux.h" >> #include "hsmmc.h" >> #include "timer-gp.h" >> +#include "pm.h" >> >> #define NAND_BLOCK_SIZE SZ_128K >> >> @@ -556,6 +559,52 @@ static struct omap_musb_board_data musb_board_data = { >> .power = 100, >> }; >> >> +static void __init beagle_opp_init(void) >> +{ >> + int r = 0; >> + >> + /* Initialize the omap3 opp table */ >> + if (omap3_opp_init()) { >> + pr_err("%s: opp default init failed\n", __func__); >> + return; >> + } >> + >> + /* Custom OPP enabled for XM */ >> + if (omap3_beagle_get_rev() == OMAP3BEAGLE_BOARD_XM) { >> + struct omap_hwmod *mh = omap_hwmod_lookup("mpu"); >> + struct omap_hwmod *dh = omap_hwmod_lookup("iva"); >> + struct device *dev; >> + >> + if (!mh || !dh) { >> + pr_err("%s: Aiee.. no mpu/dsp devices? %p %p\n", >> + __func__, mh, dh); >> + r = -EINVAL; >> + } else { >> + /* Enable MPU 1GHz and lower opps */ >> + dev =&mh->od->pdev.dev; >> + r = opp_enable(dev, 800000000); >> + /* TODO: MPU 1GHz needs SR and ABB */ >> + >> + /* Enable IVA 800MHz and lower opps */ >> + dev =&dh->od->pdev.dev; >> + r |= opp_enable(dev, 660000000); >> + /* TODO: DSP 800MHz needs SR and ABB */ >> + } >> + if (r) { >> + pr_err("%s: failed to enable higher opp %d\n", >> + __func__, r); >> + /* >> + * Cleanup - disable the higher freqs - we dont care >> + * about the results >> + */ >> + dev =&mh->od->pdev.dev; >> + opp_disable(dev, 800000000); >> + dev =&dh->od->pdev.dev; >> + opp_disable(dev, 660000000); >> + } >> + } >> +} >> + >> static void __init omap3_beagle_init(void) >> { >> omap3_mux_init(board_mux, OMAP_PACKAGE_CBB); >> @@ -579,6 +628,7 @@ static void __init omap3_beagle_init(void) >> omap_mux_init_signal("sdrc_cke1", OMAP_PIN_OUTPUT); >> >> beagle_display_init(); >> + beagle_opp_init(); >> } >> >> MACHINE_START(OMAP3_BEAGLE, "OMAP3 Beagle Board") -- Regards, Nishanth Menon ^ permalink raw reply [flat|nested] 15+ messages in thread
* [PATCH 2/2] OMAP3: beagle xm: enable upto 800MHz OPP 2011-01-06 12:24 ` Nishanth Menon @ 2011-01-06 13:00 ` Koen Kooi 2011-01-06 13:44 ` Nishanth Menon 0 siblings, 1 reply; 15+ messages in thread From: Koen Kooi @ 2011-01-06 13:00 UTC (permalink / raw) To: linux-arm-kernel Op 6 jan 2011, om 13:24 heeft Nishanth Menon het volgende geschreven: > Kevin Hilman wrote, on 01/05/2011 05:28 PM: >> Nishanth Menon<nm@ti.com> writes: >> >>> Beagle XM uses 3730 and the board design allows enabling 800MHz and 1GHz >>> OPPs. However, We need Smart reflex class 1.5 and ABB to enable 1GHz safely. >>> For the moment, we tweak the default table to allow for 800Mhz OPP usage. >> >> Isn't this common to any board using 3730 (or 3630?) > > no it is not. only certain boards are capable of higher frequencies - there is a procedure called PDN analysis and vmin search that needs to be performed to guarentee this. What about the "new" 3530s that can run at 720MHz? Those have been speed binned and given a different SKU. I'm using the attached 4 patches (Tony master + beagle patches _+ dvfs: http://dominion.thruhere.net/git/cgit.cgi/linux-omap/log/?h=koen/beagle-next) on my beagle C4 and overo tide to get 720MHz. They don't really work: root at usrp-e1xx:~# cpufreq-set -f 720000 [ 104.976318] platform iva.0: omap_voltage_scale: Already at the requestedrate 430000000 [ 104.986236] platform mpu.0: omap_voltage_scale: Already at the requestedrate 600000000 [ 104.996032] platform iva.0: omap_voltage_scale: Already at the requestedrate 430000000 [ 105.006408] platform mpu.0: omap_voltage_scale: Already at the requestedrate 600000000 But: root at usrp-e1xx:~# dmesg | grep 720 [ 0.000000] OMAP3430/3530 ES3.1 (l2cache iva sgx neon isp 720mhz ) [ 0.000000] Kernel command line: console=ttyO2,115200n8 mpurate=720 vram=16M mem=99M at 0x80000000 mem=384M at 0x88000000 omapfb.mode=dvi:1024x768MR-24 at 60 omapfb.vram=0:8M,1:4M,2:4M omapdss.def_disp=dvi root=/dev/mmcblk0p2 rw rootfstype=ext3 rootwait [ 0.000000] overo_opp_init: 720MHz MPU OPPs enabled! [ 0.000000] Switched to new clocking rate (Crystal/Core/MPU): 26.0/224/720 MHz root at usrp-e1xx:~# cpufreq-info cpufrequtils 006: cpufreq-info (C) Dominik Brodowski 2004-2009 Report errors and bugs to cpufreq at vger.kernel.org, please. analyzing CPU 0: driver: omap CPUs which run at the same hardware frequency: 0 CPUs which need to have their frequency coordinated by software: 0 maximum transition latency: 300 us. hardware limits: 125 MHz - 720 MHz available frequency steps: 125 MHz, 250 MHz, 500 MHz, 550 MHz, 600 MHz, 720 MHz available cpufreq governors: conservative, ondemand, userspace, powersave, performance current policy: frequency should be within 125 MHz and 720 MHz. The governor "userspace" may decide which speed to use within this range. current CPU frequency is 600 MHz (asserted by call to hardware). cpufreq stats: 125 MHz:0.00%, 250 MHz:0.00%, 500 MHz:0.00%, 550 MHz:0.00%, 600 MHz:100.00%, 720 MHz:0.00% (1) So how do I "properly" get 720MHz on those parts? regards, Koen -------------- next part -------------- A non-text attachment was scrubbed... Name: 0001-omap3-add-support-for-720MHz-MPU-OPP.patch Type: application/octet-stream Size: 1377 bytes Desc: not available URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20110106/47da5059/attachment.obj> -------------- next part -------------- A non-text attachment was scrubbed... Name: 0002-OMAP35x-Add-support-for-720MHz-part.patch Type: application/octet-stream Size: 2710 bytes Desc: not available URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20110106/47da5059/attachment-0001.obj> -------------- next part -------------- A non-text attachment was scrubbed... Name: 0003-OMAP3-beagle-C4-enable-upto-720MHz-OPP.patch Type: application/octet-stream Size: 1881 bytes Desc: not available URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20110106/47da5059/attachment-0002.obj> -------------- next part -------------- A non-text attachment was scrubbed... Name: 0004-OMAP3-Overo-Tide-enable-upto-720MHz-OPP.patch Type: application/octet-stream Size: 2720 bytes Desc: not available URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20110106/47da5059/attachment-0003.obj> ^ permalink raw reply [flat|nested] 15+ messages in thread
* [PATCH 2/2] OMAP3: beagle xm: enable upto 800MHz OPP 2011-01-06 13:00 ` Koen Kooi @ 2011-01-06 13:44 ` Nishanth Menon 2011-01-06 13:58 ` Premi, Sanjeev 2011-01-06 14:01 ` Koen Kooi 0 siblings, 2 replies; 15+ messages in thread From: Nishanth Menon @ 2011-01-06 13:44 UTC (permalink / raw) To: linux-arm-kernel Koen Kooi had written, on 01/06/2011 07:00 AM, the following: > Op 6 jan 2011, om 13:24 heeft Nishanth Menon het volgende geschreven: > >> Kevin Hilman wrote, on 01/05/2011 05:28 PM: >>> Nishanth Menon<nm@ti.com> writes: >>> >>>> Beagle XM uses 3730 and the board design allows enabling 800MHz and 1GHz >>>> OPPs. However, We need Smart reflex class 1.5 and ABB to enable 1GHz safely. >>>> For the moment, we tweak the default table to allow for 800Mhz OPP usage. >>> Isn't this common to any board using 3730 (or 3630?) >> no it is not. only certain boards are capable of higher frequencies - there is a procedure called PDN analysis and vmin search that needs to be performed to guarentee this. > > What about the "new" 3530s that can run at 720MHz? Those have been speed binned and given a different SKU. I'm using the attached 4 patches (Tony master + beagle patches _+ dvfs: http://dominion.thruhere.net/git/cgit.cgi/linux-omap/log/?h=koen/beagle-next) on my beagle C4 and overo tide to get 720MHz. They don't really work: for 3530, keep in mind that not *all* boards can support 720MHz (esp the old 3430 boards, like my poor SDP3430). since we consider 3530 as 3430 as well, add a default disabled 720MHz OPP in the 3430 table and enable it: a) if this has anything to do with board behavior (which, unlike 36xx, I dont think is the case for 35xx), enable similar to this patch on the required boards on a need basis (e.g. based on board rev) b) if this is a silicon behavior, then, you should modify the omap3_opp_init to ensure that for the right silicon this is enabled (e.g. only for 3530 rev X onwards or something similar) - but you will need some way to detect it in s/w (not through bootargs please!) > > root at usrp-e1xx:~# cpufreq-set -f 720000 > [ 104.976318] platform iva.0: omap_voltage_scale: Already at the requestedrate 430000000 > [ 104.986236] platform mpu.0: omap_voltage_scale: Already at the requestedrate 600000000 > [ 104.996032] platform iva.0: omap_voltage_scale: Already at the requestedrate 430000000 > [ 105.006408] platform mpu.0: omap_voltage_scale: Already at the requestedrate 600000000 This is coz we dont have 720MHz and max enabled freq is 600MHz so it falls back to that freq. > > But: > > root at usrp-e1xx:~# dmesg | grep 720 > [ 0.000000] OMAP3430/3530 ES3.1 (l2cache iva sgx neon isp 720mhz ) > [ 0.000000] Kernel command line: console=ttyO2,115200n8 mpurate=720 vram=16M mem=99M at 0x80000000 mem=384M at 0x88000000 omapfb.mode=dvi:1024x768MR-24 at 60 omapfb.vram=0:8M,1:4M,2:4M omapdss.def_disp=dvi root=/dev/mmcblk0p2 rw rootfstype=ext3 rootwait > [ 0.000000] overo_opp_init: 720MHz MPU OPPs enabled! > [ 0.000000] Switched to new clocking rate (Crystal/Core/MPU): 26.0/224/720 MHz > > > root at usrp-e1xx:~# cpufreq-info > cpufrequtils 006: cpufreq-info (C) Dominik Brodowski 2004-2009 > Report errors and bugs to cpufreq at vger.kernel.org, please. > analyzing CPU 0: > driver: omap > CPUs which run at the same hardware frequency: 0 > CPUs which need to have their frequency coordinated by software: 0 > maximum transition latency: 300 us. > hardware limits: 125 MHz - 720 MHz > available frequency steps: 125 MHz, 250 MHz, 500 MHz, 550 MHz, 600 MHz, 720 MHz > available cpufreq governors: conservative, ondemand, userspace, powersave, performance > current policy: frequency should be within 125 MHz and 720 MHz. > The governor "userspace" may decide which speed to use > within this range. > current CPU frequency is 600 MHz (asserted by call to hardware). > cpufreq stats: 125 MHz:0.00%, 250 MHz:0.00%, 500 MHz:0.00%, 550 MHz:0.00%, 600 MHz:100.00%, 720 MHz:0.00% (1) > > So how do I "properly" get 720MHz on those parts? as discussed above. -- Regards, Nishanth Menon ^ permalink raw reply [flat|nested] 15+ messages in thread
* [PATCH 2/2] OMAP3: beagle xm: enable upto 800MHz OPP 2011-01-06 13:44 ` Nishanth Menon @ 2011-01-06 13:58 ` Premi, Sanjeev 2011-01-06 14:00 ` Nishanth Menon 2011-01-06 14:01 ` Koen Kooi 1 sibling, 1 reply; 15+ messages in thread From: Premi, Sanjeev @ 2011-01-06 13:58 UTC (permalink / raw) To: linux-arm-kernel > -----Original Message----- > From: linux-omap-owner at vger.kernel.org > [mailto:linux-omap-owner at vger.kernel.org] On Behalf Of Menon, Nishanth > Sent: Thursday, January 06, 2011 7:15 PM > To: Koen Kooi > Cc: Hilman, Kevin; l-o; l-a; Tony > Subject: Re: [PATCH 2/2] OMAP3: beagle xm: enable upto 800MHz OPP > > Koen Kooi had written, on 01/06/2011 07:00 AM, the following: > > Op 6 jan 2011, om 13:24 heeft Nishanth Menon het volgende > geschreven: > > > >> Kevin Hilman wrote, on 01/05/2011 05:28 PM: > >>> Nishanth Menon<nm@ti.com> writes: > >>> > >>>> Beagle XM uses 3730 and the board design allows enabling > 800MHz and 1GHz > >>>> OPPs. However, We need Smart reflex class 1.5 and ABB to > enable 1GHz safely. > >>>> For the moment, we tweak the default table to allow for > 800Mhz OPP usage. > >>> Isn't this common to any board using 3730 (or 3630?) > >> no it is not. only certain boards are capable of higher > frequencies - there is a procedure called PDN analysis and > vmin search that needs to be performed to guarentee this. > > > > What about the "new" 3530s that can run at 720MHz? Those > have been speed binned and given a different SKU. I'm using > the attached 4 patches (Tony master + beagle patches _+ dvfs: > http://dominion.thruhere.net/git/cgit.cgi/linux-omap/log/?h=ko > en/beagle-next) on my beagle C4 and overo tide to get 720MHz. > They don't really work: > for 3530, keep in mind that not *all* boards can support > 720MHz (esp the > old 3430 boards, like my poor SDP3430). > since we consider 3530 as 3430 as well, add a default disabled 720MHz > OPP in the 3430 table and enable it: > a) if this has anything to do with board behavior (which, > unlike 36xx, I > dont think is the case for 35xx), enable similar to this patch on the > required boards on a need basis (e.g. based on board rev) > b) if this is a silicon behavior, then, you should modify the > omap3_opp_init to ensure that for the right silicon this is enabled > (e.g. only for 3530 rev X onwards or something similar) - but > you will > need some way to detect it in s/w (not through bootargs please!) Nishanth, Some of the patches generic that Koen attached are based on my submissions. As part of migration to 2.6.37, I am in process of validating them on internal integration tree. Will post them soon... may be end of tomorrow. I will be testing them on OMAP3EVM. ~sanjeev [snip]...[snip] ^ permalink raw reply [flat|nested] 15+ messages in thread
* [PATCH 2/2] OMAP3: beagle xm: enable upto 800MHz OPP 2011-01-06 13:58 ` Premi, Sanjeev @ 2011-01-06 14:00 ` Nishanth Menon 2011-01-06 14:22 ` Premi, Sanjeev 0 siblings, 1 reply; 15+ messages in thread From: Nishanth Menon @ 2011-01-06 14:00 UTC (permalink / raw) To: linux-arm-kernel Premi, Sanjeev had written, on 01/06/2011 07:58 AM, the following: [..] > Some of the patches generic that Koen attached are based on my > submissions. As part of migration to 2.6.37, I am in process of > validating them on internal integration tree. Will post them > soon... may be end of tomorrow. > > I will be testing them on OMAP3EVM. Sure. please do post them to l-o and cc l-a - I suppose until then, they are unofficial if they are lying around in some private tree(even if viewable over internet ;) ). -- Regards, Nishanth Menon ^ permalink raw reply [flat|nested] 15+ messages in thread
* [PATCH 2/2] OMAP3: beagle xm: enable upto 800MHz OPP 2011-01-06 14:00 ` Nishanth Menon @ 2011-01-06 14:22 ` Premi, Sanjeev 0 siblings, 0 replies; 15+ messages in thread From: Premi, Sanjeev @ 2011-01-06 14:22 UTC (permalink / raw) To: linux-arm-kernel > -----Original Message----- > From: Menon, Nishanth > Sent: Thursday, January 06, 2011 7:31 PM > To: Premi, Sanjeev > Cc: Koen Kooi; Hilman, Kevin; l-o; l-a; Tony > Subject: Re: [PATCH 2/2] OMAP3: beagle xm: enable upto 800MHz OPP > > Premi, Sanjeev had written, on 01/06/2011 07:58 AM, the following: > [..] > > Some of the patches generic that Koen attached are based on my > > submissions. As part of migration to 2.6.37, I am in process of > > validating them on internal integration tree. Will post them > > soon... may be end of tomorrow. > > > > I will be testing them on OMAP3EVM. > Sure. please do post them to l-o and cc l-a - I suppose until > then, they > are unofficial if they are lying around in some private tree(even if > viewable over internet ;) ). That's what I meant by submitting :) My plans were tomorrow/MON - wasn't expecting this thread to happen!! ~sanjeev > > -- > Regards, > Nishanth Menon > ^ permalink raw reply [flat|nested] 15+ messages in thread
* [PATCH 2/2] OMAP3: beagle xm: enable upto 800MHz OPP 2011-01-06 13:44 ` Nishanth Menon 2011-01-06 13:58 ` Premi, Sanjeev @ 2011-01-06 14:01 ` Koen Kooi 2011-01-06 14:07 ` Nishanth Menon 1 sibling, 1 reply; 15+ messages in thread From: Koen Kooi @ 2011-01-06 14:01 UTC (permalink / raw) To: linux-arm-kernel Op 6 jan 2011, om 14:44 heeft Nishanth Menon het volgende geschreven: > Koen Kooi had written, on 01/06/2011 07:00 AM, the following: >> Op 6 jan 2011, om 13:24 heeft Nishanth Menon het volgende geschreven: >>> Kevin Hilman wrote, on 01/05/2011 05:28 PM: >>>> Nishanth Menon<nm@ti.com> writes: >>>> >>>>> Beagle XM uses 3730 and the board design allows enabling 800MHz and 1GHz >>>>> OPPs. However, We need Smart reflex class 1.5 and ABB to enable 1GHz safely. >>>>> For the moment, we tweak the default table to allow for 800Mhz OPP usage. >>>> Isn't this common to any board using 3730 (or 3630?) >>> no it is not. only certain boards are capable of higher frequencies - there is a procedure called PDN analysis and vmin search that needs to be performed to guarentee this. >> What about the "new" 3530s that can run at 720MHz? Those have been speed binned and given a different SKU. I'm using the attached 4 patches (Tony master + beagle patches _+ dvfs: http://dominion.thruhere.net/git/cgit.cgi/linux-omap/log/?h=koen/beagle-next) on my beagle C4 and overo tide to get 720MHz. They don't really work: > for 3530, keep in mind that not *all* boards can support 720MHz (esp the old 3430 boards, like my poor SDP3430). Right, that's why it's a different SKU and we can probe for it, see the 0002 patch I attached. > since we consider 3530 as 3430 as well, add a default disabled 720MHz OPP in the 3430 table That's what 0001 does :) > and enable it: > a) if this has anything to do with board behavior (which, unlike 36xx, I dont think is the case for 35xx), enable similar to this patch on the required boards on a need basis (e.g. based on board rev) That's what 0003 and 0004 are doing for overo and beagle > b) if this is a silicon behavior, then, you should modify the omap3_opp_init to ensure that for the right silicon this is enabled (e.g. only for 3530 rev X onwards or something similar) - but you will need some way to detect it in s/w (not through bootargs please!) See 0002, it does it as an omap feature. > >> root at usrp-e1xx:~# cpufreq-set -f 720000 >> [ 104.976318] platform iva.0: omap_voltage_scale: Already at the requestedrate 430000000 >> [ 104.986236] platform mpu.0: omap_voltage_scale: Already at the requestedrate 600000000 >> [ 104.996032] platform iva.0: omap_voltage_scale: Already at the requestedrate 430000000 >> [ 105.006408] platform mpu.0: omap_voltage_scale: Already at the requestedrate 600000000 > This is coz we dont have 720MHz and max enabled freq is 600MHz so it falls back to that freq. Even after 0001 adds it to the table and 0004 enables it? regards, Koen ^ permalink raw reply [flat|nested] 15+ messages in thread
* [PATCH 2/2] OMAP3: beagle xm: enable upto 800MHz OPP 2011-01-06 14:01 ` Koen Kooi @ 2011-01-06 14:07 ` Nishanth Menon 0 siblings, 0 replies; 15+ messages in thread From: Nishanth Menon @ 2011-01-06 14:07 UTC (permalink / raw) To: linux-arm-kernel Koen Kooi had written, on 01/06/2011 08:01 AM, the following: > Op 6 jan 2011, om 14:44 heeft Nishanth Menon het volgende geschreven: > >> Koen Kooi had written, on 01/06/2011 07:00 AM, the following: >>> Op 6 jan 2011, om 13:24 heeft Nishanth Menon het volgende geschreven: >>>> Kevin Hilman wrote, on 01/05/2011 05:28 PM: >>>>> Nishanth Menon<nm@ti.com> writes: >>>>> >>>>>> Beagle XM uses 3730 and the board design allows enabling 800MHz and 1GHz >>>>>> OPPs. However, We need Smart reflex class 1.5 and ABB to enable 1GHz safely. >>>>>> For the moment, we tweak the default table to allow for 800Mhz OPP usage. >>>>> Isn't this common to any board using 3730 (or 3630?) >>>> no it is not. only certain boards are capable of higher frequencies - there is a procedure called PDN analysis and vmin search that needs to be performed to guarentee this. >>> What about the "new" 3530s that can run at 720MHz? Those have been speed binned and given a different SKU. I'm using the attached 4 patches (Tony master + beagle patches _+ dvfs: http://dominion.thruhere.net/git/cgit.cgi/linux-omap/log/?h=koen/beagle-next) on my beagle C4 and overo tide to get 720MHz. They don't really work: >> for 3530, keep in mind that not *all* boards can support 720MHz (esp the old 3430 boards, like my poor SDP3430). > > Right, that's why it's a different SKU and we can probe for it, see the 0002 patch I attached. please discuss with Sanjeev on patch ownership and post required series using git send-email :) >> since we consider 3530 as 3430 as well, add a default disabled 720MHz OPP in the 3430 table > > That's what 0001 does :) > >> and enable it: >> a) if this has anything to do with board behavior (which, unlike 36xx, I dont think is the case for 35xx), enable similar to this patch on the required boards on a need basis (e.g. based on board rev) > > That's what 0003 and 0004 are doing for overo and beagle then it is wrong. see below > >> b) if this is a silicon behavior, then, you should modify the omap3_opp_init to ensure that for the right silicon this is enabled (e.g. only for 3530 rev X onwards or something similar) - but you will need some way to detect it in s/w (not through bootargs please!) > > See 0002, it does it as an omap feature. if it is OMAP feature, you should be doing this in omap3_opp_init instead of each and every board file! (basically patches 3 and 4 are wrong!). > >>> root at usrp-e1xx:~# cpufreq-set -f 720000 >>> [ 104.976318] platform iva.0: omap_voltage_scale: Already at the requestedrate 430000000 >>> [ 104.986236] platform mpu.0: omap_voltage_scale: Already at the requestedrate 600000000 >>> [ 104.996032] platform iva.0: omap_voltage_scale: Already at the requestedrate 430000000 >>> [ 105.006408] platform mpu.0: omap_voltage_scale: Already at the requestedrate 600000000 >> This is coz we dont have 720MHz and max enabled freq is 600MHz so it falls back to that freq. > > Even after 0001 adds it to the table and 0004 enables it? a) have you checked if the clock framework has the required bits? b) voltage layer maintains it's own voltage table as well (surprise :D).. so you need to add to that as well! see the secret table in arch/arm/mach-omap2/voltage.c - I prefer all voltage and frequency information to be in a centralized location to prevent mess like this from happening, but sorry we gotta merge these two tables at some point ahead IMHO, we are not there yet. -- Regards, Nishanth Menon ^ permalink raw reply [flat|nested] 15+ messages in thread
* [PATCH 2/2] OMAP3: beagle xm: enable upto 800MHz OPP 2011-01-05 20:49 ` [PATCH 2/2] OMAP3: beagle xm: enable upto 800MHz OPP Nishanth Menon 2011-01-05 23:28 ` Kevin Hilman @ 2011-01-07 13:04 ` Aaro Koskinen 2011-01-07 13:30 ` Nishanth Menon 1 sibling, 1 reply; 15+ messages in thread From: Aaro Koskinen @ 2011-01-07 13:04 UTC (permalink / raw) To: linux-arm-kernel Hi, On Wed, 5 Jan 2011, Nishanth Menon wrote: > +static void __init beagle_opp_init(void) > +{ > + int r = 0; > + > + /* Initialize the omap3 opp table */ > + if (omap3_opp_init()) { > + pr_err("%s: opp default init failed\n", __func__); > + return; > + } > + > + /* Custom OPP enabled for XM */ > + if (omap3_beagle_get_rev() == OMAP3BEAGLE_BOARD_XM) { > + struct omap_hwmod *mh = omap_hwmod_lookup("mpu"); > + struct omap_hwmod *dh = omap_hwmod_lookup("iva"); > + struct device *dev; > + > + if (!mh || !dh) { > + pr_err("%s: Aiee.. no mpu/dsp devices? %p %p\n", > + __func__, mh, dh); > + r = -EINVAL; > + } else { > + /* Enable MPU 1GHz and lower opps */ > + dev = &mh->od->pdev.dev; > + r = opp_enable(dev, 800000000); > + /* TODO: MPU 1GHz needs SR and ABB */ > + > + /* Enable IVA 800MHz and lower opps */ > + dev = &dh->od->pdev.dev; > + r |= opp_enable(dev, 660000000); > + /* TODO: DSP 800MHz needs SR and ABB */ > + } > + if (r) { > + pr_err("%s: failed to enable higher opp %d\n", > + __func__, r); > + /* > + * Cleanup - disable the higher freqs - we dont care > + * about the results > + */ > + dev = &mh->od->pdev.dev; > + opp_disable(dev, 800000000); > + dev = &dh->od->pdev.dev; This branch will be reached also when !mh || !dh, so it won't work. > + opp_disable(dev, 660000000); > + } > + } > +} A. ^ permalink raw reply [flat|nested] 15+ messages in thread
* [PATCH 2/2] OMAP3: beagle xm: enable upto 800MHz OPP 2011-01-07 13:04 ` Aaro Koskinen @ 2011-01-07 13:30 ` Nishanth Menon 0 siblings, 0 replies; 15+ messages in thread From: Nishanth Menon @ 2011-01-07 13:30 UTC (permalink / raw) To: linux-arm-kernel Aaro Koskinen wrote, on 01/07/2011 07:04 AM: > On Wed, 5 Jan 2011, Nishanth Menon wrote: >> +static void __init beagle_opp_init(void) >> +{ >> + int r = 0; >> + >> + /* Initialize the omap3 opp table */ >> + if (omap3_opp_init()) { >> + pr_err("%s: opp default init failed\n", __func__); >> + return; >> + } >> + >> + /* Custom OPP enabled for XM */ >> + if (omap3_beagle_get_rev() == OMAP3BEAGLE_BOARD_XM) { >> + struct omap_hwmod *mh = omap_hwmod_lookup("mpu"); >> + struct omap_hwmod *dh = omap_hwmod_lookup("iva"); >> + struct device *dev; >> + >> + if (!mh || !dh) { >> + pr_err("%s: Aiee.. no mpu/dsp devices? %p %p\n", >> + __func__, mh, dh); >> + r = -EINVAL; >> + } else { >> + /* Enable MPU 1GHz and lower opps */ >> + dev = &mh->od->pdev.dev; >> + r = opp_enable(dev, 800000000); >> + /* TODO: MPU 1GHz needs SR and ABB */ >> + >> + /* Enable IVA 800MHz and lower opps */ >> + dev = &dh->od->pdev.dev; >> + r |= opp_enable(dev, 660000000); >> + /* TODO: DSP 800MHz needs SR and ABB */ >> + } >> + if (r) { >> + pr_err("%s: failed to enable higher opp %d\n", >> + __func__, r); >> + /* >> + * Cleanup - disable the higher freqs - we dont care >> + * about the results >> + */ >> + dev = &mh->od->pdev.dev; >> + opp_disable(dev, 800000000); >> + dev = &dh->od->pdev.dev; > > This branch will be reached also when !mh || !dh, so it won't work. arrgh.. thanks for catching it - will fix and repost. -- Regards, Nishanth Menon ^ permalink raw reply [flat|nested] 15+ messages in thread
end of thread, other threads:[~2011-02-01 22:01 UTC | newest] Thread overview: 15+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2011-01-05 20:49 [PATCH 0/2] OMAP3: Beagle: enable 800MHz for xm Nishanth Menon 2011-01-05 20:49 ` [PATCH 1/2] omap3|4: opp: make omapx_opp_init non-static Nishanth Menon 2011-02-01 22:01 ` Kevin Hilman 2011-01-05 20:49 ` [PATCH 2/2] OMAP3: beagle xm: enable upto 800MHz OPP Nishanth Menon 2011-01-05 23:28 ` Kevin Hilman 2011-01-06 12:24 ` Nishanth Menon 2011-01-06 13:00 ` Koen Kooi 2011-01-06 13:44 ` Nishanth Menon 2011-01-06 13:58 ` Premi, Sanjeev 2011-01-06 14:00 ` Nishanth Menon 2011-01-06 14:22 ` Premi, Sanjeev 2011-01-06 14:01 ` Koen Kooi 2011-01-06 14:07 ` Nishanth Menon 2011-01-07 13:04 ` Aaro Koskinen 2011-01-07 13:30 ` Nishanth Menon
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).