summaryrefslogtreecommitdiffstats
path: root/board
diff options
context:
space:
mode:
Diffstat (limited to 'board')
-rw-r--r--board/a4m072/a4m072.c62
-rw-r--r--board/renesas/sh7785lcr/config.mk4
-rw-r--r--board/ttcontrol/vision2/vision2.c68
3 files changed, 94 insertions, 40 deletions
diff --git a/board/a4m072/a4m072.c b/board/a4m072/a4m072.c
index ae7ccbb4e9..09a5a5183b 100644
--- a/board/a4m072/a4m072.c
+++ b/board/a4m072/a4m072.c
@@ -270,8 +270,6 @@ static u8 display_buf[DISPLAY_BUF_SIZE];
static u8 display_putc_pos;
static u8 display_out_pos;
-static u8 display_dot_enable;
-
void display_set(int cmd) {
if (cmd & DISPLAY_CLEAR) {
@@ -281,12 +279,6 @@ void display_set(int cmd) {
if (cmd & DISPLAY_HOME) {
display_putc_pos = 0;
}
-
- if (cmd & DISPLAY_MARK) {
- display_dot_enable = 1;
- } else {
- display_dot_enable = 0;
- }
}
#define SEG_A (1<<0)
@@ -314,10 +306,12 @@ void display_set(int cmd) {
* A..Z index 10..35
* - index 36
* _ index 37
+ * . index 38
*/
#define SYMBOL_DASH (36)
#define SYMBOL_UNDERLINE (37)
+#define SYMBOL_DOT (38)
static u8 display_char2seg7_tbl[]=
{
@@ -337,28 +331,29 @@ static u8 display_char2seg7_tbl[]=
SEG_B | SEG_C | SEG_D | SEG_E | SEG_G, /* d */
SEG_A | SEG_D | SEG_E | SEG_F | SEG_G, /* E */
SEG_A | SEG_E | SEG_F | SEG_G, /* F */
- SEG_A | SEG_B | SEG_C | SEG_D | SEG_F | SEG_G, /* g */
+ 0, /* g - not displayed */
SEG_B | SEG_C | SEG_E | SEG_F | SEG_G, /* H */
- SEG_E | SEG_F, /* I */
- SEG_B | SEG_C | SEG_D | SEG_E, /* J */
- SEG_A, /* K - special 1 */
+ SEG_B | SEG_C, /* I */
+ 0, /* J - not displayed */
+ 0, /* K - not displayed */
SEG_D | SEG_E | SEG_F, /* L */
- SEG_B, /* m - special 2 */
- SEG_C | SEG_E | SEG_G, /* n */
- SEG_C | SEG_D | SEG_E | SEG_G, /* o */
+ 0, /* m - not displayed */
+ 0, /* n - not displayed */
+ SEG_A | SEG_B | SEG_C | SEG_D | SEG_E | SEG_F, /* O */
SEG_A | SEG_B | SEG_E | SEG_F | SEG_G, /* P */
- SEG_A | SEG_B | SEG_C | SEG_F | SEG_G, /* q */
- SEG_E | SEG_G, /* r */
+ 0, /* q - not displayed */
+ 0, /* r - not displayed */
SEG_A | SEG_C | SEG_D | SEG_F | SEG_G, /* S */
SEG_D | SEG_E | SEG_F | SEG_G, /* t */
SEG_B | SEG_C | SEG_D | SEG_E | SEG_F, /* U */
- SEG_C | SEG_D | SEG_E | SEG_F, /* V */
- SEG_C, /* w - special 3 */
- SEG_B | SEG_C | SEG_E | SEG_F | SEG_G, /* X */
+ 0, /* V - not displayed */
+ 0, /* w - not displayed */
+ 0, /* X - not displayed */
SEG_B | SEG_C | SEG_D | SEG_F | SEG_G, /* Y */
- SEG_A | SEG_B | SEG_D | SEG_E | SEG_G, /* Z */
+ 0, /* Z - not displayed */
SEG_G, /* - */
- SEG_D /* _ */
+ SEG_D, /* _ */
+ SEG_P /* . */
};
/* Convert char to the LED segments representation */
@@ -374,23 +369,20 @@ static u8 display_char2seg7(char c)
c -= 'A' - 10;
else if (c == '-')
c = SYMBOL_DASH;
- else if ((c == '_') || (c == '.'))
+ else if (c == '_')
c = SYMBOL_UNDERLINE;
+ else if (c == '.')
+ c = SYMBOL_DOT;
else
c = ' '; /* display unsupported symbols as space */
if (c != ' ')
val = display_char2seg7_tbl[(int)c];
- /* Handle DP LED here */
- if (display_dot_enable) {
- val |= SEG_P;
- }
-
return val;
}
-static inline int display_putc_nomark(char c)
+int display_putc(char c)
{
if (display_putc_pos >= DISPLAY_BUF_SIZE)
return -1;
@@ -403,13 +395,6 @@ static inline int display_putc_nomark(char c)
return c;
}
-int display_putc(char c)
-{
- /* Mark the codes from the "display" command with the DP LED */
- display_set(DISPLAY_MARK);
- return display_putc_nomark(c);
-}
-
/*
* Flush current symbol to the LED display hardware
*/
@@ -493,9 +478,8 @@ void show_boot_progress(int status)
if (a4m072_status2code(status, buf) < 0)
return;
- display_set(0); /* Clear DP Led */
- display_putc_nomark(buf[0]);
- display_putc_nomark(buf[1]);
+ display_putc(buf[0]);
+ display_putc(buf[1]);
display_set(DISPLAY_HOME);
display_out_pos = 0; /* reset output position */
diff --git a/board/renesas/sh7785lcr/config.mk b/board/renesas/sh7785lcr/config.mk
index 1a9038c753..6853d2b28b 100644
--- a/board/renesas/sh7785lcr/config.mk
+++ b/board/renesas/sh7785lcr/config.mk
@@ -24,6 +24,8 @@
#
sinclude $(OBJTREE)/board/$(BOARDDIR)/config.tmp
-ifndef CONFIG_SYS_TEXT_BASE
+ifdef CONFIG_SH_32BIT
+CONFIG_SYS_TEXT_BASE = 0x8FF80000
+else
CONFIG_SYS_TEXT_BASE = 0x0ff80000
endif
diff --git a/board/ttcontrol/vision2/vision2.c b/board/ttcontrol/vision2/vision2.c
index ce4cb78e98..071dad66c4 100644
--- a/board/ttcontrol/vision2/vision2.c
+++ b/board/ttcontrol/vision2/vision2.c
@@ -37,14 +37,34 @@
#include <fsl_esdhc.h>
#include <fsl_pmic.h>
#include <mc13892.h>
+#include <linux/fb.h>
DECLARE_GLOBAL_DATA_PTR;
static u32 system_rev;
+extern int mx51_fb_init(struct fb_videomode *mode);
+
#ifdef CONFIG_HW_WATCHDOG
#include <watchdog.h>
+static struct fb_videomode nec_nl6448bc26_09c = {
+ "NEC_NL6448BC26-09C",
+ 60, /* Refresh */
+ 640, /* xres */
+ 480, /* yres */
+ 37650, /* pixclock = 26.56Mhz */
+ 48, /* left margin */
+ 16, /* right margin */
+ 31, /* upper margin */
+ 12, /* lower margin */
+ 96, /* hsync-len */
+ 2, /* vsync-len */
+ 0, /* sync */
+ FB_VMODE_NONINTERLACED, /* vmode */
+ 0, /* flag */
+};
+
void hw_watchdog_reset(void)
{
int val;
@@ -423,6 +443,9 @@ static void setup_gpios(void)
mxc_request_iomux(MX51_PIN_CSPI1_RDY, IOMUX_CONFIG_ALT3);
mxc_iomux_set_pad(MX51_PIN_CSPI1_RDY, 0x82);
+ /* PWM Output GPIO1_2 */
+ mxc_request_iomux(MX51_PIN_GPIO1_2, IOMUX_CONFIG_ALT1);
+
/*
* Set GPIO1_4 to high and output; it is used to reset
* the system on reboot
@@ -630,6 +653,33 @@ int board_early_init_f(void)
return 0;
}
+static void backlight(int on)
+{
+ if (on) {
+ mxc_gpio_set(65, 1);
+ udelay(10000);
+ mxc_gpio_set(68, 1);
+ } else {
+ mxc_gpio_set(65, 0);
+ mxc_gpio_set(68, 0);
+ }
+}
+
+void lcd_enable(void)
+{
+ int ret;
+
+ mxc_request_iomux(MX51_PIN_DI1_PIN2, IOMUX_CONFIG_ALT0);
+ mxc_request_iomux(MX51_PIN_DI1_PIN3, IOMUX_CONFIG_ALT0);
+
+ mxc_gpio_set(2, 1);
+ mxc_request_iomux(MX51_PIN_GPIO1_2, IOMUX_CONFIG_ALT0);
+
+ ret = mx51_fb_init(&nec_nl6448bc26_09c);
+ if (ret)
+ puts("LCD cannot be configured\n");
+}
+
int board_init(void)
{
#ifdef CONFIG_SYS_ARM_WITHOUT_RELOC
@@ -709,3 +759,21 @@ int checkboard(void)
return 0;
}
+int do_vision_lcd(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+{
+ int on;
+
+ if (argc < 2)
+ return cmd_usage(cmdtp);
+
+ on = (strcmp(argv[1], "on") == 0);
+ backlight(on);
+
+ return 0;
+}
+
+U_BOOT_CMD(
+ lcdbl, CONFIG_SYS_MAXARGS, 1, do_vision_lcd,
+ "Vision2 Backlight",
+ "lcdbl [on|off]\n"
+);
OpenPOWER on IntegriCloud