ENT-AN1144-4.00 Application Note SPI Flash Design for Vcore-III
Total Page:16
File Type:pdf, Size:1020Kb
ENT-AN1144-4.00 Application Note SPI Flash Design for VCore-III Microsemi makes no warranty, representation, or guarantee regarding the information contained herein or the suitability of its products and services for any particular purpose, nor does Microsemi assume any liability whatsoever arising out of the application or use of any product or circuit. The products sold hereunder and any other products sold by Microsemi have been subject to limited testing and should not be used in conjunction with mission-critical equipment or applications. Any performance specifications are believed to be reliable but are not verified, and Buyer must conduct and complete all performance and other testing of the products, alone and together with, or installed in, any end-products. Buyer shall not Microsemi Corporate Headquarters rely on any data and performance specifications or parameters provided by Microsemi. It is the Buyer's responsibility to One Enterprise, Aliso Viejo, independently determine suitability of any products and to test and verify the same. The information provided by Microsemi CA 92656 USA hereunder is provided “as is, where is” and with all faults, and the entire risk associated with such information is entirely Within the USA: +1 (800) 713-4113 with the Buyer. Microsemi does not grant, explicitly or implicitly, to any party any patent rights, licenses, or any other IP Outside the USA: +1 (949) 380-6100 rights, whether with regard to such information itself or anything described by such information. Information provided in this Fax: +1 (949) 215-4996 document is proprietary to Microsemi, and Microsemi reserves the right to make any changes to the information in this Email: [email protected] document or to any products and services at any time without notice. www.microsemi.com About Microsemi © 2019 Microsemi Corporation. All Microsemi Corporation (Nasdaq: MSCC) offers a comprehensive portfolio of semiconductor and system solutions for aerospace & defense, communications, data center and industrial markets. Products include high-performance and rights reserved. Microsemi and the radiation-hardened analog mixed-signal integrated circuits, FPGAs, SoCs and ASICs; power management products; Microsemi logo are trademarks of timing and synchronization devices and precise time solutions, setting the world's standard for time; voice processing Microsemi Corporation. All other devices; RF solutions; discrete components; enterprise storage and communication solutions, security technologies and trademarks and service marks are the scalable anti-tamper products; Ethernet solutions; Power-over-Ethernet ICs and midspans; as well as custom design property of their respective owners. capabilities and services. Microsemi is headquartered in Aliso Viejo, California, and has approximately 4,800 employees globally. Learn more at www.microsemi.com. VPPD-04306. 1.0 8/19 Contents 1 Revision History . 1 1.1 Revision 1.0 . 1 2 Flash Design for VCore-III . 2 2.1 Hardware Design . 2 2.1.1 Flash Support . 2 2.2 Flash Programming . 2 2.2.1 Installing Software from Scratch: How to Flash a Board . 3 2.2.2 Upgrading Software from Within an Existing Installation . 3 2.2.3 Updating an Existing Board with New RedBoot (CLI) . 3 2.3 Flash Layout . 3 2.3.1 Flash Layout (32 MB) . 4 2.3.2 Flash Layout (16 MB) . 4 2.4 Creating a Flash Image . 4 2.5 Flash Size Recommendations . 6 VPPD-04306 ENT-AN1144-4.00 Application Note Revision 1.0 iii Tables Table 1 Flash Layout Detail (32 MB) . 4 Table 2 Flash Layout Detail (16 MB) . 4 Table 3 Recommended Flash Size . 6 VPPD-04306 ENT-AN1144-4.00 Application Note Revision 1.0 iv Revision History 1 Revision History The revision history describes the changes that were implemented in the document. The changes are listed by revision, starting with the most current publication. 1.1 Revision 1.0 Revision 1.0 was the first publication of this document. VPPD-04306 ENT-AN1144-4.00 Application Note Revision 1.0 1 Flash Design for VCore-III 2 Flash Design for VCore-III This document provides guidelines for designing the SPI NOR flash and NAND flash on a Microsemi Enterprise or Carrier Ethernet switch. It includes hardware design and RedBoot bootloader update guidelines and is relevant for all VCore-III based Ethernet switches. 2.1 Hardware Design The Vcore-III CPU boots from the Serial Interface (SI) and Serial Peripheral Interface (SPI). Initially the CPU uses 24-bit addressing for accessing 16 MB of data, but it can access a larger data area using 32-bit addressing after initial boot. Accessing the SPI NOR flash in 32-bit addressing mode is done under full CPU control (bit-banging). To make sure the SPI NOR flash is brought back to 24-bit addressing mode after a reset, the flash reset should be connected to the switch reset signal through a resistor. For SPI flash programming, a pin header can be used for connecting a flash programmer. The switch reset signal needs to be held low for tri-stating the switch and allowing the flash programmer control of the SPI signals. In this case, the flash reset should not be active. For chip selecting the SPI NOR flash, SI_nEN is used. To extend the total flash memory, NAND flash can be added. NANAD flash are available with both parallel and SPI interface. See the actual reference design for detailed design. Note: NAND flash is only supported under Linux OS, and not by the RedBoot bootloader. 2.1.1 Flash Support The bootloader (and eCos OS) supports m25p80 compatible SPI NOR flash and automatically detects the flash sector size and numbers of sectors through jedec id. A list of supported SPI NOR flash types is found at: ecos/packages/devs/flash/spi/m25pxx/current/src/m25pxx.c The Macronix NAND flash driver SPI NAND MX35LF2GE4AB is included in the Linux kernel. The procedures in this document describe the single-chip flash designs. Designs using multiple flash chips are possible, but outside the scope of this document. Adding a new NOR flash type to RedBoot is done by adding the jedec_id/sector_size/sector_count information into ecos/packages/devs/flash/spi/m25pxx/current/src/m25pxx.c Note: Both application code and bootloader need to be recompiled if NOR flash type is updated of added. 2.2 Flash Programming To support the WebStaX software package family, the NOR must be initialized with the following components. • Bootloader (RedBoot) • Configuration sections • Main eCos-based WebStaX image (dual images for fails-safe firmware upgrade) • RedBoot flash partition info (FIS) The process of initializing the NOR for operating the WebStaX software involves using a SPI NOR programmer with flash images created for the desired switch target system. The flash images are generated as described in Creating a Flash Image, page 4. VPPD-04306 ENT-AN1144-4.00 Application Note Revision 1.0 2 Flash Design for VCore-III 2.2.1 Installing Software from Scratch: How to Flash a Board The procedure for installing the software from scratch on a new board involves using a SPI programmer. For more information about the requirements and the procedure, see the AN1184 application note. Although the application note is part of the Linux documentation, the information applies to eCos as well. 2.2.2 Upgrading Software from Within an Existing Installation If the system is already capable of booting and network connectivity, the Web GUI or CLI can be used to update the main application. To update the main application: log in and click Maintenance > Software > Upload, and upgrade using the eCos.dat firmware image. Use the firmware upgrade CLI command to upload the.dat firmware image. A TFTP or HTTP URL might be used to point the network location of the image. The CLI can be accesses by RS232 or SSH. 2.2.3 Updating an Existing Board with New RedBoot (CLI) To update an existing board using CLI, perform the following steps: 1. Ensure that the RedBoot image is available on a TFTP/FTP/HTTP server. 2. Ensure the necessary network connections and IP configuration to create connectivity to the TFTP/FTP/HTTP server. 3. Establish a CLI session on the system to be updated. 4. Enter the debug command enabler: platform debug allow. 5. Execute the debug firmware bootloader <url> CLI command to perform the update. 6. After the update succeeds, restart the device. 7. Identify the new bootloader by the boot banner on the RS232 console. 2.3 Flash Layout Flash is used with the RedBoot flash image system (FIS) and the layout is as shown in Table 1, page 4, Table 2, page 4, and Table 3, page 6. In RedBoot, use the fis list command to display the flash layout. The first area is the RedBoot bootloader, which takes up 32 KB. The next area is the conf used to store board-specific information, such as the MAC address and board ID. Use the following CLI commands to display board data. #platform debug allow #debug board MAC Address: 00-01-c1-00-b6-e0 Board ID: 75 Board Type Conf: 0 Board Type Active: Serval (11) Note: The debug command for older releases is in the vcli. Type debug vcl debug board. • Stackconf contains the switch configuration. • Syslog is the persistent system log that logs system events like port link-up or -down. • Crashfile contains the information stored after a software crash. For dual images (managed and managed.bk), 6 MB is allocated in a 16-MB flash layout and 12 MB is allocated in a 32-MB flash layout. The Diag area is used to store manufacturing diagnostic data. RedBoot reserves some partition names for internal use; namely: RedBoot, Redundant FIS, and FIS directory.