Download Enabling SD Interface on P1010 Reference Design Board
Transcript
Freescale Semiconductor Application Note Document Number: AN4336 Rev. 0, 07/2011 Enabling SD Interface on P1010 Reference Design Board by Networking and Multimedia Group Freescale Semiconductor, Inc. Austin, TX This document explains how to enable SD interface in u-boot and Linux on P1010 reference design board (RDB). This document is prepared with respect to the following hardware and software versions (see backside of the board for the revision number): • Hardware: P1010RDB pilot board (Assembly revision: 700-26374 Rev C) • Software: QorIQ SDK 1.0.1 © 2011 Freescale Semiconductor, Inc. All rights reserved. 1. 2. 3. 4. Contents Signal Multiplexing . . . . . . . . . . . . . . . . . . . . . . . . . . Implementing Mux Strategy . . . . . . . . . . . . . . . . . . . . Enabling SD Interface . . . . . . . . . . . . . . . . . . . . . . . . . Revision History . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2 2 3 5 Signal Multiplexing 1 Signal Multiplexing This table lists the P1010 signal multiplexing among IFC, SD, and USB-ULPI interfaces. Table 1. P1010 Signal Multiplexing Pin Number Function 1 Function 2 Function 3 Function 4 W23 IFC_ADDR[16] SDHC_CLK USB_CLK IFC_CS[2] W21 IFC_ADDR[17] SDHC_CMD USB_D[0] DMA_DREQ[1] Y23 IFC_ADDR[18] SDHC_DAT[0] USB_D[1] DMA_DACK[1] Y22 IFC_ADDR[19] SDHC_DAT[1] USB_D[2] DMA_DDONE[1] AA23 IFC_ADDR[20] SDHC_DAT[2] USB_D[3] — Y21 IFC_ADDR[21] SDHC_DAT[3] USB_D[4] — AB23 IFC_ADDR[22] SDHC_WP USB_D[5] — AA22 IFC_ADDR[23] SDHC_CD USB_D[6] — AC23 IFC_ADDR[24] — USB_D[7] — For more information, see P1010 QorIQ Integrated Processor Hardware Specifications. 2 Implementing Mux Strategy In QorIQ SDK 1.0.1, the mux strategy for P1010RDB is static by nature. The interfaces are decided at the time of power on reset (POR) depending upon the reset configuration, which means primarily the POR signals that the device samples at the time of reset. The same interfaces remain available in u-boot and Linux. The above strategy has been implemented primarily for the boot interfaces (bus interfaces), such as SD, IFC, and USB-ULPI. For other interfaces that are multiplexed on P1010RDB, such as TDM/CAN and SPI CS0 can be configured through hwconfig through CPLD register writes. This table describes the QorIQ SDK 1.0.1 muxing. Table 2. SDK 1.0.1 Muxing Switch Selection Interfaces Available in u-boot and Linux Boot location through SW41 Bus selection through SW61 SD USB-ULPI IFC-NOR IFC-NAND IFC-CPLD SPI Flash TDM & CAN SPI-SLIC NAND Flash IFC-CS0 on NAND Flash No No Yes Yes Yes Conf2 Conf Conf NOR Flash IFC-CS0 on NOR Flash No No Yes Yes Yes Conf Conf Conf Enabling SD Interface on P1010 Reference Design Board, Rev. 0 2 Freescale Semiconductor Enabling SD Interface Table 2. SDK 1.0.1 Muxing (continued) Switch Selection SPI Flash Interfaces Available in u-boot and Linux IFC-CS0 on NAND Flash No No Yes Yes Yes Yes No Conf Notes: 1. Refer to P1010RDB user’s manual for the details of SW4 and SW6. Look for P1010RDB pilot board information. 2. Conf refers to “configurable” through hwconfig in u-boot. For more information, see P1010RDB Board Bring-up Guide. The SD interface and USB-ULPI are not available in any of the boot scenarios. The SD interface is the cause of concern as USB-ULPI is a redundant interface on P1010RDB because of the UTMI availability. The SD interface can be made available in SPI boot as the IFC or SD bus can be enabled here. By default, IFC is enabled in QorIQ SDK 1.0.1 (see Table 2). This table lists the updated muxing if the SD bus is enabled in SPI boot. Table 3. Updated Muxing on P1010RDB POR Config Selected through Switches Interfaces Available in U-Boot and Linux Boot location through SW4 Bus selection through SW6 SD USB-ULPI IFC-NOR IFC-NAND IFC-CPLD SPI Flash TDM and SPI-SLIC CAN NAND Flash IFC-CS0 on NAND Flash No No Yes Yes Yes Conf Conf Conf NOR Flash IFC-CS0 on NOR Flash No No Yes Yes Yes Conf Conf Conf SPI Flash SD Yes No No No No Yes No No NOTE As CPLD is not available in SPI boot in revised mux strategy, the TDM, SPI SLIC, and CAN are also not available in case of SPI boot. 3 Enabling SD Interface To enable SD interface in SPI boot on P1010RDB: 1. Perform the following updates in u-boot a) Modify pmuxcr to enable SD bus in case of SPI boot b) Update the corresponding static mux implementation in u-boot 2. Perform the following updates in Linux a) Disable IFC from device tree and kernel defconfig Enabling SD Interface on P1010 Reference Design Board, Rev. 0 Freescale Semiconductor 3 Enabling SD Interface The patch details to enable SD interface are given below. A zip file, AN4336SW.zip, containing the patches for u-boot and Linux accompanies this application note. The file can be downloaded from www.freescale.com. 3.1 U-Boot 1. Extract the u-boot code from the QorIQ SDK 1.0.1 iso 2. Apply the patch, u-boot-p1010rdb-enabling-sd-in-spi-boot.patch 3. Compile the u-boot using "make" command for SPI Flash #make ARCH=powerpc CROSS_COMPILE=/opt/freescale/usr/local/gcc-4.5.55-eglibc-2.11.55/p owerpc-linux-gnu/bin/powerpc-linux-gnu- P1010RDB_SPIFLASH 4. Use the boot_format utility to generate the spiimage. For more information, see SDK manual. 5. Update the SPI Flash with the above built spiimage 3.2 Linux 1. Extract the Linux source code from QorIQ SDK 1.0.1 iso 2. Apply the patch, linux-p1010rdb-enabling-sd-in-spi-boot.patch 3. Compile Linux using make command #make ARCH=powerpc CROSS_COMPILE=/opt/freescale/usr/local/gcc-4.5.55-eglibc-2.11.55/p owerpc-linux-gnu/bin/powerpc-linux-gnuarch/powerpc/configs/qoriq_sdk_nonsmp_defconfig #make ARCH=powerpc CROSS_COMPILE=/opt/freescale/usr/local/gcc-4.5.55-eglibc-2.11.55/p owerpc-linux-gnu/bin/powerpc-linux-gnu- 4. Compile the dts ./sripts/dtc/dtc -f -I dts -O dtb -R 8 -S 0x3000 arc/powerpc/boot/dts/p1010rdb.dts.dts > p1010rdb.dtb.dtb 5. With the updated SPI bootloader, Linux uImage and p1010rdb.dtb, the user must be able to enable SD interface on P1010RDB. • • NOTE The above-mentioned changes must be done only when the user specifically requires the SD interface using SPI boot. For all other boot methods, these patches must not be used. Enabling SD Interface on P1010 Reference Design Board, Rev. 0 4 Freescale Semiconductor Revision History 4 Revision History This table provides a revision history for this document. Table 4. Document Revision History Rev. Number Date 0 07/2011 Substantive Change(s) Initial Public Release. Enabling SD Interface on P1010 Reference Design Board, Rev. 0 Freescale Semiconductor 5 How to Reach Us: Home Page: www.freescale.com Web Support: http://www.freescale.com/support USA/Europe or Locations Not Listed: Freescale Semiconductor, Inc. Technical Information Center, EL516 2100 East Elliot Road Tempe, Arizona 85284 1-800-521-6274 or +1-480-768-2130 www.freescale.com/support Europe, Middle East, and Africa: Freescale Halbleiter Deutschland GmbH Technical Information Center Schatzbogen 7 81829 Muenchen, Germany +44 1296 380 456 (English) +46 8 52200080 (English) +49 89 92103 559 (German) +33 1 69 35 48 48 (French) www.freescale.com/support Information in this document is provided solely to enable system and software implementers to use Freescale Semiconductor products. There are no express or implied copyright licenses granted hereunder to design or fabricate any integrated circuits or integrated circuits based on the information in this document. Freescale Semiconductor reserves the right to make changes without further notice to any products herein. Freescale Semiconductor makes no warranty, representation or guarantee regarding the suitability of its products for any particular purpose, nor does Freescale Semiconductor assume any liability arising out of the application or use of any product or circuit, and specifically disclaims any and all liability, including without limitation consequential or incidental damages. “Typical” parameters which may be provided in Freescale Semiconductor data sheets and/or specifications can and do vary in different applications and actual performance may vary over time. All operating parameters, including “Typicals” must be validated for each customer application by customer’s technical experts. Freescale Semiconductor does not convey any license Japan: Freescale Semiconductor Japan Ltd. Headquarters ARCO Tower 15F 1-8-1, Shimo-Meguro, Meguro-ku Tokyo 153-0064 Japan 0120 191014 or +81 3 5437 9125 [email protected] under its patent rights nor the rights of others. Freescale Semiconductor products are Asia/Pacific: Freescale Semiconductor China Ltd. Exchange Building 23F No. 118 Jianguo Road Chaoyang District Beijing 100022 China +86 10 5879 8000 [email protected] claims, costs, damages, and expenses, and reasonable attorney fees arising out of, For Literature Requests Only: Freescale Semiconductor Literature Distribution Center 1-800 441-2447 or +1-303-675-2140 Fax: +1-303-675-2150 LDCForFreescaleSemiconductor @hibbertgroup.com Document Number: AN4336 Rev. 0 07/2011 not designed, intended, or authorized for use as components in systems intended for surgical implant into the body, or other applications intended to support or sustain life, or for any other application in which the failure of the Freescale Semiconductor product could create a situation where personal injury or death may occur. Should Buyer purchase or use Freescale Semiconductor products for any such unintended or unauthorized application, Buyer shall indemnify and hold Freescale Semiconductor and its officers, employees, subsidiaries, affiliates, and distributors harmless against all directly or indirectly, any claim of personal injury or death associated with such unintended or unauthorized use, even if such claim alleges that Freescale Semiconductor was negligent regarding the design or manufacture of the part. Freescale, the Freescale logo, CodeWarrior, ColdFire, PowerQUICC, QorIQ, StarCore, and Symphony are trademarks of Freescale Semiconductor, Inc., Reg. U.S. Pat. & Tm. Off. CoreNet, QorIQ Qonverge, QUICC Engine, and VortiQa are trademarks of Freescale Semiconductor, Inc. All other product or service names are the property of their respective owners. The Power Architecture and Power.org word marks and the Power and Power.org logos and related marks are trademarks and service marks licensed by Power.org. © 2011 Freescale Semiconductor, Inc.