From: Juergen Beisert <jbe@pengutronix.de>
To: barebox@lists.infradead.org
Cc: Juergen Beisert <juergen@kreuzholzen.de>
Subject: [PATCH 06/15] mini2440: Add some useful documentation
Date: Sun, 13 Feb 2011 15:10:43 +0100 [thread overview]
Message-ID: <1297606252-802-7-git-send-email-jbe@pengutronix.de> (raw)
In-Reply-To: <1297606252-802-1-git-send-email-jbe@pengutronix.de>
From: Juergen Beisert <juergen@kreuzholzen.de>
Signed-off-by: Juergen Beisert <juergen@kreuzholzen.de>
---
arch/arm/boards/mini2440/mini2440.c | 157 +++++++++++++++++++++++++++++++++++
1 files changed, 157 insertions(+), 0 deletions(-)
diff --git a/arch/arm/boards/mini2440/mini2440.c b/arch/arm/boards/mini2440/mini2440.c
index e22fbd0..17496a4 100644
--- a/arch/arm/boards/mini2440/mini2440.c
+++ b/arch/arm/boards/mini2440/mini2440.c
@@ -64,6 +64,10 @@ static struct device_d nand_dev = {
/*
* dm9000 network controller onboard
+ * Connected to CS line 4 and interrupt line EINT7,
+ * data width is 16 bit
+ * Area 1: Offset 0x300...0x303
+ * Area 2: Offset 0x304...0x307
*/
static struct dm9000_platform_data dm9000_data = {
.iobase = CS4_BASE + 0x300,
@@ -139,3 +143,156 @@ static int mini2440_console_init(void)
}
console_initcall(mini2440_console_init);
+
+/** @page mini2440 FriendlyARM's mini2440
+
+This system is based on a Samsung S3C2440 CPU. The card is shipped with:
+
+- S3C2440\@400 MHz or 533 MHz (ARM920T/ARMv4T)
+- 12 MHz crystal reference
+- 32.768 kHz crystal reference
+- SDRAM 64 MiB (one bank only)
+ - HY57V561620 (two devices for 64 MiB to form a 32 bit bus)
+ - 4M x 16bit x 4 Banks Mobile SDRAM
+ - 8192 refresh cycles / 64 ms
+ - CL2\@100 MHz
+ - 133 MHz max
+ - collumn address size is 9 bits
+ - row address size is 13 bits
+ - MT48LC16M16 (two devices for 64 MiB to form a 32 bit bus)
+ - 4M x 16bit x 4 Banks Mobile SDRAM
+ - commercial & industrial type
+ - 8192 refresh cycles / 64 ms
+ - CL2\@100 MHz
+ - 133 MHz max
+ - collumn address size is 9 bits
+ - row address size is 13 bits
+- NAND Flash 128MiB...1GiB
+ - K9Fxx08
+- NOR Flash (up to 22 address lines available)
+ - AM29LV160DB, 2 MiB
+ - SST39VF1601, 2 MiB
+ - 16 bit data bus
+- SD card interface, 3.3V (fixed voltage)
+- Host and device USB interface, USB1.1 compliant
+- UDA1341TS Audio
+- DM9000 Ethernet interface
+ - uses CS#4
+ - uses EINT7
+ - 16 bit data bus
+- I2C interface, 100 KHz and 400 KHz
+ - EEPROM
+ - ST M24C08
+ - address 0x50
+- Speaker on GPB0 ("low" = inactive)
+- LCD interface
+- Touch Screen interface
+- Camera interface
+- I2S interface
+- AC97 Audio-CODEC interface
+- three serial RS232 interfaces (one with level converter)
+- SPI interface
+- JTAG interface
+
+How to get the binary image:
+
+Using the default configuration:
+
+@code
+make ARCH=arm mini2440_defconfig
+@endcode
+
+Build the binary image:
+
+@code
+make ARCH=arm CROSS_COMPILE=armv4compiler
+@endcode
+
+@note replace the armv4compiler with your ARM v4 cross compiler.
+
+How to bring in \a barebox ?
+
+First run it as a second stage bootloader. There are two known working ways to
+do so:
+
+One way is to use the "device firmware update" feature of the 'supervivi'.
+ - connect a terminal application to the mini2440's serial connector
+ - switch S2 to 'boot from NOR' to boot into 'supervivi'
+ - connect your host to the usb device connector on the mini2440
+ - switch on your mini2440
+ - in 'supervivi' type q (command line) then:
+@code
+load ram 0x31000000 \<barebox-size\> u
+@endcode
+ - use a tool for DFU update (for example from openkomo) to transfer the 'barebox.bin' binary
+ - then in 'supervivi' just run
+@code
+go 0x31000000
+@endcode
+
+A second way is to use any kind of JTAG adapter. For this case I'm using the
+'JTAKkey tiny' from Amontec and OpenOCD. First you need an adapter for this
+kind of Dongle as it uses a 20 pin connector with 2.54 mm grid, and the
+mini2440 uses a 10 pin connector with 2 mm grid.
+
+@code
+ Amontec JTAGkey tiny mini2440
+ -------------------------------------------------------
+ VREF 1 2 n.c. VREF 1 2 VREF
+ TRST_N 3 4 GND TRST_N 3 4 SRST_N
+ TDI 5 6 GND TDI 5 6 TDO
+ TMS 7 8 GND TMS 7 8 GND
+ TCK 9 10 GND TCK 9 10 GND
+ n.c. 11 12 GND
+ TDO 13 14 GND
+ SRST_N 15 16 GND
+ n.c. 17 18 GND
+ n.c. 19 20 GND
+@endcode
+
+Create a simple board description file. I did it this way:
+
+@code
+source [find interface/jtagkey-tiny.cfg]
+source [find target/samsung_s3c2440.cfg]
+
+adapter_khz 12000
+@endcode
+
+And then the following steps:
+ - connect a terminal application to the mini2440's serial connector
+ - connect the mini2440 to a working network
+ - switch S2 to boot from NOR to boot into 'supervivi'
+ - switch on your mini2440
+ - run the OpenOCD daemon configured with the file shown above
+ - connect to the OpenOCD daemon via 'telnet'.
+ - run the following commands to download @a barebox into your target
+@code
+> halt
+> load_image \<path to the 'barebox.bin'\> 0x31000000 bin
+> resume 0x31000000
+@endcode
+
+Now @a barebox is starting from an already initialized CPU and SDRAM (done by
+'supervivi').
+
+Change to your terminal console and configure the network first. Adapt the
+following settings to your network:
+@code
+eth0.ipaddr=192.168.1.240
+eth0.netmask=255.255.255.0
+eth0.gateway=192.168.23.2
+eth0.serverip=192.168.1.7
+eth0.ethaddr=00:04:f3:00:06:35
+@endcode
+
+A 'ping' to your TFTP server should bring a "...is alive" message now.
+
+We are ready now to program @a barebox into the NAND flash:
+
+@code
+erase /dev/nand0.barebox.bb
+tftp barebox.bin /dev/nand0.barebox.bb
+@endcode
+
+*/
--
1.7.2.3
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
next prev parent reply other threads:[~2011-02-13 14:11 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-02-13 14:10 RFC: Booting from NAND for mini2440 platform Juergen Beisert
2011-02-13 14:10 ` [PATCH 01/15] S3C24xx: Just remove a trailing whitespace Juergen Beisert
2011-02-13 14:10 ` [PATCH 02/15] MACH-S3C24xx: Fix typo in UART2_SIZE macro Juergen Beisert
2011-02-13 14:10 ` [PATCH 03/15] MACH-S324xx: Change detection method of the second SDRAM bank Juergen Beisert
2011-02-13 14:10 ` [PATCH 04/15] mini2440: Be a little be pedantic with the include file order Juergen Beisert
2011-02-13 14:10 ` [PATCH 05/15] mini2440: Fix a runtime warning when '.id=0' is used Juergen Beisert
2011-02-13 14:10 ` Juergen Beisert [this message]
2011-02-13 14:10 ` [PATCH 07/15] mini2440: Add PLL settings Juergen Beisert
2011-02-13 14:10 ` [PATCH 08/15] mini2440: Add SDRAM config settings Juergen Beisert
2011-02-13 14:10 ` [PATCH 09/15] mini2440: Configure debug UART pins very early Juergen Beisert
2011-02-13 14:10 ` [PATCH 10/15] mini2440: Add SDRAM size autodetection Juergen Beisert
2011-02-13 14:10 ` [PATCH 11/15] mini2440: Add GPIO settings Juergen Beisert
2011-02-13 14:10 ` [PATCH 12/15] mini2440: Add MCI support Juergen Beisert
2011-02-13 14:10 ` [PATCH 13/15] mini2440: Add booting from NAND support Juergen Beisert
2011-02-13 14:10 ` [PATCH 14/15] mini2440: Remove some A9M2440 platform leftovers Juergen Beisert
2011-02-14 9:35 ` Juergen Beisert
2011-02-13 14:10 ` [PATCH 15/15] mini2440: Use generic environment Juergen Beisert
2011-02-13 19:01 ` mini2440: Forgotten patches to make it work (1 of 2) Juergen Beisert
2011-02-13 19:49 ` mini2440: Forgotten patches to make it work (2 " Juergen Beisert
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1297606252-802-7-git-send-email-jbe@pengutronix.de \
--to=jbe@pengutronix.de \
--cc=barebox@lists.infradead.org \
--cc=juergen@kreuzholzen.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox