Skip to contentSkip to conversation

Splash screen on mx35 3 stack

DISCUSSION Marc Reilly 4 participants 6 messages Mar 31, 2010 – Apr 6, 2010

Subsystems (4)
lore
Share & tools
lore
#0 lore raw

Hi,

I have a freescale IMX35PDK (3 stack) and want to get a bmp showing as a splash screen, but am not having any luck. (Just getting a white screen, although the backlight comes on). All hardware is as-original, using the CLAA 800x480 LCD.

Has anyone had success getting something showing on the screen with the mx35 pdk? (or any other platform I can use as a reference).

To test, I'm simply using the "bmp" command with a small 100x100 test picture. No errors are reported, but the screen never changes.

From the barebox prompt if do "devinfo fb0" I get some info, but the enable is 0.

If I do fb0.enable=1 it doesn't make a difference.

Also:

- The fb works fine once booted into linux.

- Start-up messages indicate that the driver and device is
recognized:

Any ideas?

Cheers

Marc

PS. Snip of startup messages: (shows the driver/device is being loaded)

barebox 2010.03.0-00100-gf4a5a39-dirty (Mar 31 2010 - 18:32:31)

Board: Freescale MX35 3Stack

NAND device: Manufacturer ID: 0xec, Chip ID: 0xd5 (Samsung NAND 2GiB 3,3V 8-bit)

Bad block table found at page 1048448, version 0x01

Bad block table found at page 1048320, version 0x01

cfi_probe: cfi_flash base: 0xa0000000 size: 0x04000000

cfi_protect: protect 0xa0040000 (size 524288)

imx-ipu-fb@imx-ipu-fb0: i.MX Framebuffer driver

mc13892@mc138920: revision: 0x41d0

_______________________________________________
barebox mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/barebox

maintainer
#1 lore raw

Hi Marc,

Quoted 8 lines · Marc Reilly

Hi,

I have a freescale IMX35PDK (3 stack) and want to get a bmp showing as a splash screen, but am not having any luck. (Just getting a white screen, although the backlight comes on). All hardware is as-original, using the CLAA 800x480 LCD.

I have short circuited pins 2 and 3 of q6 on the personality board to get power to the LCD. q6 is normally driven by the mc9s08 (pin ptf0). We did not have any code for this chip at that time and then forgot about it. As we now have a driver for it it should only be a matter of finding the right bits to twiddle with. Patches welcome ;)

Quoted 5 lines

To test, I'm simply using the "bmp" command with a small 100x100 test picture. No errors are reported, but the screen never changes.

You can do a cp /dev/ram0 /dev/fb0 for some testing without the bmp command.

Sascha

Signature · 9 lines
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

_______________________________________________
barebox mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/barebox
#5 lore raw
In reply to Marc Reilly

Hi Marc,

Quoted 8 lines · Marc Reilly

I have a freescale IMX35PDK (3 stack) and want to get a bmp showing as a splash screen, but am not having any luck. (Just getting a white screen, although the backlight comes on). All hardware is as-original, using the CLAA 800x480 LCD.

Has anyone had success getting something showing on the screen with the mx35 pdk? (or any other platform I can use as a reference).

please find attached a patch (WIP based on 3stack so not polished yet) which works on our platform (iMX357 with a QVGA LCD)

Eric

From c4ee6ddd8878e84fa470a8f1514a55900b66fa9f Mon Sep 17 00:00:00 2001
From: Eric Benard <[email protected]>
Date: Thu, 1 Apr 2010 07:53:29 +0200
Subject: [PATCH] Add support for Eukrea CPUIMX35

---
 arch/arm/Makefile                           |    1 +
 arch/arm/mach-imx/Kconfig                   |   10 +
 board/eukrea_cpuimx35/3stack.dox            |    4 +
 board/eukrea_cpuimx35/Makefile              |    4 +
 board/eukrea_cpuimx35/board-mx35_3stack.h   |  107 ++++++++
 board/eukrea_cpuimx35/config.h              |   28 ++
 board/eukrea_cpuimx35/env/bin/_update       |   39 +++
 board/eukrea_cpuimx35/env/bin/boot          |   48 ++++
 board/eukrea_cpuimx35/env/bin/hush_hack     |    1 +
 board/eukrea_cpuimx35/env/bin/init          |   34 +++
 board/eukrea_cpuimx35/env/bin/update_kernel |    8 +
 board/eukrea_cpuimx35/env/bin/update_rootfs |   13 +
 board/eukrea_cpuimx35/env/config            |   32 +++
 board/eukrea_cpuimx35/eukrea_cpuimx35.c     |  354 +++++++++++++++++++++++++++
 board/eukrea_cpuimx35/flash_header.c        |   60 +++++
 board/eukrea_cpuimx35/lowlevel_init.S       |  285 +++++++++++++++++++++
 16 files changed, 1028 insertions(+), 0 deletions(-)
 create mode 100644 board/eukrea_cpuimx35/3stack.dox
 create mode 100644 board/eukrea_cpuimx35/Makefile
 create mode 100644 board/eukrea_cpuimx35/board-mx35_3stack.h
 create mode 100644 board/eukrea_cpuimx35/config.h
 create mode 100644 board/eukrea_cpuimx35/env/bin/_update
 create mode 100644 board/eukrea_cpuimx35/env/bin/boot
 create mode 100644 board/eukrea_cpuimx35/env/bin/hush_hack
 create mode 100644 board/eukrea_cpuimx35/env/bin/init
 create mode 100644 board/eukrea_cpuimx35/env/bin/update_kernel
 create mode 100644 board/eukrea_cpuimx35/env/bin/update_rootfs
 create mode 100644 board/eukrea_cpuimx35/env/config
 create mode 100644 board/eukrea_cpuimx35/eukrea_cpuimx35.c
 create mode 100644 board/eukrea_cpuimx35/flash_header.c
 create mode 100644 board/eukrea_cpuimx35/lowlevel_init.S
arch/arm/Makefile +1 -0
index fbbea42..dec5e41 100644
@@ -61,6 +61,7 @@ board-$(CONFIG_MACH_EDB93012)			:= edb93xx
 board-$(CONFIG_MACH_EDB9315)			:= edb93xx
 board-$(CONFIG_MACH_EDB9315A)			:= edb93xx
 board-$(CONFIG_MACH_EUKREA_CPUIMX27)		:= eukrea_cpuimx27
+board-$(CONFIG_MACH_EUKREA_CPUIMX35)		:= eukrea_cpuimx35
 board-$(CONFIG_MACH_FREESCALE_MX25_3STACK)	:= freescale-mx25-3-stack
 board-$(CONFIG_MACH_FREESCALE_MX35_3STACK)	:= freescale-mx35-3-stack
 board-$(CONFIG_MACH_IMX21ADS)			:= imx21ads
arch/arm/mach-imx/Kconfig +10 -0
index eeb392a..5713a2f 100644
@@ -3,6 +3,7 @@ if ARCH_IMX
 config ARCH_TEXT_BASE
 	hex
 	default 0xa0000000 if MACH_EUKREA_CPUIMX27
+	default 0x87f00000 if MACH_EUKREA_CPUIMX35
 	default 0x08f00000 if MACH_MX1ADS
 	default 0xc0000000 if MACH_IMX21ADS
 	default 0xa0000000 if MACH_IMX27ADS
@@ -16,6 +17,7 @@ config ARCH_TEXT_BASE
 
 config BOARDINFO
 	default "Eukrea CPUIMX27" if MACH_EUKREA_CPUIMX27
+	default "Eukrea CPUIMX35" if MACH_EUKREA_CPUIMX35
 	default "Freescale i.MX21 ADS" if MACH_IMX21ADS
 	default "Freescale i.MX27 ADS" if MACH_IMX27ADS
 	default "Freescale MX35 3Stack" if MACH_FREESCALE_MX35_3STACK
@@ -212,6 +214,14 @@ choice
 
 	prompt "i.MX35 Board Type"
 
+config MACH_EUKREA_CPUIMX35
+	bool "EUKREA CPUIMX35"
+	select HAVE_MMU
+	select MACH_HAS_LOWLEVEL_INIT
+	help
+	  Say Y here if you are using Eukrea's CPUIMX35 equipped
+	  with a Freescale i.MX35 Processor
+
 config MACH_FREESCALE_MX35_3STACK
 	bool "Freescale MX35 3stack"
 	select HAS_CFI
board/eukrea_cpuimx35/3stack.dox new file +4 -0
new file mode 100644
index 0000000..15c5b6e
@@ -0,0 +1,4 @@
+/** @page the3stack Freescale MX35 3-Stack Board
+
+
+*/
board/eukrea_cpuimx35/Makefile new file +4 -0
new file mode 100644
index 0000000..bc4e66b
@@ -0,0 +1,4 @@
+
+obj-y					+= lowlevel_init.o
+obj-y					+= eukrea_cpuimx35.o
+obj-$(CONFIG_ARCH_IMX_INTERNAL_BOOT)	+= flash_header.o
board/eukrea_cpuimx35/board-mx35_3stack.h new file +107 -0

107 lines not on this page · raw message

board/eukrea_cpuimx35/config.h new file +28 -0
new file mode 100644
index 0000000..c724a57
@@ -0,0 +1,28 @@
+/*
+ * 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
+ */
+
+/**
+ * @file
+ * @brief Global defintions for the Freescale i.MX35 3-stack board
+ */
+
+#ifndef __CONFIG_H
+#define __CONFIG_H
+
+#define CONFIG_MX35_HCLK_FREQ        24000000
+
+#endif	/* __CONFIG_H */
board/eukrea_cpuimx35/env/bin/_update new file +39 -0
new file mode 100644
index 0000000..4f0839f
@@ -0,0 +1,39 @@
+#!/bin/sh
+
+if [ -z "$part" -o -z "$image" ]; then
+	echo "define \$part and \$image"
+	exit 1
+fi
+
+if [ \! -e "$part" ]; then
+	echo "Partition $part does not exist"
+	exit 1
+fi
+
+if [ $# = 1 ]; then
+	image=$1
+fi
+
+if [ x$ip = xdhcp ]; then
+	dhcp
+fi
+
+ping $eth0.serverip
+if [ $? -ne 0 ] ; then
+	echo "Server did not reply! Update aborted."
+	exit 1
+fi
+
+unprotect $part
+
+echo
+echo "erasing partition $part"
+echo
+erase $part
+
+echo
+echo "flashing $image to $part"
+echo
+tftp $image $part
+
+protect $part
board/eukrea_cpuimx35/env/bin/boot new file +48 -0

48 lines not on this page · raw message

board/eukrea_cpuimx35/env/bin/hush_hack new file +1 -0
new file mode 100644
index 0000000..5fffa92
@@ -0,0 +1 @@
+nand -a /dev/nand0.*
board/eukrea_cpuimx35/env/bin/init new file +34 -0
new file mode 100644
index 0000000..456cc10
@@ -0,0 +1,34 @@
+#!/bin/sh
+
+PATH=/env/bin
+export PATH
+
+. /env/config
+if [ -e /dev/nand0 ]; then
+	addpart /dev/nand0 $nand_parts
+
+	# Uh, oh, hush first expands wildcards and then starts executing
+	# commands. What a bug!
+	source /env/bin/hush_hack 
+fi
+
+if [ -z $eth0.ethaddr ]; then
+	while [ -z $eth0.ethaddr ]; do
+		readline "no MAC address set for eth0. please enter the one found on your board: " eth0.ethaddr
+	done
+	echo -a /env/config "eth0.ethaddr=$eth0.ethaddr"
+	saveenv
+fi
+
+echo
+echo -n "Hit any key to stop autoboot: "
+timeout -a $autoboot_timeout
+if [ $? != 0 ]; then
+	echo
+	echo "type update_kernel [<imagename>] to update kernel into flash"
+	echo "type update_rootfs [<imagename>] to update rootfs into flash"
+	echo
+	exit
+fi
+
+boot
board/eukrea_cpuimx35/env/bin/update_kernel new file +8 -0
new file mode 100644
index 0000000..f84d3c5
@@ -0,0 +1,8 @@
+#!/bin/sh
+
+. /env/config
+image=$kernel
+
+part=/dev/nand0.kernel.bb
+
+. /env/bin/_update $2
board/eukrea_cpuimx35/env/bin/update_rootfs new file +13 -0
new file mode 100644
index 0000000..8017d9a
@@ -0,0 +1,13 @@
+#!/bin/sh
+
+. /env/config
+
+if [ $rootfs_type = ubifs ]; then
+	image=${rootfs}.ubi
+else
+	image=${rootfs}.$rootfs_type
+fi
+
+part=/dev/nand0.root.bb
+
+. /env/bin/_update $2
board/eukrea_cpuimx35/env/config new file +32 -0
new file mode 100644
index 0000000..b305f8c
@@ -0,0 +1,32 @@
+#!/bin/sh
+
+# use 'dhcp' to do dhcp in barebox and in kernel
+# use 'no' if you don't want to pass the ip from barebox to the kernel
+#ip=dhcp
+
+# or set your networking parameters here
+#eth0.ipaddr=a.b.c.d
+#eth0.netmask=a.b.c.d
+#eth0.gateway=a.b.c.d
+#eth0.serverip=a.b.c.d
+
+# can be either 'net' or 'nand''
+kernel_loc=nand
+rootfs_loc=nand
+
+# can be either 'jffs2', or 'ubifs'
+rootfs_type=ubifs
+
+kernel=uImage-mx35-3-stack
+rootfs=root-mx35-3-stack
+envimage=u-boot-v2-environment-mx35-3-stack
+
+autoboot_timeout=3
+
+nfsroot="/path/to/nfs/root"
+bootargs="console=ttymxc0,115200"
+
+bootargs="$bootargs video=mx3fb:CTP-CLAA070LC0ACW"
+
+nand_parts="256k(barebox)ro,128k(bareboxenv),2176k(kernel),-(root)"
+rootfs_mtdblock_nand=3
board/eukrea_cpuimx35/eukrea_cpuimx35.c new file +354 -0

354 lines not on this page · raw message

board/eukrea_cpuimx35/flash_header.c new file +60 -0

60 lines not on this page · raw message

board/eukrea_cpuimx35/lowlevel_init.S new file +285 -0

285 lines not on this page · raw message

Signature · 1 line
1.6.3.3

_______________________________________________
barebox mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/barebox

#2 lore raw
In reply to Sascha Hauer

Hi Sascha,

Please pardon my terrible manners for not saying a big "thank you" sooner! Easter holiday preparations got in the way.

Quoted 1 line

I have short circuited pins 2 and 3 of q6 on the personality board to get

power

Quoted 1 line

to the LCD. q6 is normally driven by the mc9s08 (pin ptf0). We did not

have

Quoted 1 line

any code for this chip at that time and then forgot about it. As we now

have a

Quoted 1 line

driver for it it should only be a matter of finding the right bits to

twiddle with.

Ah, I see ... so this LCD only works if power is supplied to it? :)

As a quick test I shorted out pin 2 and 3 of Q6, and the LCD works. However, I can't that FET to turn on via software. I've tried enabling the LCD in f3s_enable_display with:

u8 mask = (0x01 << 6);
mc9sdz60_set_bits( mc9sdz60_get(), MC9SDZ60_REG_GPIO_1, mask , mask);

From a quick glance, this seemed to be essentially what the kernel was doing. Mc9sdz60 registers read as expected but the screen stays off - that's as much as I had time for.

Quoted 1 line

Patches welcome ;)

If I figure it out, will submit a patch for sure, but I'll be moving to custom hardware soon and it will become irrelevant, so I may have to admit defeat.

Thanks again!

Cheers
Marc

_______________________________________________
barebox mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/barebox

maintainer
#3 lore raw
Quoted 4 lines · Marc Reilly

Hi Sascha,

Please pardon my terrible manners for not saying a big "thank you" sooner! Easter holiday preparations got in the way.

No problem, I was in easter mdoe aswell ;)

Quoted 19 lines
Quoted 2 lines

I have short circuited pins 2 and 3 of q6 on the personality board to get

power

Quoted 1 line

to the LCD. q6 is normally driven by the mc9s08 (pin ptf0). We did not

have

Quoted 1 line

any code for this chip at that time and then forgot about it. As we now

have a

Quoted 1 line

driver for it it should only be a matter of finding the right bits to

twiddle with.

Ah, I see ... so this LCD only works if power is supplied to it? :)

As a quick test I shorted out pin 2 and 3 of Q6, and the LCD works. However, I can't that FET to turn on via software. I've tried enabling the LCD in f3s_enable_display with:

u8 mask = (0x01 << 6);
mc9sdz60_set_bits( mc9sdz60_get(), MC9SDZ60_REG_GPIO_1, mask , mask);

Quoted 8 lines

From a quick glance, this seemed to be essentially what the kernel was doing. Mc9sdz60 registers read as expected but the screen stays off - that's as much as I had time for.

Quoted 1 line

Patches welcome ;)

If I figure it out, will submit a patch for sure, but I'll be moving to custom hardware soon and it will become irrelevant, so I may have to admit defeat.

Same situation here, so I added the following patch to make this clear:

From 86d1c12dd33b538dd2b3fc750d869e9defa2cd6e Mon Sep 17 00:00:00 2001
From: Sascha Hauer <[email protected]>
Date: Tue, 6 Apr 2010 08:28:00 +0200
Subject: [PATCH] i.MX35 3stack: Add a comment about the nonworking display

---
 board/freescale-mx35-3-stack/3stack.c |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)
board/freescale-mx35-3-stack/3stack.c +4 -0
index 3b6a93b..1faf1b9 100644
@@ -113,6 +113,10 @@ static struct device_d i2c_dev = {
 
 /*
  * Generic display, shipped with the PDK
+ * FIXME: The power for the display is driven by the mc9s08. This is
+ * currently not done in software, for the display to work you have to
+ * short ciruit pins 2 and 3 of q6 on the personality board, or better,
+ * send a patch.
  */
 static struct fb_videomode CTP_CLAA070LC0ACW = {
 	/* 800x480 @ 60 Hz */
Signature · 13 lines
1.7.0


-- 
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

_______________________________________________
barebox mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/barebox
#4 lore raw
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Sascha" == 'Sascha Hauer' <[email protected]> writes:

Hi,

Sascha> Same situation here, so I added the following patch to make this clear:

Quoted 1 line
Quoted 1 line

From 86d1c12dd33b538dd2b3fc750d869e9defa2cd6e Mon Sep 17 00:00:00 2001

Sascha> From: Sascha Hauer <[email protected]>
Sascha> Date: Tue, 6 Apr 2010 08:28:00 +0200
Sascha> Subject: [PATCH] i.MX35 3stack: Add a comment about the nonworking display

Sascha> * Generic display, shipped with the PDK
Sascha> + * FIXME: The power for the display is driven by the mc9s08. This is Sascha> + * currently not done in software, for the display to work you have to Sascha> + * short ciruit pins 2 and 3 of q6 on the personality board, or better,

s/ciruit/circuit/

Signature · 6 lines
Bye, Peter Korsgaard

_______________________________________________
barebox mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/barebox