From patchwork Tue Jun 10 03:03:59 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Fabio Estevam X-Patchwork-Id: 357709 X-Patchwork-Delegate: sbabic@denx.de Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from theia.denx.de (theia.denx.de [85.214.87.163]) by ozlabs.org (Postfix) with ESMTP id 5D96014008D for ; Tue, 10 Jun 2014 13:05:30 +1000 (EST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 431CE4A046; Tue, 10 Jun 2014 05:05:22 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at theia.denx.de Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id jeBEqeACPNmH; Tue, 10 Jun 2014 05:05:22 +0200 (CEST) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 429614A047; Tue, 10 Jun 2014 05:05:08 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 722164A033 for ; Tue, 10 Jun 2014 05:05:00 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at theia.denx.de Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 0jT0FyjQ1FrR for ; Tue, 10 Jun 2014 05:04:56 +0200 (CEST) X-policyd-weight: NOT_IN_SBL_XBL_SPAMHAUS=-1.5 NOT_IN_SPAMCOP=-1.5 NOT_IN_BL_NJABL=-1.5 (only DNSBL check requested) Received: from mail-yk0-f173.google.com (mail-yk0-f173.google.com [209.85.160.173]) by theia.denx.de (Postfix) with ESMTPS id 5053E4A032 for ; Tue, 10 Jun 2014 05:04:52 +0200 (CEST) Received: by mail-yk0-f173.google.com with SMTP id 142so3173505ykq.4 for ; Mon, 09 Jun 2014 20:04:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-type:content-transfer-encoding; bh=TrvlcintYwq1WMDxYTQLarXTl7svShlM3D8ng6Nhy40=; b=O1cEQR8lnz9fqrbTXMJwIP7M8Z7o2XD7F3UWuNTvpWtAUNdYfbJpKcAZ+o/TKO7WC7 xw/w4MN4H3qSmKVtRt7UltAQ17e2+47I17K6pmNDn7LnnIzqLx0L8/krEL2akm44ymUA ajk5bFunalp+OAyEtlBaAsEk+U2iGJVluOtndBV4w/xculbzwi20NlP6sFpXXL56ijRd 2tJEsT50LUJ+dnS0onJQdtdcTMj4CD5HFM54FN6M2jcmBEbogC67J4EbprDaArMv6kdc nQrMujEc0wNjhbDQJFBNkl3siAs49y4s7JzQO7VXZeE3KtsVAi/MtvFPwxWQQXb8iG22 rjxw== X-Received: by 10.236.15.102 with SMTP id e66mr19051206yhe.69.1402369491291; Mon, 09 Jun 2014 20:04:51 -0700 (PDT) Received: from localhost.localdomain ([201.82.193.130]) by mx.google.com with ESMTPSA id z63sm28522404yhh.11.2014.06.09.20.04.48 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 09 Jun 2014 20:04:50 -0700 (PDT) From: Fabio Estevam To: sbabic@denx.de Date: Tue, 10 Jun 2014 00:03:59 -0300 Message-Id: <1402369439-24102-3-git-send-email-festevam@gmail.com> X-Mailer: git-send-email 1.8.3.2 In-Reply-To: <1402369439-24102-1-git-send-email-festevam@gmail.com> References: <1402369439-24102-1-git-send-email-festevam@gmail.com> MIME-Version: 1.0 Cc: Fabio Estevam , u-boot@lists.denx.de, =?UTF-8?q?M=C3=A5rten=20Wikman?= Subject: [U-Boot] [PATCH v3 3/3] mx28evk: Add documentation on how to boot from SPI NOR X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.11 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: u-boot-bounces@lists.denx.de Errors-To: u-boot-bounces@lists.denx.de From: Fabio Estevam 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 Signed-off-by: Fabio Estevam --- Changes since v2: - None 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.