1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
|
--- /tmp/board-omap3beagle.c 2009-01-12 15:46:26.000000000 +0100
+++ git/arch/arm/mach-omap2/board-omap3beagle.c 2009-01-12 15:46:28.000000000 +0100
@@ -41,14 +41,73 @@
#include <mach/usb-ehci.h>
#include <mach/common.h>
#include <mach/gpmc.h>
+#include <mach/omap-pm.h>
#include <mach/nand.h>
#include <mach/mux.h>
#include <mach/omapfb.h>
#include <mach/display.h>
+#include <mach/clock.h>
+
#include "twl4030-generic-scripts.h"
#include "mmc-twl4030.h"
+#include "pm.h"
+
+/* MPU speeds */
+#define S600M 600000000
+#define S550M 550000000
+#define S500M 500000000
+#define S250M 250000000
+#define S125M 125000000
+
+/* DSP speeds */
+#define S430M 430000000
+#define S400M 400000000
+#define S360M 360000000
+#define S180M 180000000
+#define S90M 90000000
+
+/* L3 speeds */
+#define S83M 83000000
+#define S166M 166000000
+
+static struct omap_opp mpu_rate_table[] = {
+ {0, 0, 0},
+ /*OPP1*/
+ {S125M, VDD1_OPP1, 0x18},
+ /*OPP2*/
+ {S250M, VDD1_OPP2, 0x20},
+ /*OPP3*/
+ {S500M, VDD1_OPP3, 0x30},
+ /*OPP4*/
+ {S550M, VDD1_OPP4, 0x36},
+ /*OPP5*/
+ {S600M, VDD1_OPP5, 0x3C},
+};
+static struct omap_opp l3_rate_table[] = {
+ {0, 0, 0},
+ /*OPP1*/
+ {0, VDD2_OPP1, 0x18},
+ /*OPP2*/
+ {S83M, VDD2_OPP2, 0x20},
+ /*OPP3*/
+ {S166M, VDD2_OPP3, 0x2C},
+};
+
+struct omap_opp dsp_rate_table[] = {
+ {0, 0, 0},
+ /*OPP1*/
+ {S90M, VDD1_OPP1, 0x18},
+ /*OPP2*/
+ {S180M, VDD1_OPP2, 0x20},
+ /*OPP3*/
+ {S360M, VDD1_OPP3, 0x30},
+ /*OPP4*/
+ {S400M, VDD1_OPP4, 0x36},
+ /*OPP5*/
+ {S430M, VDD1_OPP5, 0x3C},
+};
#define GPMC_CS0_BASE 0x60
#define GPMC_CS_SIZE 0x30
@@ -142,7 +201,15 @@
* power switch and overcurrent detect
*/
- /* TODO: This needs to be modified to not rely on u-boot */
+ gpio_request(gpio + 1, "EHCI_nOC");
+ gpio_direction_input(gpio + 1);
+
+ /* TWL4030_GPIO_MAX + 0 == ledA, EHCI nEN_USB_PWR (out, active low) */
+ gpio_request(gpio + TWL4030_GPIO_MAX, "nEN_USB_PWR");
+ gpio_direction_output(gpio + TWL4030_GPIO_MAX, 1);
+
+ /* TWL4030_GPIO_MAX + 1 == ledB, PMU_STAT (out, active low LED) */
+ gpio_leds[2].gpio = gpio + TWL4030_GPIO_MAX + 1;
return 0;
}
@@ -227,7 +294,8 @@
static void __init omap3_beagle_init_irq(void)
{
- omap2_init_common_hw(mt46h32m32lf6_sdrc_params, NULL, NULL, NULL);
+ omap2_init_common_hw(mt46h32m32lf6_sdrc_params, mpu_rate_table,
+ dsp_rate_table, l3_rate_table);
omap_init_irq();
omap_gpio_init();
}
|