summaryrefslogtreecommitdiffstats
path: root/board
diff options
context:
space:
mode:
Diffstat (limited to 'board')
-rw-r--r--board/goldelico/beagle-hybrid/Makefile2
-rw-r--r--board/goldelico/beagle-hybrid/beagle.c1
-rw-r--r--board/goldelico/beagle-hybrid/beagle.h1
-rw-r--r--board/goldelico/beagle-hybrid/beaglehyb.c24
-rw-r--r--board/goldelico/beagle-hybrid/beaglehyb.h18
-rw-r--r--board/goldelico/gta04/gps.c14
-rw-r--r--board/goldelico/gta04/jbt6k74.c11
7 files changed, 67 insertions, 4 deletions
diff --git a/board/goldelico/beagle-hybrid/Makefile b/board/goldelico/beagle-hybrid/Makefile
index ef59f12..b2dc8eb 100644
--- a/board/goldelico/beagle-hybrid/Makefile
+++ b/board/goldelico/beagle-hybrid/Makefile
@@ -25,7 +25,7 @@ include $(TOPDIR)/config.mk
LIB = $(obj)lib$(BOARD).a
-COBJS := beagle.o ../gta04/TD028TTEC1.o ../gta04/jbt6k74.o ../gta04/backlight.o ../gta04/status.o ../gta04/tsc2007.o ../gta04/dssfb.o ../gta04/gps.o ../gta04/shutdown.o ../gta04/commands.o
+COBJS := beaglehyb.o ../gta04/TD028TTEC1.o ../gta04/jbt6k74.o ../gta04/backlight.o ../gta04/status.o ../gta04/tsc2007.o ../gta04/dssfb.o ../gta04/gps.o ../gta04/shutdown.o ../gta04/commands.o
SRCS := $(COBJS:.o=.c)
OBJS := $(addprefix $(obj),$(COBJS))
diff --git a/board/goldelico/beagle-hybrid/beagle.c b/board/goldelico/beagle-hybrid/beagle.c
deleted file mode 100644
index f060ec9..0000000
--- a/board/goldelico/beagle-hybrid/beagle.c
+++ /dev/null
@@ -1 +0,0 @@
-#include "../../ti/beagle/beagle.c" \ No newline at end of file
diff --git a/board/goldelico/beagle-hybrid/beagle.h b/board/goldelico/beagle-hybrid/beagle.h
deleted file mode 100644
index f560d84..0000000
--- a/board/goldelico/beagle-hybrid/beagle.h
+++ /dev/null
@@ -1 +0,0 @@
-#include "../../ti/beagle/beagle.h" \ No newline at end of file
diff --git a/board/goldelico/beagle-hybrid/beaglehyb.c b/board/goldelico/beagle-hybrid/beaglehyb.c
new file mode 100644
index 0000000..7fbe8d2
--- /dev/null
+++ b/board/goldelico/beagle-hybrid/beaglehyb.c
@@ -0,0 +1,24 @@
+#include <common.h>
+#include <twl4030.h>
+#include <asm/io.h>
+#include <asm/arch/mmc_host_def.h>
+#include <asm/arch/mux.h>
+#include <asm/arch/sys_proto.h>
+#include <asm/arch/gpio.h>
+#include <asm/mach-types.h>
+#include "../../ti/beagle/beagle.h"
+#include "beaglehyb.h"
+
+// make us initialize using both pinmux sets
+
+void muxinit(void)
+{
+ MUX_BEAGLE();
+ MUX_BEAGLE_HYBRID();
+}
+
+#undef MUX_BEAGLE
+#define MUX_BEAGLE() muxinit()
+
+// take the original beagle.c code
+#include "../../ti/beagle/beagle.c"
diff --git a/board/goldelico/beagle-hybrid/beaglehyb.h b/board/goldelico/beagle-hybrid/beaglehyb.h
new file mode 100644
index 0000000..71470f8
--- /dev/null
+++ b/board/goldelico/beagle-hybrid/beaglehyb.h
@@ -0,0 +1,18 @@
+#define MUX_BEAGLE_HYBRID() \
+MUX_VAL(CP(MMC2_CLK), (IEN | PTU | EN | M0)) /*GPIO_130 -> MMC2_CLK*/\
+MUX_VAL(CP(MMC2_CMD), (IEN | PTU | EN | M0)) /*GPIO_131 -> MMC2_CMD*/\
+MUX_VAL(CP(MMC2_DAT0), (IEN | PTU | EN | M0)) /*GPIO_132 -> MMC2_DAT0*/\
+MUX_VAL(CP(MMC2_DAT1), (IEN | PTU | EN | M0)) /*GPIO_133 -> MMC2_DAT1*/\
+MUX_VAL(CP(MMC2_DAT2), (IEN | PTU | EN | M0)) /*GPIO_134 -> MMC2_DAT2*/\
+MUX_VAL(CP(MMC2_DAT3), (IEN | PTU | EN | M0)) /*GPIO_135 -> MMC2_DAT3*/\
+MUX_VAL(CP(MMC2_DAT4), (IEN | PTU | EN | M4)) /*GPIO_136 - AUX */\
+MUX_VAL(CP(MMC2_DAT5), (IEN | PTU | EN | M4)) /*GPIO_137 - POWER */\
+MUX_VAL(CP(MMC2_DAT6), (IEN | PTU | DIS | M4)) /*GPIO_138 - EXT-ANT */\
+MUX_VAL(CP(MMC2_DAT7), (IEN | PTU | EN | M4)) /*GPIO_139 - RS232 EXT */\
+MUX_VAL(CP(MCBSP1_CLKR), (IDIS | PTD | DIS | M4)) /*GPIO_156 - GPS ON(0)/OFF(1)*/\
+MUX_VAL(CP(MCBSP1_FSR), (IEN | PTU | EN | M4)) /*GPIO_157 - PENIRQ */\
+MUX_VAL(CP(MCBSP1_DX), (IDIS | PTD | EN | M4)) /*GPIO_158 - DOUT */\
+MUX_VAL(CP(MCBSP1_DR), (IEN | PTU | DIS | M4)) /*GPIO_159 - DIN - pulled up */\
+MUX_VAL(CP(MCBSP_CLKS), (IEN | PTU | DIS | M0)) /*McBSP_CLKS*/\
+MUX_VAL(CP(MCBSP1_FSX), (IDIS | PTU | EN | M4)) /*GPIO_161 - CS */\
+MUX_VAL(CP(MCBSP1_CLKX), (IDIS | PTD | EN | M4)) /*GPIO_162 - SCL */
diff --git a/board/goldelico/gta04/gps.c b/board/goldelico/gta04/gps.c
index e9ad5dd..3befeca 100644
--- a/board/goldelico/gta04/gps.c
+++ b/board/goldelico/gta04/gps.c
@@ -29,6 +29,7 @@
#include <asm/arch/gpio.h>
#include <asm/mach-types.h>
#include <ns16550.h>
+#include <twl4030.h>
#include "gps.h"
#define GPIO_GPSEXT 138 // external GPS antenna plugged in
@@ -36,6 +37,16 @@
int gps_init(void)
{
+ extern int get_board_revision(void);
+#define REVISION_XM 0
+ if(get_board_revision() == REVISION_XM) {
+ /* Set VAUX1 to 3.3V for GTA04E display board */
+ twl4030_pmrecv_vsel_cfg(TWL4030_PM_RECEIVER_VAUX1_DEDICATED,
+ /*TWL4030_PM_RECEIVER_VAUX1_VSEL_33*/ 0x07,
+ TWL4030_PM_RECEIVER_VAUX1_DEV_GRP,
+ TWL4030_PM_RECEIVER_DEV_GRP_P1);
+ udelay(5000);
+ }
omap_request_gpio(GPIO_GPS_ON);
omap_set_gpio_direction(GPIO_GPS_ON, 0); // output
omap_request_gpio(GPIO_GPSEXT);
@@ -57,6 +68,8 @@ void gps_off(void)
omap_set_gpio_dataout(GPIO_GPS_ON, 0);
}
+static int lastant=-1;
+
void gps_echo(void)
{
#define MODE_X_DIV 16
@@ -66,7 +79,6 @@ void gps_echo(void)
while (1)
{ // echo in both directions
int ant=omap_get_gpio_datain(GPIO_GPSEXT);
- static int lastant=-1;
if(ant != lastant)
{ // changed
if(ant)
diff --git a/board/goldelico/gta04/jbt6k74.c b/board/goldelico/gta04/jbt6k74.c
index 8a86b0b..4e6a2e0 100644
--- a/board/goldelico/gta04/jbt6k74.c
+++ b/board/goldelico/gta04/jbt6k74.c
@@ -33,6 +33,7 @@
#include <asm/arch/gpio.h>
#include <asm/mach-types.h>
#include <asm/arch/dss.h>
+#include <twl4030.h>
#include "dssfb.h"
#include "jbt6k74.h"
@@ -312,6 +313,16 @@ int jbt6k74_display_onoff(int on)
int board_video_init(GraphicDevice *pGD)
{
+ extern int get_board_revision(void);
+#define REVISION_XM 0
+ if(get_board_revision() == REVISION_XM) {
+ /* Set VAUX1 to 3.3V for GTA04E display board */
+ twl4030_pmrecv_vsel_cfg(TWL4030_PM_RECEIVER_VAUX1_DEDICATED,
+ /*TWL4030_PM_RECEIVER_VAUX1_VSEL_33*/ 0x07,
+ TWL4030_PM_RECEIVER_VAUX1_DEV_GRP,
+ TWL4030_PM_RECEIVER_DEV_GRP_P1);
+ udelay(5000);
+ }
if(jbt_reg_init()) // initialize SPI
{
printf("No LCM connected\n");