Re: [U-Boot] [PATCH 3/3] ppc4xx: icon: add support for SM502 chip

2010-06-17 Thread Wolfgang Denk
Dear Anatolij Gustschin,

In message 1274863139-3434-4-git-send-email-ag...@denx.de you wrote:
 Adds initialization code for SM502 graphics controller
 and NL6448BC20-21D LCD panel.
 
 Signed-off-by: Anatolij Gustschin ag...@denx.de
 Cc: Stefan Roese s...@denx.de
 ---
  board/mosaixtech/icon/icon.c |   69 
 ++
  include/configs/icon.h   |   23 ++
  2 files changed, 92 insertions(+), 0 deletions(-)

As Stefan is on vacation, I jump in and apply this to next.

Thanks.

Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH, MD: Wolfgang Denk  Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: w...@denx.de
Prediction is very difficult, especially of the future.  - Niels Bohr
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] [PATCH 3/3] ppc4xx: icon: add support for SM502 chip

2010-05-26 Thread Anatolij Gustschin
Adds initialization code for SM502 graphics controller
and NL6448BC20-21D LCD panel.

Signed-off-by: Anatolij Gustschin ag...@denx.de
Cc: Stefan Roese s...@denx.de
---
 board/mosaixtech/icon/icon.c |   69 ++
 include/configs/icon.h   |   23 ++
 2 files changed, 92 insertions(+), 0 deletions(-)

diff --git a/board/mosaixtech/icon/icon.c b/board/mosaixtech/icon/icon.c
index fbace9e..ecea1ee 100644
--- a/board/mosaixtech/icon/icon.c
+++ b/board/mosaixtech/icon/icon.c
@@ -317,3 +317,72 @@ int board_pcie_last(void)
/* Only 2 PCIe ports used on ICON, so the last one is 1 */
return 1;
 }
+
+/*
+ * Video
+ */
+#ifdef CONFIG_VIDEO_SM501
+#include sm501.h
+
+#define DISPLAY_WIDTH   640
+#define DISPLAY_HEIGHT  480
+
+static const SMI_REGS sm502_init_regs[] = {
+   {0x4, 0x0},
+   {0x00040, 0x00021847},
+   {0x00044, 0x091a0a01}, /* 24 MHz pixclk */
+   {0x00054, 0x0},
+   {0x00048, 0x00021847},
+   {0x0004C, 0x091a0a01},
+   {0x00054, 0x1},
+   {0x80004, 0xc428bb17},
+   {0x8000C, 0x},
+   {0x80010, 0x0a000a00},
+   {0x80014, 0x0280},
+   {0x80018, 0x01e0},
+   {0x8001C, 0x},
+   {0x80020, 0x01e00280},
+   {0x80024, 0x02fa027f},
+   {0x80028, 0x004a0280},
+   {0x8002C, 0x020c01df},
+   {0x80030, 0x000201e7},
+   {0x80200, 0x0001},
+   {0x8, 0x2000}, /* gpio29 is pwm0, LED_PWM */
+   {0xC, 0x3f00}, /* gpio56 - gpio61 as flat panel data pins */
+   {0x10020, 0x25725728}, /* 20 kHz pwm0, 50 % duty cycle, disabled */
+   {0x8, 0x0f010106}, /* vsync  hsync pos, disp on */
+   {0, 0}
+};
+
+/*
+ * Return a pointer to the register initialization table.
+ */
+const SMI_REGS *board_get_regs(void)
+{
+   return sm502_init_regs;
+}
+
+int board_get_width(void)
+{
+   return DISPLAY_WIDTH;
+}
+
+int board_get_height(void)
+{
+   return DISPLAY_HEIGHT;
+}
+
+#ifdef CONFIG_CONSOLE_EXTRA_INFO
+/*
+ * Return text to be printed besides the logo.
+ */
+void video_get_info_str(int line_number, char *info)
+{
+   if (line_number == 1)
+   strcpy(info,  Board: ICON);
+   else
+   info[0] = '\0';
+}
+#endif
+
+#endif /* CONFIG_VIDEO_SM501 */
diff --git a/include/configs/icon.h b/include/configs/icon.h
index 3a57d69..7a4e60c 100644
--- a/include/configs/icon.h
+++ b/include/configs/icon.h
@@ -143,6 +143,26 @@
 #define CONFIG_SYS_M41T11_BASE_YEAR 1900 /* play along with linux  */
 
 /*
+ * Video options
+ */
+#define CONFIG_VIDEO
+
+#ifdef CONFIG_VIDEO
+#define CONFIG_VIDEO_SM501
+#define CONFIG_VIDEO_SM501_32BPP
+#define CONFIG_VIDEO_SM501_PCI
+#define VIDEO_FB_LITTLE_ENDIAN
+#define CONFIG_CFB_CONSOLE
+#define CONFIG_VIDEO_LOGO
+#define CONFIG_CONSOLE_EXTRA_INFO
+#define CONFIG_VGA_AS_SINGLE_DEVICE
+#define CONFIG_VIDEO_SW_CURSOR
+#define CONFIG_VIDEO_BMP_RLE8
+#define CONFIG_SPLASH_SCREEN
+#define CFG_CONSOLE_IS_IN_ENV
+#endif
+
+/*
  * Environment
  */
 #defineCONFIG_ENV_IS_IN_FLASH  1   /* Environment uses flash   
*/
@@ -171,6 +191,9 @@
 #define CONFIG_CMD_PCI
 #define CONFIG_CMD_SDRAM
 #define CONFIG_CMD_SNTP
+#ifdef CONFIG_VIDEO
+#define CONFIG_CMD_BMP
+#endif
 
 #defineCONFIG_IBM_EMAC4_V4 /* 440SPe has this EMAC version 
*/
 #define CONFIG_PHY_ADDR1   /* PHY address, See schematics  
*/
-- 
1.6.2.5

___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot