aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-omap2/board-omap3beagle.c
diff options
context:
space:
mode:
authorNishanth Menon <nm@ti.com>2011-01-07 10:41:13 -0500
committerKevin Hilman <khilman@ti.com>2011-03-09 19:15:49 -0500
commit8743410d4971c5510a7d09293f5f3f89d8081059 (patch)
tree3b6fcf20fdf7f9a60118bf8e1167bc8cbd53e906 /arch/arm/mach-omap2/board-omap3beagle.c
parenteb05ead90ddb2a4e51d34f6c25f01c2e0653da59 (diff)
OMAP3: beagle xm: enable up to 800MHz OPP
OMP3630 silicon can enable higher frequencies only depending on the board characteristics meeting the recommended standards, and has to be selectively toggled. Beagle XM uses 3730 variant 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> Signed-off-by: Kevin Hilman <khilman@ti.com>
Diffstat (limited to 'arch/arm/mach-omap2/board-omap3beagle.c')
-rw-r--r--arch/arm/mach-omap2/board-omap3beagle.c50
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 46d814ab5656..91b4e1438aec 100644
--- a/arch/arm/mach-omap2/board-omap3beagle.c
+++ b/arch/arm/mach-omap2/board-omap3beagle.c
@@ -23,6 +23,7 @@
23#include <linux/gpio.h> 23#include <linux/gpio.h>
24#include <linux/input.h> 24#include <linux/input.h>
25#include <linux/gpio_keys.h> 25#include <linux/gpio_keys.h>
26#include <linux/opp.h>
26 27
27#include <linux/mtd/mtd.h> 28#include <linux/mtd/mtd.h>
28#include <linux/mtd/partitions.h> 29#include <linux/mtd/partitions.h>
@@ -45,10 +46,12 @@
45#include <plat/gpmc.h> 46#include <plat/gpmc.h>
46#include <plat/nand.h> 47#include <plat/nand.h>
47#include <plat/usb.h> 48#include <plat/usb.h>
49#include <plat/omap_device.h>
48 50
49#include "mux.h" 51#include "mux.h"
50#include "hsmmc.h" 52#include "hsmmc.h"
51#include "timer-gp.h" 53#include "timer-gp.h"
54#include "pm.h"
52 55
53#define NAND_BLOCK_SIZE SZ_128K 56#define NAND_BLOCK_SIZE SZ_128K
54 57
@@ -610,6 +613,52 @@ static struct omap_musb_board_data musb_board_data = {
610 .power = 100, 613 .power = 100,
611}; 614};
612 615
616static void __init beagle_opp_init(void)
617{
618 int r = 0;
619
620 /* Initialize the omap3 opp table */
621 if (omap3_opp_init()) {
622 pr_err("%s: opp default init failed\n", __func__);
623 return;
624 }
625
626 /* Custom OPP enabled for XM */
627 if (omap3_beagle_get_rev() == OMAP3BEAGLE_BOARD_XM) {
628 struct omap_hwmod *mh = omap_hwmod_lookup("mpu");
629 struct omap_hwmod *dh = omap_hwmod_lookup("iva");
630 struct device *dev;
631
632 if (!mh || !dh) {
633 pr_err("%s: Aiee.. no mpu/dsp devices? %p %p\n",
634 __func__, mh, dh);
635 return;
636 }
637 /* Enable MPU 1GHz and lower opps */
638 dev = &mh->od->pdev.dev;
639 r = opp_enable(dev, 800000000);
640 /* TODO: MPU 1GHz needs SR and ABB */
641
642 /* Enable IVA 800MHz and lower opps */
643 dev = &dh->od->pdev.dev;
644 r |= opp_enable(dev, 660000000);
645 /* TODO: DSP 800MHz needs SR and ABB */
646 if (r) {
647 pr_err("%s: failed to enable higher opp %d\n",
648 __func__, r);
649 /*
650 * Cleanup - disable the higher freqs - we dont care
651 * about the results
652 */
653 dev = &mh->od->pdev.dev;
654 opp_disable(dev, 800000000);
655 dev = &dh->od->pdev.dev;
656 opp_disable(dev, 660000000);
657 }
658 }
659 return;
660}
661
613static void __init omap3_beagle_init(void) 662static void __init omap3_beagle_init(void)
614{ 663{
615 omap3_mux_init(board_mux, OMAP_PACKAGE_CBB); 664 omap3_mux_init(board_mux, OMAP_PACKAGE_CBB);
@@ -633,6 +682,7 @@ static void __init omap3_beagle_init(void)
633 omap_mux_init_signal("sdrc_cke1", OMAP_PIN_OUTPUT); 682 omap_mux_init_signal("sdrc_cke1", OMAP_PIN_OUTPUT);
634 683
635 beagle_display_init(); 684 beagle_display_init();
685 beagle_opp_init();
636} 686}
637 687
638MACHINE_START(OMAP3_BEAGLE, "OMAP3 Beagle Board") 688MACHINE_START(OMAP3_BEAGLE, "OMAP3 Beagle Board")