public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Fabio Estevam <festevam@gmail.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH v2 3/3] mx28evk: Add documentation on how to boot from SPI NOR
Date: Thu,  8 May 2014 20:35:36 -0300	[thread overview]
Message-ID: <1399592136-24497-3-git-send-email-festevam@gmail.com> (raw)
In-Reply-To: <1399592136-24497-1-git-send-email-festevam@gmail.com>

From: Fabio Estevam <fabio.estevam@freescale.com>

Explain the necessary steps in order to boot from SPI NOR.

Based on a earlier submission from M?rten Wikman.

Signed-off-by: M?rten Wikman <marten.wikman@novia.fi>
Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
---
Changes since v1:
- Remove accidental hunk:
"-
+n"

 board/freescale/mx28evk/README | 22 +++++++++++++++++++---
 doc/README.mxs                 | 26 ++++++++++++++++++++++++++
 2 files changed, 45 insertions(+), 3 deletions(-)

diff --git a/board/freescale/mx28evk/README b/board/freescale/mx28evk/README
index 0389a1d..958ebc6 100644
--- a/board/freescale/mx28evk/README
+++ b/board/freescale/mx28evk/README
@@ -23,11 +23,19 @@ To boot MX28EVK from an SD card, set the boot mode DIP switches as:
    * VDD 5V: To the left (off)
    * Hold Button: Down (off)
 
+To boot MX28EVK from SPI NOR flash, set the boot mode DIP switches as:
+
+   * Boot Mode Select: 0 0 1 0 (Boot from SSP2)
+   * JTAG PSWITCH RESET: To the right (reset disabled)
+   * Battery Source: Down
+   * Wall 5V: Up
+   * VDD 5V: To the left (off)
+   * Hold Button: Down (off)
 
 Environment Storage
 -------------------
 
-There are two targets for mx28evk:
+There are three targets for mx28evk:
 
 "make mx28evk_config"		- store environment variables into MMC
 
@@ -35,12 +43,20 @@ or
 
 "make mx28evk_nand_config"	- store environment variables into NAND flash
 
+or
+
+"make mx28evk_spi_config"       - store enviroment variables into SPI NOR flash
+
 Choose the target accordingly.
 
 Note: The mx28evk board does not come with a NAND flash populated from the
 factory. It comes with an empty slot (U23), which allows the insertion of a
 48-pin TSOP flash device.
 
-Follow the instructions from doc/README.mxs to generate a bootable SD card.
+mx28evk does not come with SPI NOR flash populated from the factory either.
+It is possible to solder a SOIC memory on U49 or use a DIP8 on J89.
+To get SPI communication to work R320, R321,R322 and C178 need to be populated.
+Look in the schematics for the proper component values.
 
-Insert the SD card in slot 0, power up the board and U-boot will boot.
+Follow the instructions from doc/README.mxs to generate a bootable SD card or
+to generate a binary to be flashed into SPI NOR.
diff --git a/doc/README.mxs b/doc/README.mxs
index 0235a5a..ed2e568 100644
--- a/doc/README.mxs
+++ b/doc/README.mxs
@@ -23,6 +23,7 @@ Contents
 2) Compiling U-Boot for a MXS based board
 3) Installation of U-Boot for a MXS based board to SD card
 4) Installation of U-Boot into NAND flash on a MX28 based board
+5) Installation of U-boot into SPI NOR flash on a MX28 based board
 
 1) Prerequisites
 ----------------
@@ -262,3 +263,28 @@ There are two possibilities when preparing an image writable to NAND flash.
 	   In case the user needs to boot a firmware image bigger than 1Mb, the
 	   user has to adjust the "update_nand_firmware_maxsz" variable for the
 	   update scripts to work properly.
+
+5) Installation of U-Boot into SPI NOR flash on a MX28 based board
+------------------------------------------------------------------
+
+The u-boot.sb file can be directly written to SPI NOR from U-boot prompt.
+
+Load u-boot.sb into RAM, this can be done in several ways and one way is to use
+tftp:
+       => tftp u-boot.sb 0x42000000
+
+Probe the SPI NOR flash:
+       => sf probe
+
+(SPI NOR should be succesfully detected in this step)
+
+Erase the blocks where U-boot binary will be written to:
+       => sf erase 0x0 0x80000
+
+Write u-boot.sb to SPI NOR:
+       => sf write 0x42000000 0 0x80000
+
+Power off the board and set the boot mode DIP switches to boot from the SPI NOR
+according to MX28 manual section 12.2.1 (Table 12-2)
+
+Last step is to power up the board and U-boot should start from SPI NOR.
-- 
1.8.3.2

  parent reply	other threads:[~2014-05-08 23:35 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-05-08 23:35 [U-Boot] [PATCH v2 1/3] mx28evk: Remove extra CONFIG_ENV_SIZE Fabio Estevam
2014-05-08 23:35 ` [U-Boot] [PATCH v2 2/3] mx28evk: Add a target for SPI NOR boot Fabio Estevam
2014-05-08 23:35 ` Fabio Estevam [this message]
2014-05-19 13:06   ` [U-Boot] [PATCH v2 3/3] mx28evk: Add documentation on how to boot from SPI NOR Fabio Estevam
2014-05-28 15:30 ` [U-Boot] [PATCH v2 1/3] mx28evk: Remove extra CONFIG_ENV_SIZE Stefano Babic
2014-05-28 15:34 ` Stefano Babic

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=1399592136-24497-3-git-send-email-festevam@gmail.com \
    --to=festevam@gmail.com \
    --cc=u-boot@lists.denx.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