summaryrefslogtreecommitdiffstats
path: root/u-boot
diff options
context:
space:
mode:
authorH. Nikolaus Schaller <hns@goldelico.com>2012-08-30 12:07:12 +0200
committerH. Nikolaus Schaller <hns@goldelico.com>2012-08-30 12:07:12 +0200
commit4d31694ac41749a9a16617294ad42746744a03e3 (patch)
tree20453ef7e4fcf8e33dcc84f66ca233b4742c38cb /u-boot
parent3d98c3057fade551a00a87f87b14eaa28c43e1d8 (diff)
downloadbootable_bootloader_goldelico_gta04-4d31694ac41749a9a16617294ad42746744a03e3.zip
bootable_bootloader_goldelico_gta04-4d31694ac41749a9a16617294ad42746744a03e3.tar.gz
bootable_bootloader_goldelico_gta04-4d31694ac41749a9a16617294ad42746744a03e3.tar.bz2
made config and file names more consistent to $BOARD+$EXPANDER scheme
Diffstat (limited to 'u-boot')
-rw-r--r--u-boot/board/goldelico/beagleb1/Makefile (renamed from u-boot/board/goldelico/beagle-hybrid/Makefile)2
-rw-r--r--u-boot/board/goldelico/beagleb1/beagleb1.c (renamed from u-boot/board/goldelico/beagle-hybrid/beaglehyb.c)2
-rw-r--r--u-boot/board/goldelico/beagleb1/beagleb1.h (renamed from u-boot/board/goldelico/beagle-hybrid/beaglehyb.h)0
-rw-r--r--u-boot/board/goldelico/beagleb1/config.mk (renamed from u-boot/board/goldelico/beagle-expander/config.mk)0
-rw-r--r--u-boot/board/goldelico/beagleb2/Makefile (renamed from u-boot/board/goldelico/beagle-expander/Makefile)2
-rw-r--r--u-boot/board/goldelico/beagleb2/beagleb2.c (renamed from u-boot/board/goldelico/beagle-expander/beagleexpander.c)2
-rw-r--r--u-boot/board/goldelico/beagleb2/beagleb2.h (renamed from u-boot/board/goldelico/beagle-expander/beagleexpander.h)0
-rw-r--r--u-boot/board/goldelico/beagleb2/config.mk (renamed from u-boot/board/goldelico/beagle-hybrid/config.mk)0
-rw-r--r--u-boot/board/goldelico/beagleb4/Makefile49
-rw-r--r--u-boot/board/goldelico/beagleb4/beagleb4.c24
-rw-r--r--u-boot/board/goldelico/beagleb4/beagleb4.h30
-rw-r--r--u-boot/board/goldelico/beagleb4/config.mk33
-rw-r--r--u-boot/board/goldelico/gta04/TD028TTEC1.c29
-rw-r--r--u-boot/board/goldelico/gta04/TD028TTEC1.h2
-rw-r--r--u-boot/board/goldelico/gta04/backlight.c51
-rw-r--r--u-boot/board/goldelico/gta04/commands.c57
-rw-r--r--u-boot/board/goldelico/gta04/status.c61
-rw-r--r--u-boot/board/goldelico/gta04b2/COM37H3M05DTC.c39
-rw-r--r--u-boot/board/goldelico/gta04b2/COM37H3M05DTC.h2
-rw-r--r--u-boot/board/goldelico/gta04b3/LQ070Y3DB3B.c63
-rw-r--r--u-boot/board/goldelico/gta04b3/LQ070Y3DB3B.h2
-rw-r--r--u-boot/board/goldelico/gta04b3/gta04b3.c2
-rw-r--r--u-boot/board/goldelico/gta04b4/LQ050W1LC1B.c97
-rw-r--r--u-boot/board/goldelico/gta04b4/LQ050W1LC1B.h2
-rw-r--r--u-boot/board/goldelico/gta04b4/gta04b4.c2
-rw-r--r--u-boot/boards.cfg10
-rw-r--r--u-boot/include/configs/omap3_beagleb1.h (renamed from u-boot/include/configs/omap3_beaglehyb.h)4
-rw-r--r--u-boot/include/configs/omap3_beagleb2.h (renamed from u-boot/include/configs/omap3_beagleexpander.h)4
-rw-r--r--u-boot/include/configs/omap3_beagleb4.h41
-rw-r--r--u-boot/include/configs/omap3_gta04.h3
-rw-r--r--u-boot/include/configs/omap3_gta04b2.h5
-rw-r--r--u-boot/include/configs/omap3_gta04b3.h33
-rw-r--r--u-boot/include/configs/omap3_gta04b4.h33
33 files changed, 512 insertions, 174 deletions
diff --git a/u-boot/board/goldelico/beagle-hybrid/Makefile b/u-boot/board/goldelico/beagleb1/Makefile
index 58262d5..daadb68 100644
--- a/u-boot/board/goldelico/beagle-hybrid/Makefile
+++ b/u-boot/board/goldelico/beagleb1/Makefile
@@ -25,7 +25,7 @@ include $(TOPDIR)/config.mk
LIB = $(obj)lib$(BOARD).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/systest.o ../gta04/commands.o ../gta04/ulpi-phy.o ../gta04/twl4030-additions.o
+COBJS := beagleb1.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/systest.o ../gta04/commands.o ../gta04/ulpi-phy.o ../gta04/twl4030-additions.o
SRCS := $(COBJS:.o=.c)
OBJS := $(addprefix $(obj),$(COBJS))
diff --git a/u-boot/board/goldelico/beagle-hybrid/beaglehyb.c b/u-boot/board/goldelico/beagleb1/beagleb1.c
index 7fbe8d2..ff0e999 100644
--- a/u-boot/board/goldelico/beagle-hybrid/beaglehyb.c
+++ b/u-boot/board/goldelico/beagleb1/beagleb1.c
@@ -7,7 +7,7 @@
#include <asm/arch/gpio.h>
#include <asm/mach-types.h>
#include "../../ti/beagle/beagle.h"
-#include "beaglehyb.h"
+#include "beagleb1.h"
// make us initialize using both pinmux sets
diff --git a/u-boot/board/goldelico/beagle-hybrid/beaglehyb.h b/u-boot/board/goldelico/beagleb1/beagleb1.h
index 71470f8..71470f8 100644
--- a/u-boot/board/goldelico/beagle-hybrid/beaglehyb.h
+++ b/u-boot/board/goldelico/beagleb1/beagleb1.h
diff --git a/u-boot/board/goldelico/beagle-expander/config.mk b/u-boot/board/goldelico/beagleb1/config.mk
index cf055db..cf055db 100644
--- a/u-boot/board/goldelico/beagle-expander/config.mk
+++ b/u-boot/board/goldelico/beagleb1/config.mk
diff --git a/u-boot/board/goldelico/beagle-expander/Makefile b/u-boot/board/goldelico/beagleb2/Makefile
index e21cab3..af8d218 100644
--- a/u-boot/board/goldelico/beagle-expander/Makefile
+++ b/u-boot/board/goldelico/beagleb2/Makefile
@@ -25,7 +25,7 @@ include $(TOPDIR)/config.mk
LIB = $(obj)lib$(BOARD).o
-COBJS := beagleexpander.o ../gta04b2/COM37H3M05DTC.o ../gta04b2/trf7960.o ../gta04/backlight.o ../gta04/status.o ../gta04/tsc2007.o ../gta04/dssfb.o ../gta04/gps.o ../gta04/shutdown.o ../gta04/systest.o ../gta04/commands.o ../gta04/ulpi-phy.o ../gta04/twl4030-additions.o
+COBJS := beagleb2.o ../gta04b2/COM37H3M05DTC.o ../gta04b2/trf7960.o ../gta04/backlight.o ../gta04/status.o ../gta04/tsc2007.o ../gta04/dssfb.o ../gta04/gps.o ../gta04/shutdown.o ../gta04/systest.o ../gta04/commands.o ../gta04/ulpi-phy.o ../gta04/twl4030-additions.o
SRCS := $(COBJS:.o=.c)
OBJS := $(addprefix $(obj),$(COBJS))
diff --git a/u-boot/board/goldelico/beagle-expander/beagleexpander.c b/u-boot/board/goldelico/beagleb2/beagleb2.c
index bd58b1f..0f8387a 100644
--- a/u-boot/board/goldelico/beagle-expander/beagleexpander.c
+++ b/u-boot/board/goldelico/beagleb2/beagleb2.c
@@ -7,7 +7,7 @@
#include <asm/arch/gpio.h>
#include <asm/mach-types.h>
#include "../../ti/beagle/beagle.h"
-#include "beagleexpander.h"
+#include "beagleb2.h"
// make us initialize using both pinmux sets
diff --git a/u-boot/board/goldelico/beagle-expander/beagleexpander.h b/u-boot/board/goldelico/beagleb2/beagleb2.h
index 049d999..049d999 100644
--- a/u-boot/board/goldelico/beagle-expander/beagleexpander.h
+++ b/u-boot/board/goldelico/beagleb2/beagleb2.h
diff --git a/u-boot/board/goldelico/beagle-hybrid/config.mk b/u-boot/board/goldelico/beagleb2/config.mk
index cf055db..cf055db 100644
--- a/u-boot/board/goldelico/beagle-hybrid/config.mk
+++ b/u-boot/board/goldelico/beagleb2/config.mk
diff --git a/u-boot/board/goldelico/beagleb4/Makefile b/u-boot/board/goldelico/beagleb4/Makefile
new file mode 100644
index 0000000..ff6274c
--- /dev/null
+++ b/u-boot/board/goldelico/beagleb4/Makefile
@@ -0,0 +1,49 @@
+#
+# (C) Copyright 2000, 2001, 2002
+# Wolfgang Denk, DENX Software Engineering, wd@denx.de.
+#
+# See file CREDITS for list of people who contributed to this
+# project.
+#
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License as
+# published by the Free Software Foundation; either version 2 of
+# the License, or (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+# MA 02111-1307 USA
+#
+
+include $(TOPDIR)/config.mk
+
+LIB = $(obj)lib$(BOARD).o
+
+COBJS := beagleb4.o ../gta04b4/LQ050W1LC1B.o ../gta04b2/trf7960.o ../gta04/backlight.o ../gta04/status.o ../gta04/tsc2007.o ../gta04/dssfb.o ../gta04/gps.o ../gta04/shutdown.o ../gta04/systest.o ../gta04/commands.o ../gta04/ulpi-phy.o ../gta04/twl4030-additions.o
+
+SRCS := $(COBJS:.o=.c)
+OBJS := $(addprefix $(obj),$(COBJS))
+
+$(LIB): $(obj).depend $(OBJS)
+ $(call cmd_link_o_target, $(OBJS))
+
+clean:
+ rm -f $(OBJS)
+
+distclean: clean
+ rm -f $(LIB) core *.bak $(obj).depend
+
+#########################################################################
+
+# defines $(obj).depend target
+include $(SRCTREE)/rules.mk
+
+sinclude $(obj).depend
+
+######################################################################### \ No newline at end of file
diff --git a/u-boot/board/goldelico/beagleb4/beagleb4.c b/u-boot/board/goldelico/beagleb4/beagleb4.c
new file mode 100644
index 0000000..9be6b41
--- /dev/null
+++ b/u-boot/board/goldelico/beagleb4/beagleb4.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 "beagleb4.h"
+
+// make us initialize using both pinmux sets
+
+void muxinit(void)
+{
+ MUX_BEAGLE();
+ MUX_BEAGLE_EXPANDER();
+}
+
+#undef MUX_BEAGLE
+#define MUX_BEAGLE() muxinit()
+
+// take the original beagle.c code
+#include "../../ti/beagle/beagle.c"
diff --git a/u-boot/board/goldelico/beagleb4/beagleb4.h b/u-boot/board/goldelico/beagleb4/beagleb4.h
new file mode 100644
index 0000000..049d999
--- /dev/null
+++ b/u-boot/board/goldelico/beagleb4/beagleb4.h
@@ -0,0 +1,30 @@
+// all pins on BB expansion connector
+
+// GPIO -> BB-Pin -> Expander function
+
+#define MUX_BEAGLE_EXPANDER() \
+MUX_VAL(CP(MMC2_CLK), (IEN | PTD | EN | M1)) /*GPIO_130 -> MCSPI3-CLK -> TRF*/\
+MUX_VAL(CP(MMC2_CLK), (IDIS | PTD | EN | M4)) /*GPIO_130 -> MCSPI3-CLK -> TRF*/\
+MUX_VAL(CP(MMC2_CMD), (IDIS | PTD | EN | M1)) /*GPIO_131 -> MCSPI3-SIMO -> TRF*/\
+MUX_VAL(CP(MMC2_CMD), (IDIS | PTD | EN | M4)) /*GPIO_131 -> MCSPI3-SIMO -> TRF*/\
+MUX_VAL(CP(MMC2_DAT0), (IEN | PTU | EN | M1)) /*GPIO_132 -> MCSPI3-SOMI -> TRF*/\
+MUX_VAL(CP(MMC2_DAT0), (IEN | PTU | EN | M4)) /*GPIO_132 -> MCSPI3-SOMI -> TRF*/\
+MUX_VAL(CP(MMC2_DAT1), (IEN | PTU | EN | M4)) /*GPIO_133 -> UART3-RX (software)*/\
+MUX_VAL(CP(MMC2_DAT2), (IDIS | PTU | EN | M4)) /*GPIO_134 -> UART3-TX (software)*/\
+MUX_VAL(CP(MMC2_DAT3), (IDIS | PTU | EN | M1)) /*GPIO_135 -> MCSPI3-CS0*/\
+MUX_VAL(CP(MMC2_DAT4), (IEN | PTD | EN | M4)) /*GPIO_136 - AUX */\
+MUX_VAL(CP(MMC2_DAT5), (IEN | PTU | EN | M4)) /*GPIO_137 - POWER */\
+MUX_VAL(CP(MMC2_DAT6), (IDIS | PTU | EN | M4)) /*GPIO_138 - UART3-RTS (software) */\
+MUX_VAL(CP(MMC2_DAT7), (IEN | PTU | EN | M4)) /*GPIO_139 - UART3-CTS (software) */\
+MUX_VAL(CP(UART2_RX), (IEN | PTU | EN | M4)) /*GPIO_143 - UART2-RX */\
+MUX_VAL(CP(UART2_CTS), (IDIS | PTU | EN | M4)) /*GPIO_144 - UART2-CTS */\
+MUX_VAL(CP(UART2_RTS), (IDIS | PTU | EN | M4)) /*GPIO_145 - UART2-RTS */\
+MUX_VAL(CP(UART2_TX), (IEN | PTU | EN | M4)) /*GPIO_146 - UART2-TX */\
+MUX_VAL(CP(MCBSP1_CLKR), (IEN | PTD | EN | M4)) /*GPIO_156 - KEYIRQ -> TRF IRQ */\
+MUX_VAL(CP(MCBSP1_FSR), (IEN | PTU | EN | M4)) /*GPIO_157 - PENIRQ */\
+MUX_VAL(CP(MCBSP1_DX), (IDIS | PTD | EN | M4)) /*GPIO_158 - Display STBY */\
+MUX_VAL(CP(MCBSP1_DR), (IDIS | PTD | EN | M4)) /*GPIO_159 - McBSP1-DR -> TRF EN2 */\
+MUX_VAL(CP(MCBSP_CLKS), (IEN | PTU | DIS | M0)) /*McBSP_CLKS */\
+MUX_VAL(CP(MCBSP1_FSX), (IDIS | PTD | EN | M4)) /*GPIO_161 - McBSP1-FSX -> TRF EN */\
+MUX_VAL(CP(MCBSP1_CLKX), (IDIS | PTD | EN | M4)) /*GPIO_162 - McBSP1-CLKX -> UART3 Powerdown */
+
diff --git a/u-boot/board/goldelico/beagleb4/config.mk b/u-boot/board/goldelico/beagleb4/config.mk
new file mode 100644
index 0000000..cf055db
--- /dev/null
+++ b/u-boot/board/goldelico/beagleb4/config.mk
@@ -0,0 +1,33 @@
+#
+# (C) Copyright 2006
+# Texas Instruments, <www.ti.com>
+#
+# Beagle Board uses OMAP3 (ARM-CortexA8) cpu
+# see http://www.ti.com/ for more information on Texas Instruments
+#
+# See file CREDITS for list of people who contributed to this
+# project.
+#
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License as
+# published by the Free Software Foundation; either version 2 of
+# the License, or (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+# MA 02111-1307 USA
+#
+# Physical Address:
+# 8000'0000 (bank0)
+# A000/0000 (bank1)
+# Linux-Kernel is expected to be at 8000'8000, entry 8000'8000
+# (mem base + reserved)
+
+# For use with external or internal boots.
+CONFIG_SYS_TEXT_BASE = 0x80008000
diff --git a/u-boot/board/goldelico/gta04/TD028TTEC1.c b/u-boot/board/goldelico/gta04/TD028TTEC1.c
index 94667a3..b7970bf 100644
--- a/u-boot/board/goldelico/gta04/TD028TTEC1.c
+++ b/u-boot/board/goldelico/gta04/TD028TTEC1.c
@@ -37,24 +37,25 @@
#include <asm/mach-types.h>
#include "TD028TTEC1.h"
-#ifdef CONFIG_OMAP3_BEAGLE
-
-#ifdef CONFIG_OMAP3_GTA04
+#if defined(CONFIG_OMAP3_GTA04)
#define GPIO_CS 19
#define GPIO_SCL 12
#define GPIO_DIN 18
#define GPIO_DOUT 20
-#else /* Beagle Hybrid */
+#define SPI_READ() (omap_get_gpio_datain(GPIO_DIN))
+#define SPI_CS(bit) (omap_set_gpio_dataout(GPIO_CS, bit))
+#define SPI_SDA(bit) (omap_set_gpio_dataout(GPIO_DOUT, bit))
+#define SPI_SCL(bit) (omap_set_gpio_dataout(GPIO_SCL, bit))
+
+#elif defined(CONFIG_OMAP3_BEAGLE)
#define GPIO_CS 161
#define GPIO_SCL 162
#define GPIO_DIN 159
#define GPIO_DOUT 158
-#endif
-
#define SPI_READ() (omap_get_gpio_datain(GPIO_DIN))
#define SPI_CS(bit) (omap_set_gpio_dataout(GPIO_CS, bit))
#define SPI_SDA(bit) (omap_set_gpio_dataout(GPIO_DOUT, bit))
@@ -100,7 +101,7 @@ extern void smedia3362_lcm_reset(int);
static int jbt_spi_xfer(int wordnum, int bitlen, u_int16_t *dout)
{
-#if !defined(_BEAGLE_)
+#if 0
S3C24X0_GPIO * const gpio = S3C24X0_GetBase_GPIO();
#endif
u_int16_t tmpdout = 0;
@@ -179,9 +180,9 @@ int jbt_reg_write16(struct jbt_info *jbt, u_int8_t reg, u_int16_t data)
return rc;
}
-int jbt_check(void)
+int panel_check(void)
{ // check if we have connectivity
-#if defined(_BEAGLE_)
+#if 1
int err;
int i;
int failed=0;
@@ -189,7 +190,7 @@ int jbt_check(void)
int cnt1 = 0;
#if 0
- printf("jbt_reg_init()\n");
+ printf("panel_reg_init()\n");
#endif
err = omap_request_gpio(GPIO_CS);
SPI_CS(1); // unselect
@@ -200,7 +201,7 @@ int jbt_check(void)
err |= omap_request_gpio(GPIO_DIN);
if(err)
{
- printf("jbt_reg_init() - could not get GPIOs\n");
+ printf("panel_reg_init() - could not get GPIOs\n");
return 1;
}
#if 1 // should have already been done by MUX settings!
@@ -245,15 +246,15 @@ int jbt_check(void)
return 0;
}
-int jbt_reg_init(void)
+int panel_reg_init(void)
{
- if(jbt_check())
+ if(panel_check())
return 1; // some error
/* according to data sheet: wait 50ms (Tpos of LCM). However, 50ms
* seems unreliable with later LCM batches, increasing to 90ms */
udelay(90000);
- printf("did jbt_reg_init()\n");
+ printf("did panel_reg_init()\n");
return 0;
}
diff --git a/u-boot/board/goldelico/gta04/TD028TTEC1.h b/u-boot/board/goldelico/gta04/TD028TTEC1.h
index 19bcc07..e4de9a7 100644
--- a/u-boot/board/goldelico/gta04/TD028TTEC1.h
+++ b/u-boot/board/goldelico/gta04/TD028TTEC1.h
@@ -1,8 +1,6 @@
#ifndef _TD028TTEC1_H
#define _TD028TTEC1_H
-#define _BEAGLE_
-
#define JBT_TX_BUF_SIZE
struct jbt_info {
u_int16_t tx_buf[4];
diff --git a/u-boot/board/goldelico/gta04/backlight.c b/u-boot/board/goldelico/gta04/backlight.c
index 76b6e43..1e167f0 100644
--- a/u-boot/board/goldelico/gta04/backlight.c
+++ b/u-boot/board/goldelico/gta04/backlight.c
@@ -30,24 +30,50 @@
#include <asm/mach-types.h>
#include "backlight.h"
+// CHECKME!
+
#if defined(CONFIG_OMAP3_GTA04)
+#if defined(CONFIG_GOLDELICO_EXPANDER_B2)
+
+#define GPIO_BACKLIGHT 146 /* = GPT11_PWM (instead of UART2-TX) */
+#define GPT_BACKLIGHT OMAP34XX_GPT11
+
+#elif defined(CONFIG_GOLDELICO_EXPANDER_B3)
+
+#define GPIO_BACKLIGHT 146 /* = GPT11_PWM (instead of UART2-TX) */
+#define GPT_BACKLIGHT OMAP34XX_GPT11
+
+#elif defined(CONFIG_GOLDELICO_EXPANDER_B4)
+
+#define GPIO_BACKLIGHT 146 /* = GPT11_PWM (instead of UART2-TX) */
+#define GPT_BACKLIGHT OMAP34XX_GPT11
+
+#else
+
#define GPIO_BACKLIGHT 57 /* = GPT11_PWM */
#define GPT_BACKLIGHT OMAP34XX_GPT11
-#elif defined(CONFIG_OMAP3_BEAGLE_HYBRID)
+#endif
+
+#elif defined(CONFIG_OMAP3_BEAGLE)
+
+#if defined(CONFIG_GOLDELICO_EXPANDER_B1)
#define GPIO_BACKLIGHT 145 /* = GPT10_PWM */
#define GPT_BACKLIGHT OMAP34XX_GPT10
-#elif defined(CONFIG_OMAP3_BEAGLE_EXPANDER)
+#elif defined(CONFIG_GOLDELICO_EXPANDER_B2)
#define GPIO_BACKLIGHT 146 /* = GPT11_PWM (instead of UART2-TX) */
#define GPT_BACKLIGHT OMAP34XX_GPT11
-#else
+#elif defined(CONFIG_GOLDELICO_EXPANDER_B4)
-#error undefined CONFIG
+#define GPIO_BACKLIGHT 146 /* = GPT11_PWM (instead of UART2-TX) */
+#define GPT_BACKLIGHT OMAP34XX_GPT11
+
+#endif
#endif
@@ -71,13 +97,17 @@ int backlight_init(void)
struct gptimer *gpt_base = (struct gptimer *)GPT_BACKLIGHT;
#if defined(CONFIG_OMAP3_GTA04)
MUX_VAL(CP(GPMC_NCS6), (IEN | PTD | DIS | M3)) /* GPT_11 - Backlight enable*/\
-#elif defined(CONFIG_OMAP3_BEAGLE_HYBRID)
+#elif defined(CONFIG_OMAP3_BEAGLE)
+#if defined(CONFIG_GOLDELICO_EXPANDER_B1)
MUX_VAL(CP(UART2_RTS), (IEN | PTD | DIS | M2)) /* switch to GPT10 */
-#elif defined(CONFIG_OMAP3_BEAGLE_EXPANDER)
+#elif defined(CONFIG_GOLDELICO_EXPANDER_B2)
MUX_VAL(CP(UART2_TX), (IEN | PTD | DIS | M2)) /* switch to GPT11 */
+#elif defined(CONFIG_GOLDELICO_EXPANDER_B4)
+ // tbd.
#else
#error undefined CONFIG
#endif
+#endif
// writel(value, &gpt_base->registername);
// program registers for generating a 100-1000 Hz PWM signal
// or PWM synchronized to VSYNC (to avoid flicker)
@@ -86,15 +116,20 @@ int backlight_init(void)
#error todo
#else
+
#if defined(CONFIG_OMAP3_GTA04)
MUX_VAL(CP(GPMC_NCS6), (IEN | PTD | DIS | M4)) /*GPIO_57 - Backlight enable*/
-#elif defined(CONFIG_OMAP3_BEAGLE_HYBRID)
+#elif defined(CONFIG_OMAP3_BEAGLE)
+#if defined(CONFIG_GOLDELICO_EXPANDER_B1)
MUX_VAL(CP(UART2_RTS), (IEN | PTD | DIS | M4)) /*GPIO_145*/
-#elif defined(CONFIG_OMAP3_BEAGLE_EXPANDER)
+#elif defined(CONFIG_GOLDELICO_EXPANDER_B2)
MUX_VAL(CP(UART2_TX), (IEN | PTD | DIS | M4)) /*GPIO_146*/
+#elif defined(CONFIG_GOLDELICO_EXPANDER_B4)
+ // tbd.
#else
#error undefined CONFIG
#endif
+#endif
if(omap_request_gpio(GPIO_BACKLIGHT) == 0) // 0 == ok
{
omap_set_gpio_direction(GPIO_BACKLIGHT, 0); // output
diff --git a/u-boot/board/goldelico/gta04/commands.c b/u-boot/board/goldelico/gta04/commands.c
index eb75c1f..c1ec7b9 100644
--- a/u-boot/board/goldelico/gta04/commands.c
+++ b/u-boot/board/goldelico/gta04/commands.c
@@ -32,7 +32,7 @@
#include "backlight.h"
#include "dssfb.h"
-#include "jbt6k74.h"
+#include "panel.h"
#include "status.h"
#include "gps.h"
#include "tsc2007.h"
@@ -78,57 +78,44 @@ static int do_lcd_backlight(int argc, char *const argv[])
return 0;
}
-static char *lcdmodel="td028";
-
static int do_lcd_power(int argc, char *const argv[])
{
- if(strcmp(lcdmodel, "td028") == 0)
+ int state=PANEL_STATE_NORMAL;
+ if (argc < 3)
{
- int state=JBT_STATE_NORMAL;
- if (argc < 3)
- {
- printf ("lcm power: missing state (0..2).\n");
- return (-1);
- }
- state=simple_strtoul(argv[2], NULL, 10);
- if(state > 2)
- {
- printf ("lcm power: invalid state (0..2).\n");
- return (-1);
- }
- jbt6k74_enter_state(state);
- printf("lcm state set to %s\n", jbt_state());
+ printf ("lcm power: missing state (0..2).\n");
+ return (-1);
+ }
+ state=simple_strtoul(argv[2], NULL, 10);
+ if(state > 2)
+ {
+ printf ("lcm power: invalid state (0..2).\n");
+ return (-1);
}
+ panel_enter_state(state);
+ printf("lcm state set to %s\n", panel_state());
return 0;
}
static int do_lcd_onoff(int argc, char *const argv[], int flag)
{
- if(strcmp(lcdmodel, "td028") == 0)
- jbt6k74_display_onoff(flag);
- else
- jbt6k74_display_onoff(flag);
+ panel_display_onoff(flag);
printf("display power %s\n", flag?"on":"off");
return 0;
}
static int do_lcd_init(int argc, char *const argv[])
{
- // check argv for user specified lcdmodel
return board_video_init(NULL);
}
static int do_lcd_start(int argc, char *const argv[])
-{
- // check argv for user specified lcdmodel
+{ // initialize and switch on in one command
if(board_video_init(NULL))
return 1;
- if(strcmp(lcdmodel, "td028") == 0)
- {
- jbt6k74_enter_state(2);
- jbt6k74_display_onoff(1);
- backlight_set_level(255);
- }
+ panel_enter_state(PANEL_STATE_NORMAL);
+ panel_display_onoff(1);
+ backlight_set_level(255);
return 0;
}
@@ -645,8 +632,8 @@ U_BOOT_CMD(systest, 3, 0, do_systest, "System Test",
static int do_poweroff(cmd_tbl_t *cmdtp, int flag, int argc, char *const argv[])
{
backlight_set_level(0);
- jbt6k74_enter_state(0);
- jbt6k74_display_onoff(0);
+ panel_enter_state(0);
+ panel_display_onoff(0);
shutdown(); // finally shut down power
printf ("failed to power down\n");
return (0);
@@ -658,8 +645,8 @@ U_BOOT_CMD(poweroff, 2, 0, do_poweroff, "Poweroff",
static int do_suspend(cmd_tbl_t *cmdtp, int flag, int argc, char *const argv[])
{
backlight_set_level(0);
- jbt6k74_enter_state(0);
- jbt6k74_display_onoff(0);
+ panel_enter_state(0);
+ panel_display_onoff(0);
suspend(); // put CPU in sleep mode so that it can be waked up by pressing the AUX button or other events
printf ("suspend finished\n");
return (0);
diff --git a/u-boot/board/goldelico/gta04/status.c b/u-boot/board/goldelico/gta04/status.c
index aebd95e..a4c3c8a 100644
--- a/u-boot/board/goldelico/gta04/status.c
+++ b/u-boot/board/goldelico/gta04/status.c
@@ -37,10 +37,40 @@
// no need to probe for LED controller (compiler should optimize unnecessary code)
#define hasTCA6507 (1==1)
-#else
+#define GPIO_AUX 7 // AUX/User button
+#define GPIO_POWER -1 // N/A on GTA04 (access through TPS65950)
+#define GPIO_GPSEXT 144 // external GPS antenna is plugged in
+#define GPIO_PENIRQ 160 // TSC must be set up to provide PENIRQ
+
+// FIXME: other expander variants?
+
+#else defined(CONFIG_OMAP3_BEAGLE)
static int hasTCA6507=0;
+#if defined(CONFIG_GOLDELICO_EXPANDER_B1)
+
+#define GPIO_AUX 136 // AUX/User button
+#define GPIO_POWER 137 // POWER button
+#define GPIO_GPSEXT 138 // external GPS antenna is plugged in
+#define GPIO_PENIRQ 157 // TSC must be set up to provide PENIRQ
+
+#elif defined(CONFIG_GOLDELICO_EXPANDER_B2)
+
+#define GPIO_AUX 136 // AUX/User button
+#define GPIO_POWER 137 // POWER button
+#define GPIO_GPSEXT 138 // external GPS antenna is plugged in
+#define GPIO_PENIRQ 157 // TSC must be set up to provide PENIRQ
+
+#elif defined(CONFIG_GOLDELICO_EXPANDER_B4)
+
+#define GPIO_AUX 136 // AUX/User button
+#define GPIO_POWER 137 // POWER button
+#define GPIO_GPSEXT 138 // external GPS antenna is plugged in
+#define GPIO_PENIRQ 157 // TSC must be set up to provide PENIRQ
+
+#endif
+
#endif
#define TWL4030_I2C_BUS (1-1) // I2C1
@@ -72,33 +102,6 @@ extern int get_board_revision(void);
static int isXM = 0;
-#if defined(CONFIG_OMAP3_GTA04)
-
-#define GPIO_AUX 7 // AUX/User button
-#define GPIO_POWER -1 // N/A on GTA04 (access through TPS65950)
-#define GPIO_GPSEXT 144 // external GPS antenna is plugged in
-#define GPIO_PENIRQ 160 // TSC must be set up to provide PENIRQ
-
-#elif defined(CONFIG_OMAP3_BEAGLE_HYBRID)
-
-#define GPIO_AUX 136 // AUX/User button
-#define GPIO_POWER 137 // POWER button
-#define GPIO_GPSEXT 138 // external GPS antenna is plugged in
-#define GPIO_PENIRQ 157 // TSC must be set up to provide PENIRQ
-
-#elif defined(CONFIG_OMAP3_BEAGLE_EXPANDER)
-
-#define GPIO_AUX 136 // AUX/User button
-#define GPIO_POWER 137 // POWER button
-#define GPIO_GPSEXT 138 // external GPS antenna is plugged in
-#define GPIO_PENIRQ 157 // TSC must be set up to provide PENIRQ
-
-#else
-
-#error unknown config
-
-#endif
-
#define GPIO_LED_AUX_RED (isXM?88:70) // AUX
#define GPIO_LED_AUX_GREEN (isXM?89:71) // AUX
#define GPIO_LED_POWER_RED 78 // Power
@@ -140,7 +143,7 @@ int status_get_buttons(void)
((omap_get_gpio_datain(GPIO_GPSEXT)) << 1) |
(((val&0x01) != 0) << 3) |
((omap_get_gpio_datain(GPIO_PENIRQ)) << 4);
-#elif defined(CONFIG_OMAP3_BEAGLE_EXPANDER)
+#elif defined(CONFIG_GOLDELICO_EXPANDER_B2)
return
((omap_get_gpio_datain(GPIO_AUX)) << 0) |
((0) << 1) |
diff --git a/u-boot/board/goldelico/gta04b2/COM37H3M05DTC.c b/u-boot/board/goldelico/gta04b2/COM37H3M05DTC.c
index f9802be..68337c4 100644
--- a/u-boot/board/goldelico/gta04b2/COM37H3M05DTC.c
+++ b/u-boot/board/goldelico/gta04b2/COM37H3M05DTC.c
@@ -30,13 +30,23 @@
#include <asm/mach-types.h>
#include <twl4030.h>
#include "../gta04/dssfb.h"
-#include "../gta04/jbt6k74.h" // FIXME: change to display.h and make it more generic
+#include "../gta04/panel.h"
#include "COM37H3M05DTC.h"
-#ifdef CONFIG_OMAP3_BEAGLE_EXPANDER
-#define GPIO_STBY 158
-#else
+#ifndef CONFIG_GOLDELICO_EXPANDER_B2
+
+#error only for B2 board
+
+#endif
+
+#ifdef CONFIG_OMAP3_GTA04
+
#define GPIO_STBY 20
+
+#elif CONFIG_OMAP3_BEAGLE
+
+#define GPIO_STBY 158
+
#endif
// configure beagle board DSS for the COM37H3M05DTC
@@ -44,6 +54,7 @@
#define DVI_BACKGROUND_COLOR 0x00fadc29 // rgb(250, 220, 41)
#define DSS1_FCLK 432000000 // see figure 15-65
+#define DSS1_FCLK3730 108000000 // compare table 3-34, figure 7-63 - but there are other factors
#define PIXEL_CLOCK 22400000 // approx. 22.4 MHz (will be divided from 432 MHz)
// all values are min ratings
@@ -64,7 +75,7 @@
#define HBL (HS+HBP+HFP) // horizontal blanking period
#define HP (HDISP+HBL) // horizontal cycle
-static const struct panel_config lcm_cfg =
+static /*const*/ struct panel_config lcm_cfg =
{
.timing_h = ((HBP-1)<<20) | ((HFP-1)<<8) | ((HS-1)<<0), /* Horizantal timing */
.timing_v = ((VBP+0)<<20) | ((VFP+0)<<8) | ((VS-1)<<0), /* Vertical timing */
@@ -80,30 +91,30 @@ static const struct panel_config lcm_cfg =
.panel_color = DVI_BACKGROUND_COLOR
};
-int jbt_reg_init(void)
+int panel_reg_init(void)
{
omap_request_gpio(GPIO_STBY);
omap_set_gpio_direction(GPIO_STBY, 0); // output
return 0;
}
-int jbt_check(void)
+int panel_check(void)
{
return 0;
}
-const char *jbt_state(void)
+const char *panel_state(void)
{
return "?";
}
/* frontend function */
-int jbt6k74_enter_state(enum jbt_state new_state)
+int panel_enter_state(enum panel_state new_state)
{
return 0;
}
-int jbt6k74_display_onoff(int on)
+int panel_display_onoff(int on)
{
omap_set_gpio_dataout(GPIO_STBY, on?1:0); // on = no STBY
return 0;
@@ -117,6 +128,7 @@ int board_video_init(GraphicDevice *pGD)
// FIXME: here we should pass down the GPIO(s)
backlight_init(); // initialize backlight
+#if defined (CONFIG_OMAP3_BEAGLE)
#define REVISION_XM 0
if(get_board_revision() == REVISION_XM) {
/* Set VAUX1 to 3.3V for GTA04E display board */
@@ -126,15 +138,18 @@ int board_video_init(GraphicDevice *pGD)
TWL4030_PM_RECEIVER_DEV_GRP_P1);
udelay(5000);
}
-
+#endif
+
// FIXME: here we should init the TSC and pass down the GPIO numbers and resistance values
- if(jbt_reg_init()) // initialize SPI
+ if(panel_reg_init()) // initialize SPI
{
printf("No LCM connected\n");
return 1;
}
+ if (get_cpu_family() == CPU_OMAP36XX)
+ lcm_cfg.divisor = (0x0001<<16)|(DSS1_FCLK3730/PIXEL_CLOCK); /* get Pixel Clock divisor from dss1_fclk */
dssfb_init(&lcm_cfg);
printf("did board_video_init()\n");
diff --git a/u-boot/board/goldelico/gta04b2/COM37H3M05DTC.h b/u-boot/board/goldelico/gta04b2/COM37H3M05DTC.h
index 87c7b57..5a8b80c 100644
--- a/u-boot/board/goldelico/gta04b2/COM37H3M05DTC.h
+++ b/u-boot/board/goldelico/gta04b2/COM37H3M05DTC.h
@@ -1,6 +1,4 @@
#ifndef _COM37H3M05DTC_H
#define _COM37H3M05DTC_H
-#define _BEAGLE_
-
#endif
diff --git a/u-boot/board/goldelico/gta04b3/LQ070Y3DB3B.c b/u-boot/board/goldelico/gta04b3/LQ070Y3DB3B.c
index f9802be..5a77210 100644
--- a/u-boot/board/goldelico/gta04b3/LQ070Y3DB3B.c
+++ b/u-boot/board/goldelico/gta04b3/LQ070Y3DB3B.c
@@ -1,4 +1,4 @@
-/* u-boot driver for the OrtusTech COM37H3M05DTC LCM
+/* u-boot driver for the Sharp LQ070Y3DB3B LCM
*
* Copyright (C) 2006-2007 by OpenMoko, Inc.
* Author: Harald Welte <laforge@openmoko.org>
@@ -30,41 +30,52 @@
#include <asm/mach-types.h>
#include <twl4030.h>
#include "../gta04/dssfb.h"
-#include "../gta04/jbt6k74.h" // FIXME: change to display.h and make it more generic
-#include "COM37H3M05DTC.h"
+#include "../gta04/panel.h"
+#include "LQ070Y3DB3B.h"
+
+#ifndef CONFIG_GOLDELICO_EXPANDER_B3
+
+#error only for B3 board
+
+#endif
+
+#ifdef CONFIG_OMAP3_GTA04
-#ifdef CONFIG_OMAP3_BEAGLE_EXPANDER
-#define GPIO_STBY 158
-#else
#define GPIO_STBY 20
+
+#elif CONFIG_OMAP3_BEAGLE
+
+#define GPIO_STBY 158
+
#endif
-// configure beagle board DSS for the COM37H3M05DTC
+// configure beagle board DSS for the LQ070Y3DB3B
#define DVI_BACKGROUND_COLOR 0x00fadc29 // rgb(250, 220, 41)
#define DSS1_FCLK 432000000 // see figure 15-65
-#define PIXEL_CLOCK 22400000 // approx. 22.4 MHz (will be divided from 432 MHz)
+#define DSS1_FCLK3730 108000000 // compare table 3-34, figure 7-63 - but there are other factors
+#define PIXEL_CLOCK 33260000 // approx. 33.26 MHz (will be divided from 432 MHz)
// all values are min ratings
-#define VDISP 640 // vertical active area
-#define VFP 2 // vertical front porch
-#define VS 1 // VSYNC pulse width (negative going)
-#define VBP 3 // vertical back porch
+#define VDISP 480 // vertical active area
+#define VFP 8 // vertical front porch
+#define VS 2 // VSYNC pulse width (negative going)
+#define VBP 35 // vertical back porch
#define VDS (VS+VBP) // vertical data start
#define VBL (VS+VBP+VFP) // vertical blanking period
#define VP (VDISP+VBL) // vertical cycle
-#define HDISP 480 // horizontal active area
-#define HFP 2 // horizontal front porch
-#define HS 2 // HSYNC pulse width (negative going)
-#define HBP 9 // horizontal back porch
+#define HDISP 800 // horizontal active area
+#define HFP 64 // horizontal front porch
+#define HS 128 // HSYNC pulse width (negative going)
+#define HBP 64 // horizontal back porch
#define HDS (HS+HBP) // horizontal data start
#define HBL (HS+HBP+HFP) // horizontal blanking period
#define HP (HDISP+HBL) // horizontal cycle
-static const struct panel_config lcm_cfg =
+static /*const*/ struct panel_config lcm_cfg =
{
.timing_h = ((HBP-1)<<20) | ((HFP-1)<<8) | ((HS-1)<<0), /* Horizantal timing */
.timing_v = ((VBP+0)<<20) | ((VFP+0)<<8) | ((VS-1)<<0), /* Vertical timing */
@@ -80,30 +91,30 @@ static const struct panel_config lcm_cfg =
.panel_color = DVI_BACKGROUND_COLOR
};
-int jbt_reg_init(void)
+int panel_reg_init(void)
{
omap_request_gpio(GPIO_STBY);
omap_set_gpio_direction(GPIO_STBY, 0); // output
return 0;
}
-int jbt_check(void)
+int panel_check(void)
{
return 0;
}
-const char *jbt_state(void)
+const char *panel_state(void)
{
return "?";
}
/* frontend function */
-int jbt6k74_enter_state(enum jbt_state new_state)
+int panel_enter_state(enum panel_state new_state)
{
return 0;
}
-int jbt6k74_display_onoff(int on)
+int panel_display_onoff(int on)
{
omap_set_gpio_dataout(GPIO_STBY, on?1:0); // on = no STBY
return 0;
@@ -112,11 +123,12 @@ int jbt6k74_display_onoff(int on)
int board_video_init(GraphicDevice *pGD)
{
extern int get_board_revision(void);
- printf("board_video_init() COM37H3M05DTC\n");
+ printf("board_video_init() LQ070Y3DB3B\n");
// FIXME: here we should pass down the GPIO(s)
backlight_init(); // initialize backlight
+#if defined (CONFIG_OMAP3_BEAGLE)
#define REVISION_XM 0
if(get_board_revision() == REVISION_XM) {
/* Set VAUX1 to 3.3V for GTA04E display board */
@@ -126,15 +138,18 @@ int board_video_init(GraphicDevice *pGD)
TWL4030_PM_RECEIVER_DEV_GRP_P1);
udelay(5000);
}
+#endif
// FIXME: here we should init the TSC and pass down the GPIO numbers and resistance values
- if(jbt_reg_init()) // initialize SPI
+ if(panel_reg_init()) // initialize SPI
{
printf("No LCM connected\n");
return 1;
}
+ if (get_cpu_family() == CPU_OMAP36XX)
+ lcm_cfg.divisor = (0x0001<<16)|(DSS1_FCLK3730/PIXEL_CLOCK); /* get Pixel Clock divisor from dss1_fclk */
dssfb_init(&lcm_cfg);
printf("did board_video_init()\n");
diff --git a/u-boot/board/goldelico/gta04b3/LQ070Y3DB3B.h b/u-boot/board/goldelico/gta04b3/LQ070Y3DB3B.h
index 87c7b57..5a8b80c 100644
--- a/u-boot/board/goldelico/gta04b3/LQ070Y3DB3B.h
+++ b/u-boot/board/goldelico/gta04b3/LQ070Y3DB3B.h
@@ -1,6 +1,4 @@
#ifndef _COM37H3M05DTC_H
#define _COM37H3M05DTC_H
-#define _BEAGLE_
-
#endif
diff --git a/u-boot/board/goldelico/gta04b3/gta04b3.c b/u-boot/board/goldelico/gta04b3/gta04b3.c
index 3675a89..99e4e5f 100644
--- a/u-boot/board/goldelico/gta04b3/gta04b3.c
+++ b/u-boot/board/goldelico/gta04b3/gta04b3.c
@@ -7,7 +7,7 @@
#include <asm/arch/gpio.h>
#include <asm/mach-types.h>
#include "../gta04/gta04.h"
-#include "gta04b2.h"
+#include "gta04b3.h"
// make us initialize using both pinmux sets
diff --git a/u-boot/board/goldelico/gta04b4/LQ050W1LC1B.c b/u-boot/board/goldelico/gta04b4/LQ050W1LC1B.c
index f9802be..82752ce 100644
--- a/u-boot/board/goldelico/gta04b4/LQ050W1LC1B.c
+++ b/u-boot/board/goldelico/gta04b4/LQ050W1LC1B.c
@@ -1,4 +1,4 @@
-/* u-boot driver for the OrtusTech COM37H3M05DTC LCM
+/* u-boot driver for the Sharp LQ050W1LC1B LCM
*
* Copyright (C) 2006-2007 by OpenMoko, Inc.
* Author: Harald Welte <laforge@openmoko.org>
@@ -30,41 +30,58 @@
#include <asm/mach-types.h>
#include <twl4030.h>
#include "../gta04/dssfb.h"
-#include "../gta04/jbt6k74.h" // FIXME: change to display.h and make it more generic
-#include "COM37H3M05DTC.h"
+#include "../gta04/panel.h"
+#include "LQ050W1LC1B.h"
+
+#define mdelay(n) ({ unsigned long msec = (n); while (msec--) udelay(1000); })
+
+#ifndef CONFIG_GOLDELICO_EXPANDER_B4
+
+#error only for B4 board
+
+#endif
+
+#ifdef CONFIG_OMAP3_GTA04
+
+#define GPIO_POWER 12 /* McBSP5-CLKX GTA04 controls 5V power for the display */
+#define GPIO_BLSHUTDOWN 19 /* McBSP5-FSX controls Backlight SHUTDOWN (shutdown if high) */
+#define GPIO_SHUTDOWN 20 /* McBSP5-DX controls LVDS SHUTDOWN (shutdown if low) */
+
+#elif CONFIG_OMAP3_BEAGLE
+
+#define GPIO_POWER 162 /* McBSP5-CLKX GTA04 controls 5V power for the display */
+#define GPIO_BLSHUTDOWN 161 /* McBSP5-FSX controls Backlight SHUTDOWN (shutdown if high) */
+#define GPIO_SHUTDOWN 158 /* McBSP5-DX controls LVDS SHUTDOWN (shutdown if low) */
-#ifdef CONFIG_OMAP3_BEAGLE_EXPANDER
-#define GPIO_STBY 158
-#else
-#define GPIO_STBY 20
#endif
-// configure beagle board DSS for the COM37H3M05DTC
+// configure beagle board DSS for the LQ050W1LC1B
#define DVI_BACKGROUND_COLOR 0x00fadc29 // rgb(250, 220, 41)
#define DSS1_FCLK 432000000 // see figure 15-65
-#define PIXEL_CLOCK 22400000 // approx. 22.4 MHz (will be divided from 432 MHz)
+#define DSS1_FCLK3730 108000000 // compare table 3-34, figure 7-63 - but there are other factors
+#define PIXEL_CLOCK 48336000 // approx. 48.336 MHz (will be divided from 432 MHz)
// all values are min ratings
-#define VDISP 640 // vertical active area
-#define VFP 2 // vertical front porch
-#define VS 1 // VSYNC pulse width (negative going)
-#define VBP 3 // vertical back porch
+#define VDISP 600 // vertical active area
+#define VFP 7 // vertical front porch
+#define VS 7 // VSYNC pulse width (negative going)
+#define VBP 7 // vertical back porch
#define VDS (VS+VBP) // vertical data start
#define VBL (VS+VBP+VFP) // vertical blanking period
#define VP (VDISP+VBL) // vertical cycle
-#define HDISP 480 // horizontal active area
-#define HFP 2 // horizontal front porch
-#define HS 2 // HSYNC pulse width (negative going)
-#define HBP 9 // horizontal back porch
+#define HDISP 1024 // horizontal active area
+#define HFP 96 // horizontal front porch
+#define HS 96 // HSYNC pulse width (negative going)
+#define HBP 96 // horizontal back porch
#define HDS (HS+HBP) // horizontal data start
#define HBL (HS+HBP+HFP) // horizontal blanking period
#define HP (HDISP+HBL) // horizontal cycle
-static const struct panel_config lcm_cfg =
+static /*const*/ struct panel_config lcm_cfg =
{
.timing_h = ((HBP-1)<<20) | ((HFP-1)<<8) | ((HS-1)<<0), /* Horizantal timing */
.timing_v = ((VBP+0)<<20) | ((VFP+0)<<8) | ((VS-1)<<0), /* Vertical timing */
@@ -80,43 +97,64 @@ static const struct panel_config lcm_cfg =
.panel_color = DVI_BACKGROUND_COLOR
};
-int jbt_reg_init(void)
+int panel_reg_init(void)
{
- omap_request_gpio(GPIO_STBY);
- omap_set_gpio_direction(GPIO_STBY, 0); // output
+ omap_request_gpio(GPIO_SHUTDOWN);
+ omap_set_gpio_direction(GPIO_SHUTDOWN, 0); // output
+ omap_request_gpio(GPIO_POWER);
+ omap_set_gpio_direction(GPIO_POWER, 0); // output
+ omap_request_gpio(GPIO_BLSHUTDOWN);
+ omap_set_gpio_direction(GPIO_BLSHUTDOWN, 0); // output
return 0;
}
-int jbt_check(void)
+int panel_check(void)
{
return 0;
}
-const char *jbt_state(void)
+const char *panel_state(void)
{
return "?";
}
/* frontend function */
-int jbt6k74_enter_state(enum jbt_state new_state)
+int panel_enter_state(enum panel_state new_state)
{
return 0;
}
-int jbt6k74_display_onoff(int on)
+int panel_display_onoff(int on)
{
- omap_set_gpio_dataout(GPIO_STBY, on?1:0); // on = no STBY
+ if(on)
+ {
+ omap_set_gpio_dataout(GPIO_POWER, 1);
+ mdelay(10);
+ omap_set_gpio_dataout(GPIO_SHUTDOWN, 1);
+ mdelay(100);
+ omap_set_gpio_dataout(GPIO_BLSHUTDOWN, 0);
+ }
+ else
+ {
+ omap_set_gpio_dataout(GPIO_BLSHUTDOWN, 0);
+ mdelay(5);
+ omap_set_gpio_dataout(GPIO_SHUTDOWN, 1);
+ mdelay(10);
+ omap_set_gpio_dataout(GPIO_POWER, 1);
+ mdelay(200);
+ }
return 0;
}
int board_video_init(GraphicDevice *pGD)
{
extern int get_board_revision(void);
- printf("board_video_init() COM37H3M05DTC\n");
+ printf("board_video_init() LQ050W1LC1B\n");
// FIXME: here we should pass down the GPIO(s)
backlight_init(); // initialize backlight
+#if defined (CONFIG_OMAP3_BEAGLE)
#define REVISION_XM 0
if(get_board_revision() == REVISION_XM) {
/* Set VAUX1 to 3.3V for GTA04E display board */
@@ -126,15 +164,18 @@ int board_video_init(GraphicDevice *pGD)
TWL4030_PM_RECEIVER_DEV_GRP_P1);
udelay(5000);
}
+#endif
// FIXME: here we should init the TSC and pass down the GPIO numbers and resistance values
- if(jbt_reg_init()) // initialize SPI
+ if(panel_reg_init()) // initialize SPI
{
printf("No LCM connected\n");
return 1;
}
+ if (get_cpu_family() == CPU_OMAP36XX)
+ lcm_cfg.divisor = (0x0001<<16)|(DSS1_FCLK3730/PIXEL_CLOCK); /* get Pixel Clock divisor from dss1_fclk */
dssfb_init(&lcm_cfg);
printf("did board_video_init()\n");
diff --git a/u-boot/board/goldelico/gta04b4/LQ050W1LC1B.h b/u-boot/board/goldelico/gta04b4/LQ050W1LC1B.h
index 87c7b57..5a8b80c 100644
--- a/u-boot/board/goldelico/gta04b4/LQ050W1LC1B.h
+++ b/u-boot/board/goldelico/gta04b4/LQ050W1LC1B.h
@@ -1,6 +1,4 @@
#ifndef _COM37H3M05DTC_H
#define _COM37H3M05DTC_H
-#define _BEAGLE_
-
#endif
diff --git a/u-boot/board/goldelico/gta04b4/gta04b4.c b/u-boot/board/goldelico/gta04b4/gta04b4.c
index 3675a89..b480288 100644
--- a/u-boot/board/goldelico/gta04b4/gta04b4.c
+++ b/u-boot/board/goldelico/gta04b4/gta04b4.c
@@ -7,7 +7,7 @@
#include <asm/arch/gpio.h>
#include <asm/mach-types.h>
#include "../gta04/gta04.h"
-#include "gta04b2.h"
+#include "gta04b4.h"
// make us initialize using both pinmux sets
diff --git a/u-boot/boards.cfg b/u-boot/boards.cfg
index 5cd29e9..e7e325b 100644
--- a/u-boot/boards.cfg
+++ b/u-boot/boards.cfg
@@ -119,15 +119,19 @@ am3517_evm arm armv7 am3517evm logicpd
omap3_zoom1 arm armv7 zoom1 logicpd omap3
omap3_zoom2 arm armv7 zoom2 logicpd omap3
omap3_beagle arm armv7 beagle ti omap3
-omap3_beaglehyb arm armv7 beagle-hybrid goldelico omap3
-omap3_beagleexpander arm armv7 beagle-expander goldelico omap3
+omap3_beagleb1 arm armv7 beagleb1 goldelico omap3
+omap3_beagleb2 arm armv7 beagleb2 goldelico omap3
+omap3_beagleb4 arm armv7 beagleb4 goldelico omap3
omap3_gta04 arm armv7 gta04 goldelico omap3
omap3_gta04b2 arm armv7 gta04b2 goldelico omap3
+omap3_gta04b3 arm armv7 gta04b3 goldelico omap3
+omap3_gta04b4 arm armv7 gta04b4 goldelico omap3
omap3_evm arm armv7 evm ti omap3
omap3_sdp3430 arm armv7 sdp3430 ti omap3
devkit8000 arm armv7 devkit8000 timll omap3
omap4_panda arm armv7 panda ti omap4
-omap4_pandahyb arm armv7 panda-hybrid goldelico omap4
+omap4_pandab4 arm armv7 pandab4 goldelico omap4
+omap4_gta04 arm armv7 gta05 goldelico omap4
omap4_sdp4430 arm armv7 sdp4430 ti omap4
s5p_goni arm armv7 goni samsung s5pc1xx
smdkc100 arm armv7 smdkc100 samsung s5pc1xx
diff --git a/u-boot/include/configs/omap3_beaglehyb.h b/u-boot/include/configs/omap3_beagleb1.h
index 4f82622..60191e3 100644
--- a/u-boot/include/configs/omap3_beaglehyb.h
+++ b/u-boot/include/configs/omap3_beagleb1.h
@@ -24,7 +24,7 @@
* MA 02111-1307 USA
*/
-#define CONFIG_OMAP3_BEAGLE_HYBRID 1 /* working with BEAGLE and OMB Hybrid */
+#define CONFIG_GOLDELICO_EXPANDER_B1 1 /* working with BEAGLE and OMB Hybrid */
#include "omap3_beagle.h" /* share config */
@@ -35,7 +35,7 @@
// FIXME: add configs for the partitions so that JFFS2 runs in the correct NAND partition
#undef CONFIG_SYS_PROMPT
-#define CONFIG_SYS_PROMPT "Openmoko Beagle Hybrid # "
+#define CONFIG_SYS_PROMPT "Openmoko Beagle B1 # "
/* __CONFIG_H */
diff --git a/u-boot/include/configs/omap3_beagleexpander.h b/u-boot/include/configs/omap3_beagleb2.h
index 89faadf..7ce4a3a 100644
--- a/u-boot/include/configs/omap3_beagleexpander.h
+++ b/u-boot/include/configs/omap3_beagleb2.h
@@ -24,7 +24,7 @@
* MA 02111-1307 USA
*/
-#define CONFIG_OMAP3_BEAGLE_EXPANDER 1 /* working with BEAGLE and Expander board */
+#define CONFIG_GOLDELICO_EXPANDER_B2 1 /* working with BEAGLE and B2 Expander board */
#include "omap3_beagle.h" /* share config */
@@ -46,7 +46,7 @@
// FIXME: add configs for the partitions so that JFFS2 runs in the correct NAND partition
#undef CONFIG_SYS_PROMPT
-#define CONFIG_SYS_PROMPT "Openmoko Beagle Expander # "
+#define CONFIG_SYS_PROMPT "Openmoko Beagle B2 # "
/* __CONFIG_H */
diff --git a/u-boot/include/configs/omap3_beagleb4.h b/u-boot/include/configs/omap3_beagleb4.h
new file mode 100644
index 0000000..cb8ac01
--- /dev/null
+++ b/u-boot/include/configs/omap3_beagleb4.h
@@ -0,0 +1,41 @@
+/*
+ * (C) Copyright 2010
+ * Nikolaus Schaller <hns@goldelico.com>
+ *
+ * Configuration settings for the TI OMAP3530 Beagle board with
+ * Openmoko Hybrid Display extension.
+ *
+ * See file CREDITS for list of people who contributed to this
+ * project.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License as
+ * published by the Free Software Foundation; either version 2 of
+ * the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ */
+
+#define CONFIG_GOLDELICO_EXPANDER_B4 1 /* working with BEAGLE and B4 extension board */
+
+#include "omap3_beagle.h" /* share config */
+
+#define CONFIG_CMD_UNZIP 1 /* for reducing size of splash image */
+// #undef CONFIG_CMD_JFFS2
+// #define CONFIG_CMD_JFFS2 1 /* to access the rootfs in NAND flash */
+
+// FIXME: add configs for the partitions so that JFFS2 runs in the correct NAND partition
+
+#undef CONFIG_SYS_PROMPT
+#define CONFIG_SYS_PROMPT "Openmoko Beagle B4 # "
+
+
+/* __CONFIG_H */
diff --git a/u-boot/include/configs/omap3_gta04.h b/u-boot/include/configs/omap3_gta04.h
index 824c650..dc84fa1 100644
--- a/u-boot/include/configs/omap3_gta04.h
+++ b/u-boot/include/configs/omap3_gta04.h
@@ -23,12 +23,11 @@
* MA 02111-1307 USA
*/
-/* working with BEAGLE and GTA04 */
#define CONFIG_OMAP3_GTA04 y
/* enable to include patches and fixes for GTA04A2 */
/* #define CONFIG_OMAP3_GTA04A2 y */
-#include "omap3_beaglehyb.h" /* share config */
+#include "omap3_beagle.h" /* share config */
#undef CONFIG_SYS_PROMPT
#define CONFIG_SYS_PROMPT "GTA04 # "
diff --git a/u-boot/include/configs/omap3_gta04b2.h b/u-boot/include/configs/omap3_gta04b2.h
index 04527db..16f92a4 100644
--- a/u-boot/include/configs/omap3_gta04b2.h
+++ b/u-boot/include/configs/omap3_gta04b2.h
@@ -23,8 +23,11 @@
* MA 02111-1307 USA
*/
-#define CONFIG_OMAP3_BEAGLE_EXPANDER y
+#define CONFIG_GOLDELICO_EXPANDER_B2 y
#include "omap3_gta04.h" /* share config */
+#undef CONFIG_SYS_PROMPT
+#define CONFIG_SYS_PROMPT "GTA04b2 # "
+
/* __CONFIG_H */
diff --git a/u-boot/include/configs/omap3_gta04b3.h b/u-boot/include/configs/omap3_gta04b3.h
new file mode 100644
index 0000000..62d9d90
--- /dev/null
+++ b/u-boot/include/configs/omap3_gta04b3.h
@@ -0,0 +1,33 @@
+/*
+ * (C) Copyright 2010
+ * Nikolaus Schaller <hns@goldelico.com>
+ *
+ * Configuration settings for the GTA04.
+ *
+ * See file CREDITS for list of people who contributed to this
+ * project.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License as
+ * published by the Free Software Foundation; either version 2 of
+ * the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ */
+
+#define CONFIG_GOLDELICO_EXPANDER_B3 y
+
+#include "omap3_gta04.h" /* share config */
+
+#undef CONFIG_SYS_PROMPT
+#define CONFIG_SYS_PROMPT "GTA04b3 # "
+
+/* __CONFIG_H */
diff --git a/u-boot/include/configs/omap3_gta04b4.h b/u-boot/include/configs/omap3_gta04b4.h
new file mode 100644
index 0000000..96a5ebe
--- /dev/null
+++ b/u-boot/include/configs/omap3_gta04b4.h
@@ -0,0 +1,33 @@
+/*
+ * (C) Copyright 2010
+ * Nikolaus Schaller <hns@goldelico.com>
+ *
+ * Configuration settings for the GTA04.
+ *
+ * See file CREDITS for list of people who contributed to this
+ * project.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License as
+ * published by the Free Software Foundation; either version 2 of
+ * the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ */
+
+#define CONFIG_GOLDELICO_EXPANDER_B4 y
+
+#include "omap3_gta04.h" /* share config */
+
+#undef CONFIG_SYS_PROMPT
+#define CONFIG_SYS_PROMPT "GTA04b4 # "
+
+/* __CONFIG_H */