Skip to contentSkip to conversation

tt01: add MMC and video support

PATCH New Helmut Raiger 2 participants 15 messages Oct 27, 2011 – Feb 17, 2012 Arm (32-bit)

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 tt01: add MMC and video support

board_mmc_init() initializes the pins of SDHC1 and turns on V_MMC1 of the PMIC. The video setup for the Epson display is provided along with some fancy extra info to be displayed next to the HALE logo.

---
V1: Note this requires http://patchwork.ozlabs.org/patch/122114/

 board/hale/tt01/tt01.c |   53 ++++++++++++++++++++++++++++++++++++++++++++++-
 include/configs/tt01.h |   41 ++++++++++++++++++++++++++++++++++++-
 tools/Makefile         |    3 ++
 tools/logos/hale.bmp   |  Bin 0 -> 27238 bytes
 4 files changed, 94 insertions(+), 3 deletions(-)
 create mode 100644 tools/logos/hale.bmp
board/hale/tt01/tt01.c +51 -2
index 2995c8f..2ab9df1 100644
@@ -175,8 +175,6 @@ int board_init(void)
 
 int board_late_init(void)
 {
-	pmic_init();
-
 #ifdef CONFIG_HW_WATCHDOG
 	mxc_hw_watchdog_enable();
 #endif
@@ -190,6 +188,36 @@ int checkboard(void)
 	return 0;
 }
 
+#ifdef CONFIG_MXC_MMC
+int board_mmc_init(bd_t *bis)
+{
+	u32 val;
+	struct pmic *p;
+
+	/*
+	* this is the first driver to use the pmic, so call
+	* pmic_init() here. board_late_init() is too late for
+	* the MMC driver.
+	*/
+	pmic_init();
+	p = get_pmic();
+
+	/* configure pins for SDHC1 only */
+	mx31_gpio_mux(IOMUX_MODE(MUX_CTL_SD1_CLK, MUX_CTL_FUNC));
+	mx31_gpio_mux(IOMUX_MODE(MUX_CTL_SD1_CMD, MUX_CTL_FUNC));
+	mx31_gpio_mux(IOMUX_MODE(MUX_CTL_SD1_DATA0, MUX_CTL_FUNC));
+	mx31_gpio_mux(IOMUX_MODE(MUX_CTL_SD1_DATA1, MUX_CTL_FUNC));
+	mx31_gpio_mux(IOMUX_MODE(MUX_CTL_SD1_DATA2, MUX_CTL_FUNC));
+	mx31_gpio_mux(IOMUX_MODE(MUX_CTL_SD1_DATA3, MUX_CTL_FUNC));
+
+	/* turn on power V_MMC1, bit 18 is the VMMC1 enable */
+	if (pmic_reg_read(p, 33, &val) < 0)
+		pmic_reg_write(p, 33, val | 0x040000);
+
+	return mxc_mmc_init(bis);
+}
+#endif
+
 int board_eth_init(bd_t *bis)
 {
 	int rc = 0;
@@ -198,3 +226,24 @@ int board_eth_init(bd_t *bis)
 #endif
 	return rc;
 }
+
+#ifdef CONFIG_CONSOLE_EXTRA_INFO
+void video_get_info_str(int line_number, char *info)
+{
+	u32 srev = get_cpu_rev();
+
+	switch (line_number) {
+	case 2:
+		sprintf(info, " CPU  : Freescale i.MX31 rev %d.%d%s@%d MHz",
+				(srev & 0xF0) >> 4, (srev & 0x0F),
+				((srev & 0x8000) ? " unknown" : ""),
+				mxc_get_clock(MXC_ARM_CLK) / 1000000);
+		break;
+	case 3:
+		strcpy(info, " " BOARD_STRING);
+		break;
+	default:
+		info[0] = 0;
+	}
+}
+#endif
include/configs/tt01.h +40 -1

67 lines not on this page · raw message

tools/Makefile +3 -0
index fc741d3..a11f6ce 100644
@@ -134,6 +134,9 @@ endif
 ifeq ($(VENDOR),intercontrol)
 LOGO_BMP= logos/intercontrol.bmp
 endif
+ifeq ($(VENDOR),hale)
+LOGO_BMP=logos/hale.bmp
+endif
 
 # now $(obj) is defined
 HOSTSRCS += $(addprefix $(SRCTREE)/,$(EXT_OBJ_FILES-y:.o=.c))
tools/logos/hale.bmp new file binary +0 -0
new file mode 100644
index 0000000000000000000000000000000000000000..efdbb4d097abb7ba7ac69e6960030ecb7e19e3cc
GIT binary patch

znZd!sT%Z>S<3tk12n3Q7gFf&_Vg~|0{Hv<&>h9UuW8R_dxre6UW at oymKYsPAuCDH$ zd-b))Z)7a56j}CN-2EGWKgM64%{l%1kF)IQLjEbmuJtOW&ir at qwL9>FX8Xy?0?U z&b~(4@eWCyT$V@(!c!hN%r(-KgyoG^-}h?KmIEF1JeHc&(E{lw||g*{M(;r|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rz4NMxCG%#sk(!ivFNduDxCJjs)_%>_c|AT7s*8l(j

literal 0
HcmV?d00001

Signature · 6 lines
1.7.4.4



--
Scanned by MailScanner.
#1 lore raw

PATCH 1/1 tt01: add MMC and video support

Quoted 9 lines · Helmut Raiger

board_mmc_init() initializes the pins of SDHC1 and turns on V_MMC1 of the PMIC. The video setup for the Epson display is provided along with some fancy extra info to be displayed next to the HALE logo.

---
V1: Note this requires http://patchwork.ozlabs.org/patch/122114/

Quoted 7 lines
  board/hale/tt01/tt01.c |   53 ++++++++++++++++++++++++++++++++++++++++++++++-
  include/configs/tt01.h |   41 ++++++++++++++++++++++++++++++++++++-
  tools/Makefile         |    3 ++
  tools/logos/hale.bmp   |  Bin 0 ->  27238 bytes
  4 files changed, 94 insertions(+), 3 deletions(-)

create mode 100644 tools/logos/hale.bmp

Oops that was a bit early, the mmc patch
http://patchwork.ozlabs.org/patch/122139/ is still under review. Helmut (pushing too hard)

--
Scanned by MailScanner.

#2 lore raw

PATCH 1/1 tt01: add MMC and video support

In reply to Helmut Raiger
Quoted 7 lines · Helmut Raiger

board_mmc_init() initializes the pins of SDHC1 and turns on V_MMC1 of the PMIC. The video setup for the Epson display is provided along with some fancy extra info to be displayed next to the HALE logo.

---

Hi Helmut,

Quoted 7 lines
board/hale/tt01/tt01.c +7 -0
+
+	/* configure pins for SDHC1 only */
+	mx31_gpio_mux(IOMUX_MODE(MUX_CTL_SD1_CLK, MUX_CTL_FUNC));
+	mx31_gpio_mux(IOMUX_MODE(MUX_CTL_SD1_CMD, MUX_CTL_FUNC));
+	mx31_gpio_mux(IOMUX_MODE(MUX_CTL_SD1_DATA0, MUX_CTL_FUNC));
+	mx31_gpio_mux(IOMUX_MODE(MUX_CTL_SD1_DATA1, MUX_CTL_FUNC));
+	mx31_gpio_mux(IOMUX_MODE(MUX_CTL_SD1_DATA2, MUX_CTL_FUNC));

board/hale/tt01/tt01.c int checkboard(void) · line 220

Quoted 10 lines
board/hale/tt01/tt01.c +10 -0
+	mx31_gpio_mux(IOMUX_MODE(MUX_CTL_SD1_DATA3, MUX_CTL_FUNC));
+
+	/* turn on power V_MMC1, bit 18 is the VMMC1 enable */
+	if (pmic_reg_read(p, 33, &val) < 0)
+		pmic_reg_write(p, 33, val | 0x040000);
+
+	return mxc_mmc_init(bis);
+}
+#endif
+

I have no issue regarding MMC support....

Quoted 47 lines

index 0000000000000000000000000000000000000000..efdbb4d097abb7ba7ac69e6960030ecb7e19e3cc GIT binary patch
literal 27238 zcmeHOy^Acz5ua&>WoLJ0Zuj<P@0PdgP#8He4unIaT(SOx7YM9CSOO=;nM0*c491zk znZd!sT%Z>S<3tk12n3Q7gFf&_Vg~|0{Hv<&>h9UuW8R_dxre6UW at oymKYsPAuCDH$ zd-b))Z)7a56j}CN-2EGWKgM64%{l%1kF)IQLjEbmuJtOW&ir at qwL9>FX8Xy?0?U z&b~(4@eWCyT$V@(!c!hN%r(-KgyoG^-}h?KmIEF1JeHc&(E{lw||g*{M(;r|M}um z<b5yu;FpiHfBf~m?C<aYF8lQN?D7b^-r?fw_eWv{O;@7?K`hzUw!hY?4#ejnLYjK
z4_))q at 1%iA10!nSJCjTrm^3hHVA8;(fk^|C1||(m8kjUNX<*X8q=88T-+B!c4@=I@ z2gA+F(IpqXr at -4@7%#P{{e#~1rD^6ja#JrVLYx3^Wz1|py3C9rz~{%?EKMu6H14%s znkEI_%B;o(>RPhg3r(ImhFfdZQ2#263@}Ljh5v<aX)Rg_zL1{ow&rfN{OEhT}k zTn5Q3VP4smNG)4eJgBTR;>T_)zUhin at 2^F8&gZqF|b5t();R09&hMzec*?xfD>3q zKCbyrURkafacRtj%UhZnwc{#Ut*oo0vT5-)(sS-8m<3)#eZ;5&a!RdfcooHl?n!p^ zw2=F%Xal^JD6U4a8!Cf5#XC0!b|BZHA-!<rR9RZQ2Q<8Zl{M|I7QDnS!8RK(Qf?PD z_5B*pJG=&iwb?#fGG$3Qke_ba=yZi5a;nm{O(O%&#1BOHZ@*wU^Zx!Bo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->hxqj&Y-H!1f?|lE`DE(^{*gSkd at z$ve6b^c+vP(

Quoted 9 lines

z$HU+{>myFnedq at Niy@+uFJ2hLZ=x3i%U9tevaQOu-s#xXBlN9>(tjUH|ruUq1y~ zcJ<%Ph^JwAV}9L=a1?%B<J@`Op^Kc4Gh>H0>^*<@${A4+sx7dLq6wv1N~7uUdjA~u zJs``^zv#AK0}5h465$?{GE86s^qufkCDe8zeoEUL{fN?B;5 at UNC)y8<1MyK@EH6C zGbxa%vyJ%mW0bocA1P{)=irw=w@&Gw{Y)CTTHw_zZjE-&5YMizC^wndt8LFe03dq z?Wtr!el<#r&vx|;RF^;8Z?7J7Jl2puMvT?K<+PP9Uhx14@w(8^uFM1#uJpeQkfV=y z^rYZ8>r at e{Gd2vV8rfg8B*dki)yYJ2aw)Cz8#f%Gc|4Ug=>M!4Wz1*Tk7K<aH&t z{}Mr;2Au!<t7rmpT^{Eb2dn4D%l#54!*cm{@2<Bc=?~!<EF=Ws*=`6nKkrwHsYl o;sKN3RX;iY&Drrz4NMxCG%#sk(!ivFNduDxCJjs)_%>_c|AT7s*8l(j

...but I am asking myself if it makes sense to add all these blobs to U-Boot.

I know there are other examples in U_Boot, it is not bad they are only a few. I do not know if this should be competence for the video maintainer or generally for the project, so I added both custodians. By the way, should it not possible to get what you want with CONFIG_CMD_BMP (you have already set it) and CONFIG_PREBOOT to load your image from the media you prefer (and you could also exchange it without recompiling U-Boot) instead of adding it to the U-Boot image ?

Best regards,
Stefano Babic

Signature · 5 lines
=====================================================================
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-0 Fax: +49-8142-66989-80  Email: office at denx.de
=====================================================================
#3 lore raw

PATCH 1/1 tt01: add MMC and video support --> howto avoid LOGO blobs

Quoted 21 lines · Stefano Babic
Quoted 9 lines

index 0000000000000000000000000000000000000000..efdbb4d097abb7ba7ac69e6960030ecb7e19e3cc GIT binary patch
literal 27238 zcmeHOy^Acz5ua&>WoLJ0Zuj<P@0PdgP#8He4unIaT(SOx7YM9CSOO=;nM0*c491zk znZd!sT%Z>S<3tk12n3Q7gFf&_Vg~|0{Hv<&>h9UuW8R_dxre6UW at oymKYsPAuCDH$ zd-b))Z)7a56j}CN-2EGWKgM64%{l%1kF)IQLjEbmuJtOW&ir at qwL9>FX8Xy?0?U z&b~(4`@eWCyT$V@(!c!hN%r(-KgyoG^-}h?KmIEF1JeHc&(E{lw||g*{M(;r|M}um
....

...but I am asking myself if it makes sense to add all these blobs to U-Boot.

I know there are other examples in U_Boot, it is not bad they are only a few. I do not know if this should be competence for the video maintainer or generally for the project, so I added both custodians. By the way, should it not possible to get what you want with CONFIG_CMD_BMP (you have already set it) and CONFIG_PREBOOT to load your image from the media you prefer (and you could also exchange it without recompiling U-Boot) instead of adding it to the U-Boot image ?

Quoted 2 lines

Best regards,
Stefano Babi

Hi,

I tried to walk the preboot path, but it seems I can't get what I want.
CONFIG_VIDEO_LOGO leaves some space on the top left area of the display for the logo AND the scrolling of the text (console redirected to VGA) avoids this area.
Using CONFIG_CONSOLE_EXTRA_INFO places the data on the right side of the logo (which again is not scrolled).

The only way I can think of to avoid blobs like our logo is to patch cfb_console.c
to allow something like:

#define CONFIG_VIDEO_NO_LOGO(w) (w == 0 ? 100 : 200)

#ifdef CONFIG_VIDEO_NO_LOGO
#define VIDEO_LOGO_WIDTH CONFIG_VIDEO_NO_LOGO(0)
#define VIDEO_LOGO_HEIGHT CONFIG_VIDEO_NO_LOGO(1)
#else ... other cases

(or use 3 macros), then use preboot to display the logo where it is supposed to be.
Still the extra info can't be put to the area right to the logo (to prevent it to be scrolled away).

Any suggestions?
Helmut

--
Scanned by MailScanner.

#4 lore raw

PATCH 1/1 tt01: add video support and setup for release

This enables the display on tt-01 along with some minor setup changes (and fixes) for the release. I removed the HALE logo again, using preboot we can use a splash image like approach, but left in the console extra info as it provides useful information even if the screen is used as stdout.

[PATCH 1/3] tt01: fix environment size
[PATCH 2/3] tt01: add video support
[PATCH 3/3] tt01: fix hush parser config, add release config

--
Scanned by MailScanner.

#5 lore raw

PATCH 1/3 tt01: fix environment size

size of environment must match erasable block size in the flash.

---
 include/configs/tt01.h |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
include/configs/tt01.h +1 -1
index 6846816..8dd657c 100644
@@ -131,7 +131,7 @@
 
 #define CONFIG_ENV_IS_IN_FLASH
 #define CONFIG_ENV_SECT_SIZE	(128 * 1024)
-#define CONFIG_ENV_SIZE		(8 * 1024) /* smaller for faster access */
+#define CONFIG_ENV_SIZE		(128 * 1024)
 
 /* Address and size of Redundant Environment Sector	*/
 #define CONFIG_ENV_OFFSET_REDUND	(CONFIG_ENV_OFFSET + CONFIG_ENV_SIZE)
Signature · 6 lines
1.7.4.4



--
Scanned by MailScanner.
#6 lore raw

PATCH 1/3 tt01: fix environment size

Quoted 4 lines · Helmut Raiger

size of environment must match erasable block size in the flash.

---

Applied to u-boot-imx, thanks.

Best regards,
Stefano Babic

Signature · 5 lines
=====================================================================
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-0 Fax: +49-8142-66989-80  Email: office at denx.de
=====================================================================
#7 lore raw

PATCH 2/3 tt01: add video support

In reply to Helmut Raiger

The video setup for the Epson display is provided. Addtionally some extra info is displayed next to the Linux logo.

---
 board/hale/tt01/tt01.c |   21 +++++++++++++++++++++
 include/configs/tt01.h |   29 ++++++++++++++++++++++++++++-
 2 files changed, 49 insertions(+), 1 deletions(-)
board/hale/tt01/tt01.c +21 -0
index ed3fa6e..02e75ed 100644
@@ -228,3 +228,24 @@ int board_eth_init(bd_t *bis)
 #endif
 	return rc;
 }
+
+#ifdef CONFIG_CONSOLE_EXTRA_INFO
+void video_get_info_str(int line_number, char *info)
+{
+	u32 srev = get_cpu_rev();
+
+	switch (line_number) {
+	case 2:
+		sprintf(info, " CPU  : Freescale i.MX31 rev %d.%d%s at %d MHz",
+			(srev & 0xF0) >> 4, (srev & 0x0F),
+			((srev & 0x8000) ? " unknown" : ""),
+		mxc_get_clock(MXC_ARM_CLK) / 1000000);
+		break;
+	case 3:
+		strcpy(info, " " BOARD_STRING);
+		break;
+	default:
+		info[0] = 0;
+	}
+}
+#endif
include/configs/tt01.h +28 -1
index 8dd657c..a3b90d5 100644
@@ -185,6 +185,23 @@
 #define CONFIG_GENERIC_MMC
 #define CONFIG_MXC_MMC
 #define CONFIG_MXC_MCI_REGS_BASE       SDHC1_BASE_ADDR
+
+/* video support */
+#define CONFIG_VIDEO
+#define CONFIG_VIDEO_MX3
+#define CONFIG_CFB_CONSOLE
+#define CONFIG_VIDEO_LOGO
+#define CONFIG_VIDEO_SW_CURSOR
+#define CONFIG_CONSOLE_EXTRA_INFO /* display additional board info */
+#define CONFIG_VGA_AS_SINGLE_DEVICE /* display is an output only device */
+/* allow stdin, stdout and stderr variables to redirect output */
+#define CONFIG_SYS_CONSOLE_IS_IN_ENV
+
+/* allow decompressing max. 4MB */
+#define CONFIG_VIDEO_BMP_GZIP
+/* this is not only used by cfb_console.c for the logo, but also in cmd_bmp.c */
+#define CONFIG_SYS_VIDEO_LOGO_MAX_SIZE (4*1024*1024)
+
 /*
  * Command definition
  */
@@ -201,6 +218,7 @@
  * the NAND_CMD_LOCK_STATUS command, however the NFC of i.MX31 supports
  * a software locking scheme.
  */
+#define CONFIG_CMD_BMP
 
 #define CONFIG_BOOTDELAY	3
 
@@ -208,9 +226,18 @@
  * currently a default setting for booting via script is implemented
  *   set user to login name and serverip to tftp host, define your
  *   boot behaviour in bootscript.loginname
+ *
+ * TT-01 board specific TFT setup (used by drivers/video/mx3fb.c)
+ *
+ *  This set-up is for the L5F30947T04 by Epson, which is
+ *   800x480, 33MHz pixel clock, 60Hz vsync, 31.6kHz hsync
+ *  sync must be set to: DI_D3_DRDY_SHARP_POL | DI_D3_CLK_POL
  */
 #define	CONFIG_EXTRA_ENV_SETTINGS \
-	"bootcmd=dhcp bootscript.$(user); source\0"
+"videomode=epson\0" \
+"epson=video=ctfb:x:800,y:480,depth:16,mode:0,pclk:30076," \
+	"le:215,ri:1,up:32,lo:13,hs:7,vs:10,sync:100663296,vmode:0\0" \
+"bootcmd=dhcp bootscript.$(user); source\0"
 
 #define CONFIG_BOOTP_SERVERIP /* tftp serverip not overruled by dhcp server */
 #define CONFIG_BOOTP_SEND_HOSTNAME /* if env-var 'hostname' is set, send it */
Signature · 6 lines
1.7.4.4



--
Scanned by MailScanner.
#8 lore raw

PATCH 2/3 tt01: add video support

Quoted 5 lines · Helmut Raiger

The video setup for the Epson display is provided. Addtionally some extra info is displayed next to the Linux logo.

---

Hi Helmut,

board/hale/tt01/tt01.c int board_eth_init(bd_t *bis) · line 235

Quoted 4 lines
board/hale/tt01/tt01.c +4 -0
+#ifdef CONFIG_CONSOLE_EXTRA_INFO
+void video_get_info_str(int line_number, char *info)
+{
+	u32 srev = get_cpu_rev();

I get a warning here :

tt01.c:235:2: warning: implicit declaration of function 'get_cpu_rev' [-Wimplicit-function-declaration]

The prototype must be added to ./arch/arm/include/asm/arch-mx31/sys_proto.h.

Can you fix and resubmit ?

Thanks,
Stefano

Signature · 5 lines
=====================================================================
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-0 Fax: +49-8142-66989-80  Email: office at denx.de
=====================================================================
#9 lore raw

PATCH v2 2/3 tt01: add video support

The video setup for the Epson display is provided. Addtionally some extra info is displayed next to the Linux logo. Make get_cpu_rev() publicly available (added to sys_proto.h).

---
V2: added prototype for get_cpu_rev().

 arch/arm/include/asm/arch-mx31/sys_proto.h |    1 +
 board/hale/tt01/tt01.c                     |   21 ++++++++++++++++++++
 include/configs/tt01.h                     |   29 +++++++++++++++++++++++++++-
 3 files changed, 50 insertions(+), 1 deletions(-)
arch/arm/include/asm/arch-mx31/sys_proto.h +1 -0
index ded481c..f3fa04d 100644
@@ -32,4 +32,5 @@ struct mxc_weimcs {
 
 void mxc_setup_weimcs(int cs, const struct mxc_weimcs *weimcs);
 int mxc_mmc_init(bd_t *bis);
+u32 get_cpu_rev(void);
 #endif
board/hale/tt01/tt01.c +21 -0
index ed3fa6e..02e75ed 100644
@@ -228,3 +228,24 @@ int board_eth_init(bd_t *bis)
 #endif
 	return rc;
 }
+
+#ifdef CONFIG_CONSOLE_EXTRA_INFO
+void video_get_info_str(int line_number, char *info)
+{
+	u32 srev = get_cpu_rev();
+
+	switch (line_number) {
+	case 2:
+		sprintf(info, " CPU  : Freescale i.MX31 rev %d.%d%s at %d MHz",
+			(srev & 0xF0) >> 4, (srev & 0x0F),
+			((srev & 0x8000) ? " unknown" : ""),
+		mxc_get_clock(MXC_ARM_CLK) / 1000000);
+		break;
+	case 3:
+		strcpy(info, " " BOARD_STRING);
+		break;
+	default:
+		info[0] = 0;
+	}
+}
+#endif
include/configs/tt01.h +28 -1
index fda5d6c..2e83cb2 100644
@@ -185,6 +185,23 @@
 #define CONFIG_GENERIC_MMC
 #define CONFIG_MXC_MMC
 #define CONFIG_MXC_MCI_REGS_BASE       SDHC1_BASE_ADDR
+
+/* video support */
+#define CONFIG_VIDEO
+#define CONFIG_VIDEO_MX3
+#define CONFIG_CFB_CONSOLE
+#define CONFIG_VIDEO_LOGO
+#define CONFIG_VIDEO_SW_CURSOR
+#define CONFIG_CONSOLE_EXTRA_INFO /* display additional board info */
+#define CONFIG_VGA_AS_SINGLE_DEVICE /* display is an output only device */
+/* allow stdin, stdout and stderr variables to redirect output */
+#define CONFIG_SYS_CONSOLE_IS_IN_ENV
+
+/* allow decompressing max. 4MB */
+#define CONFIG_VIDEO_BMP_GZIP
+/* this is not only used by cfb_console.c for the logo, but also in cmd_bmp.c */
+#define CONFIG_SYS_VIDEO_LOGO_MAX_SIZE (4*1024*1024)
+
 /*
  * Command definition
  */
@@ -201,6 +218,7 @@
  * the NAND_CMD_LOCK_STATUS command, however the NFC of i.MX31 supports
  * a software locking scheme.
  */
+#define CONFIG_CMD_BMP
 
 #define CONFIG_BOOTDELAY	3
 
@@ -208,9 +226,18 @@
  * currently a default setting for booting via script is implemented
  *   set user to login name and serverip to tftp host, define your
  *   boot behaviour in bootscript.loginname
+ *
+ * TT-01 board specific TFT setup (used by drivers/video/mx3fb.c)
+ *
+ *  This set-up is for the L5F30947T04 by Epson, which is
+ *   800x480, 33MHz pixel clock, 60Hz vsync, 31.6kHz hsync
+ *  sync must be set to: DI_D3_DRDY_SHARP_POL | DI_D3_CLK_POL
  */
 #define	CONFIG_EXTRA_ENV_SETTINGS \
-	"bootcmd=dhcp bootscript.$(user); source\0"
+"videomode=epson\0" \
+"epson=video=ctfb:x:800,y:480,depth:16,mode:0,pclk:30076," \
+	"le:215,ri:1,up:32,lo:13,hs:7,vs:10,sync:100663296,vmode:0\0" \
+"bootcmd=dhcp bootscript.$(user); source\0"
 
 #define CONFIG_BOOTP_SERVERIP /* tftp serverip not overruled by dhcp server */
 #define CONFIG_BOOTP_SEND_HOSTNAME /* if env-var 'hostname' is set, send it */
Signature · 6 lines
1.7.4.4



--
Scanned by MailScanner.
#10 lore raw

PATCH v2 2/3 tt01: add video support

Quoted 6 lines · Helmut Raiger

The video setup for the Epson display is provided. Addtionally some extra info is displayed next to the Linux logo. Make get_cpu_rev() publicly available (added to sys_proto.h).

---

Applied to u-boot-imx, thanks.

Best regards,
Stefano Babic

Signature · 5 lines
=====================================================================
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-0 Fax: +49-8142-66989-80  Email: office at denx.de
=====================================================================
#11 lore raw

PATCH 3/3 tt01: fix hush parser config, add release config

In reply to Helmut Raiger

Add PREBOOT, SILENT_CONSOLE and DEVICE_NULLDEV for release build. Fixed bug in CONFIG_SYS_HUSH_PARSER define.

---
 include/configs/tt01.h |   11 ++++++++---
 1 files changed, 8 insertions(+), 3 deletions(-)
include/configs/tt01.h +8 -3
index a3b90d5..c5bfe5f 100644
@@ -191,11 +191,16 @@
 #define CONFIG_VIDEO_MX3
 #define CONFIG_CFB_CONSOLE
 #define CONFIG_VIDEO_LOGO
+/* splash image won't work with NAND boot, use preboot script */
 #define CONFIG_VIDEO_SW_CURSOR
 #define CONFIG_CONSOLE_EXTRA_INFO /* display additional board info */
 #define CONFIG_VGA_AS_SINGLE_DEVICE /* display is an output only device */
+
 /* allow stdin, stdout and stderr variables to redirect output */
 #define CONFIG_SYS_CONSOLE_IS_IN_ENV
+#define CONFIG_SILENT_CONSOLE		/* UARTs used externally (release) */
+#define CONFIG_SYS_DEVICE_NULLDEV	/* allow console to be turned off */
+#define CONFIG_PREBOOT
 
 /* allow decompressing max. 4MB */
 #define CONFIG_VIDEO_BMP_GZIP
@@ -237,14 +242,14 @@
 "videomode=epson\0" \
 "epson=video=ctfb:x:800,y:480,depth:16,mode:0,pclk:30076," \
 	"le:215,ri:1,up:32,lo:13,hs:7,vs:10,sync:100663296,vmode:0\0" \
-"bootcmd=dhcp bootscript.$(user); source\0"
+"bootcmd=dhcp bootscript.${user}; source\0"
 
 #define CONFIG_BOOTP_SERVERIP /* tftp serverip not overruled by dhcp server */
 #define CONFIG_BOOTP_SEND_HOSTNAME /* if env-var 'hostname' is set, send it */
 
 /* Miscellaneous configurable options */
-#define CONFIG_HUSH_PARSER
-#define CONFIG_PROMPT_HUSH_PS2	"> "
+#define CONFIG_SYS_HUSH_PARSER
+#define CONFIG_SYS_PROMPT_HUSH_PS2	"> "
 
 #define CONFIG_SYS_LONGHELP			/* undef to save memory */
 #define CONFIG_SYS_PROMPT	"TT01> "
Signature · 6 lines
1.7.4.4



--
Scanned by MailScanner.
#12 lore raw

PATCH 3/3 imx31: tt01: fix hush parser config, add release config

Quoted 4 lines · Helmut Raiger

Add PREBOOT, SILENT_CONSOLE and DEVICE_NULLDEV for release build. Fixed bug in CONFIG_SYS_HUSH_PARSER define.

Stefano, please comment, it's only board specific.

Helmut

--
Scanned by MailScanner.

#13 lore raw

PATCH 3/3 imx31: tt01: fix hush parser config, add release config

Quoted 6 lines · Helmut Raiger
Quoted 4 lines · Helmut Raiger

Add PREBOOT, SILENT_CONSOLE and DEVICE_NULLDEV for release build. Fixed bug in CONFIG_SYS_HUSH_PARSER define.

Stefano, please comment, it's only board specific.

Hi Helmut,

I think patches are ok - I will merge them into u-boot-imx.

Best regards,
Stefano Babic

Signature · 5 lines
=====================================================================
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-0 Fax: +49-8142-66989-80  Email: office at denx.de
=====================================================================
#14 lore raw

PATCH 3/3 tt01: fix hush parser config, add release config

In reply to Helmut Raiger
Quoted 5 lines · Helmut Raiger

Add PREBOOT, SILENT_CONSOLE and DEVICE_NULLDEV for release build. Fixed bug in CONFIG_SYS_HUSH_PARSER define.

---

Applied to u-boot-imx, thanks.

Best regards,
Stefano Babic

Signature · 5 lines
=====================================================================
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-0 Fax: +49-8142-66989-80  Email: office at denx.de
=====================================================================