1*4882a593SmuzhiyunFreescale MCF52277EVB ColdFire Development Board 2*4882a593Smuzhiyun================================================ 3*4882a593Smuzhiyun 4*4882a593SmuzhiyunTsiChung Liew(Tsi-Chung.Liew@freescale.com) 5*4882a593SmuzhiyunCreated Jan 8, 2008 6*4882a593Smuzhiyun=========================================== 7*4882a593Smuzhiyun 8*4882a593Smuzhiyun 9*4882a593SmuzhiyunChanged files: 10*4882a593Smuzhiyun============== 11*4882a593Smuzhiyun 12*4882a593Smuzhiyun- board/freescale/m52277evb/m52277evb.c Dram setup 13*4882a593Smuzhiyun- board/freescale/m52277evb/Makefile Makefile 14*4882a593Smuzhiyun- board/freescale/m52277evb/config.mk config make 15*4882a593Smuzhiyun- board/freescale/m52277evb/u-boot.lds Linker description 16*4882a593Smuzhiyun 17*4882a593Smuzhiyun- arch/m68k/cpu/mcf5227x/cpu.c cpu specific code 18*4882a593Smuzhiyun- arch/m68k/cpu/mcf5227x/cpu_init.c FBCS, Mux pins, icache and RTC extra regs 19*4882a593Smuzhiyun- arch/m68k/cpu/mcf5227x/interrupts.c cpu specific interrupt support 20*4882a593Smuzhiyun- arch/m68k/cpu/mcf5227x/speed.c system, flexbus, and cpu clock 21*4882a593Smuzhiyun- arch/m68k/cpu/mcf5227x/Makefile Makefile 22*4882a593Smuzhiyun- arch/m68k/cpu/mcf5227x/config.mk config make 23*4882a593Smuzhiyun- arch/m68k/cpu/mcf5227x/start.S start up assembly code 24*4882a593Smuzhiyun 25*4882a593Smuzhiyun- doc/README.m52277evb This readme file 26*4882a593Smuzhiyun 27*4882a593Smuzhiyun- drivers/serial/mcfuart.c ColdFire common UART driver 28*4882a593Smuzhiyun- drivers/rtc/mcfrtc.c Realtime clock Driver 29*4882a593Smuzhiyun 30*4882a593Smuzhiyun- include/asm-m68k/bitops.h Bit operation function export 31*4882a593Smuzhiyun- include/asm-m68k/byteorder.h Byte order functions 32*4882a593Smuzhiyun- include/asm-m68k/crossbar.h CrossBar structure and definition 33*4882a593Smuzhiyun- include/asm-m68k/dspi.h DSPI structure and definition 34*4882a593Smuzhiyun- include/asm-m68k/edma.h eDMA structure and definition 35*4882a593Smuzhiyun- include/asm-m68k/flexbus.h FlexBus structure and definition 36*4882a593Smuzhiyun- include/asm-m68k/fsl_i2c.h I2C structure and definition 37*4882a593Smuzhiyun- include/asm-m68k/global_data.h Global data structure 38*4882a593Smuzhiyun- include/asm-m68k/immap.h ColdFire specific header file and driver macros 39*4882a593Smuzhiyun- include/asm-m68k/immap_5227x.h mcf5227x specific header file 40*4882a593Smuzhiyun- include/asm-m68k/io.h io functions 41*4882a593Smuzhiyun- include/asm-m68k/lcd.h LCD structure and definition 42*4882a593Smuzhiyun- include/asm-m68k/m5227x.h mcf5227x specific header file 43*4882a593Smuzhiyun- include/asm-m68k/posix_types.h Posix 44*4882a593Smuzhiyun- include/asm-m68k/processor.h header file 45*4882a593Smuzhiyun- include/asm-m68k/ptrace.h Exception structure 46*4882a593Smuzhiyun- include/asm-m68k/rtc.h Realtime clock header file 47*4882a593Smuzhiyun- include/asm-m68k/ssi.h SSI structure and definition 48*4882a593Smuzhiyun- include/asm-m68k/string.h String function export 49*4882a593Smuzhiyun- include/asm-m68k/timer.h Timer structure and definition 50*4882a593Smuzhiyun- include/asm-m68k/types.h Data types definition 51*4882a593Smuzhiyun- include/asm-m68k/uart.h Uart structure and definition 52*4882a593Smuzhiyun- include/asm-m68k/u-boot.h U-Boot structure 53*4882a593Smuzhiyun 54*4882a593Smuzhiyun- include/configs/M52277EVB.h Board specific configuration file 55*4882a593Smuzhiyun 56*4882a593Smuzhiyun- arch/m68k/lib/board.c board init function 57*4882a593Smuzhiyun- arch/m68k/lib/cache.c 58*4882a593Smuzhiyun- arch/m68k/lib/interrupts Coldfire common interrupt functions 59*4882a593Smuzhiyun- arch/m68k/lib/m68k_linux.c 60*4882a593Smuzhiyun- arch/m68k/lib/time.c Timer functions (Dma timer and PIT) 61*4882a593Smuzhiyun- arch/m68k/lib/traps.c Exception init code 62*4882a593Smuzhiyun 63*4882a593Smuzhiyun1 MCF52277 specific Options/Settings 64*4882a593Smuzhiyun==================================== 65*4882a593Smuzhiyun1.1 pre-loader is no longer suppoer in this coldfire family 66*4882a593Smuzhiyun 67*4882a593Smuzhiyun1.2 Configuration settings for M52277EVB Development Board 68*4882a593SmuzhiyunCONFIG_MCF5227x -- define for all MCF5227x CPUs 69*4882a593SmuzhiyunCONFIG_M52277 -- define for all Freescale MCF52277 CPUs 70*4882a593SmuzhiyunCONFIG_M52277EVB -- define for M52277EVB board 71*4882a593Smuzhiyun 72*4882a593SmuzhiyunCONFIG_MCFUART -- define to use common CF Uart driver 73*4882a593SmuzhiyunCONFIG_SYS_UART_PORT -- define UART port number, start with 0, 1 and 2 74*4882a593SmuzhiyunCONFIG_BAUDRATE -- define UART baudrate 75*4882a593Smuzhiyun 76*4882a593SmuzhiyunCONFIG_MCFRTC -- define to use common CF RTC driver 77*4882a593SmuzhiyunCONFIG_SYS_MCFRTC_BASE -- provide base address for RTC in immap.h 78*4882a593SmuzhiyunCONFIG_SYS_RTC_OSCILLATOR -- define RTC clock frequency 79*4882a593SmuzhiyunRTC_DEBUG -- define to show RTC debug message 80*4882a593SmuzhiyunCONFIG_CMD_DATE -- enable to use date feature in U-Boot 81*4882a593Smuzhiyun 82*4882a593SmuzhiyunCONFIG_MCFTMR -- define to use DMA timer 83*4882a593SmuzhiyunCONFIG_MCFPIT -- define to use PIT timer 84*4882a593Smuzhiyun 85*4882a593SmuzhiyunCONFIG_SYS_I2C_FSL -- define to use FSL common I2C driver 86*4882a593SmuzhiyunCONFIG_SYS_I2C_SOFT -- define for I2C bit-banged 87*4882a593SmuzhiyunCONFIG_SYS_I2C_SPEED -- define for I2C speed 88*4882a593SmuzhiyunCONFIG_SYS_I2C_SLAVE -- define for I2C slave address 89*4882a593SmuzhiyunCONFIG_SYS_I2C_OFFSET -- define for I2C base address offset 90*4882a593SmuzhiyunCONFIG_SYS_IMMR -- define for MBAR offset 91*4882a593Smuzhiyun 92*4882a593SmuzhiyunCONFIG_SYS_MBAR -- define MBAR offset 93*4882a593Smuzhiyun 94*4882a593SmuzhiyunCONFIG_MONITOR_IS_IN_RAM -- Not support 95*4882a593Smuzhiyun 96*4882a593SmuzhiyunCONFIG_SYS_INIT_RAM_ADDR -- defines the base address of the MCF52277 internal SRAM 97*4882a593Smuzhiyun 98*4882a593SmuzhiyunCONFIG_SYS_CSn_BASE -- defines the Chip Select Base register 99*4882a593SmuzhiyunCONFIG_SYS_CSn_MASK -- defines the Chip Select Mask register 100*4882a593SmuzhiyunCONFIG_SYS_CSn_CTRL -- defines the Chip Select Control register 101*4882a593Smuzhiyun 102*4882a593SmuzhiyunCONFIG_SYS_SDRAM_BASE -- defines the DRAM Base 103*4882a593Smuzhiyun 104*4882a593SmuzhiyunCONFIG_LCD and CONFIG_CMD_USB are not supported in this current U-Boot, 105*4882a593Smuzhiyunupdate will be provided at later time 106*4882a593Smuzhiyun 107*4882a593Smuzhiyun2. MEMORY MAP UNDER U-BOOT AND LINUX KERNEL 108*4882a593Smuzhiyun=========================================== 109*4882a593Smuzhiyun2.1. System memory map: 110*4882a593Smuzhiyun Flash: 0x00000000-0x3FFFFFFF (1024MB) 111*4882a593Smuzhiyun DDR: 0x40000000-0x7FFFFFFF (1024MB) 112*4882a593Smuzhiyun SRAM: 0x80000000-0x8FFFFFFF (256MB) 113*4882a593Smuzhiyun IP: 0xF0000000-0xFFFFFFFF (256MB) 114*4882a593Smuzhiyun 115*4882a593Smuzhiyun2.2. For the initial bringup, we adopted a consistent memory scheme between U-Boot and 116*4882a593Smuzhiyun linux kernel, you can customize it based on your system requirements: 117*4882a593Smuzhiyun Flash0: 0x00000000-0x00FFFFFF (16MB) 118*4882a593Smuzhiyun 119*4882a593Smuzhiyun DDR: 0x40000000-0x4FFFFFFF (64MB) 120*4882a593Smuzhiyun SRAM: 0x80000000-0x80007FFF (32KB) 121*4882a593Smuzhiyun IP: 0xFC000000-0xFC0FFFFF (64KB) 122*4882a593Smuzhiyun 123*4882a593Smuzhiyun3. COMPILATION 124*4882a593Smuzhiyun============== 125*4882a593Smuzhiyun3.1 To create U-Boot the gcc-4.1-xx compiler set (ColdFire ELF or 126*4882a593SmuzhiyunuClinux version) from codesourcery.com was used. Download it from: 127*4882a593Smuzhiyunhttp://www.codesourcery.com/gnu_toolchains/coldfire/download.html 128*4882a593Smuzhiyun 129*4882a593Smuzhiyun3.2 Compilation 130*4882a593Smuzhiyun export CROSS_COMPILE=cross-compile-prefix 131*4882a593Smuzhiyun cd u-boot-1.x.x 132*4882a593Smuzhiyun make distclean 133*4882a593Smuzhiyun make M52277EVB_config 134*4882a593Smuzhiyun make 135*4882a593Smuzhiyun 136*4882a593Smuzhiyun4. SCREEN DUMP 137*4882a593Smuzhiyun============== 138*4882a593Smuzhiyun4.1 M52277EVB Development board 139*4882a593Smuzhiyun (NOTE: May not show exactly the same) 140*4882a593Smuzhiyun 141*4882a593SmuzhiyunU-Boot 1.3.1 (Jan 8 2008 - 12:44:08) 142*4882a593Smuzhiyun 143*4882a593SmuzhiyunCPU: Freescale MCF52277 (Mask:6c Version:0) 144*4882a593Smuzhiyun CPU CLK 160 Mhz BUS CLK 80 Mhz FLB CLK 80 MHZ 145*4882a593Smuzhiyun INP CLK 16 Mhz VCO CLK 480 Mhz 146*4882a593SmuzhiyunBoard: Freescale 52277 EVB 147*4882a593SmuzhiyunI2C: ready 148*4882a593SmuzhiyunDRAM: 64 MB 149*4882a593SmuzhiyunFLASH: 16 MB 150*4882a593SmuzhiyunIn: serial 151*4882a593SmuzhiyunOut: serial 152*4882a593SmuzhiyunErr: serial 153*4882a593Smuzhiyun-> print 154*4882a593Smuzhiyunbaudrate=115200 155*4882a593Smuzhiyunhostname=M52277EVB 156*4882a593Smuzhiyuninpclk=16000000 157*4882a593Smuzhiyunloadaddr=(0x40000000 + 0x10000) 158*4882a593Smuzhiyunload=tftp ${loadaddr) ${u-boot} 159*4882a593Smuzhiyunupd=run load; run prog 160*4882a593Smuzhiyunprog=prot off 0 3ffff;era 0 3ffff;cp.b ${loadaddr} 0 ${filesize};save 161*4882a593Smuzhiyunu-boot=u-boot.bin 162*4882a593Smuzhiyunstdin=serial 163*4882a593Smuzhiyunstdout=serial 164*4882a593Smuzhiyunstderr=serial 165*4882a593Smuzhiyunmem=65024k 166*4882a593Smuzhiyun 167*4882a593SmuzhiyunEnvironment size: 280/32764 bytes 168*4882a593Smuzhiyun-> bdinfo 169*4882a593Smuzhiyunmemstart = 0x40000000 170*4882a593Smuzhiyunmemsize = 0x04000000 171*4882a593Smuzhiyunflashstart = 0x00000000 172*4882a593Smuzhiyunflashsize = 0x01000000 173*4882a593Smuzhiyunflashoffset = 0x00000000 174*4882a593Smuzhiyunsramstart = 0x80000000 175*4882a593Smuzhiyunsramsize = 0x00008000 176*4882a593Smuzhiyunmbar = 0xFC000000 177*4882a593Smuzhiyunbusfreq = 80 MHz 178*4882a593Smuzhiyunflbfreq = 80 Mhz 179*4882a593Smuzhiyuninpfreq = 16 Mhz 180*4882a593Smuzhiyunvcofreq = 480 Mhz 181*4882a593Smuzhiyun 182*4882a593Smuzhiyunbaudrate = 115200 bps 183*4882a593Smuzhiyun-> 184*4882a593Smuzhiyun-> help 185*4882a593Smuzhiyun? - alias for 'help' 186*4882a593Smuzhiyunbase - print or set address offset 187*4882a593Smuzhiyunbdinfo - print Board Info structure 188*4882a593Smuzhiyunboot - boot default, i.e., run 'bootcmd' 189*4882a593Smuzhiyunbootd - boot default, i.e., run 'bootcmd' 190*4882a593Smuzhiyunbootelf - Boot from an ELF image in memory 191*4882a593Smuzhiyunbootm - boot application image from memory 192*4882a593Smuzhiyunbootp - boot image via network using BootP/TFTP protocol 193*4882a593Smuzhiyunbootvx - Boot vxWorks from an ELF image 194*4882a593Smuzhiyuncmp - memory compare 195*4882a593Smuzhiyunconinfo - print console devices and information 196*4882a593Smuzhiyuncp - memory copy 197*4882a593Smuzhiyuncrc32 - checksum calculation 198*4882a593Smuzhiyundate - get/set/reset date & time 199*4882a593Smuzhiyundcache - enable or disable data cache 200*4882a593Smuzhiyunecho - echo args to console 201*4882a593Smuzhiyunerase - erase FLASH memory 202*4882a593Smuzhiyunflinfo - print FLASH memory information 203*4882a593Smuzhiyungo - start application at address 'addr' 204*4882a593Smuzhiyunhelp - print online help 205*4882a593Smuzhiyuni2c - I2C sub-system 206*4882a593Smuzhiyunicache - enable or disable instruction cache 207*4882a593Smuzhiyuniminfo - print header information for application image 208*4882a593Smuzhiyunimls - list all images found in flash 209*4882a593Smuzhiyunitest - return true/false on integer compare 210*4882a593Smuzhiyunloadb - load binary file over serial line (kermit mode) 211*4882a593Smuzhiyunloads - load S-Record file over serial line 212*4882a593Smuzhiyunloady - load binary file over serial line (ymodem mode) 213*4882a593Smuzhiyunloop - infinite loop on address range 214*4882a593Smuzhiyunls - list files in a directory (default /) 215*4882a593Smuzhiyunmd - memory display 216*4882a593Smuzhiyunmm - memory modify (auto-incrementing) 217*4882a593Smuzhiyunmtest - simple RAM test 218*4882a593Smuzhiyunmw - memory write (fill) 219*4882a593Smuzhiyunnm - memory modify (constant address) 220*4882a593Smuzhiyunping - send ICMP ECHO_REQUEST to network host 221*4882a593Smuzhiyunprintenv- print environment variables 222*4882a593Smuzhiyunprotect - enable or disable FLASH write protection 223*4882a593Smuzhiyunreset - Perform RESET of the CPU 224*4882a593Smuzhiyunrun - run commands in an environment variable 225*4882a593Smuzhiyunsaveenv - save environment variables to persistent storage 226*4882a593Smuzhiyunsetenv - set environment variables 227*4882a593Smuzhiyunsleep - delay execution for some time 228*4882a593Smuzhiyunsource - run script from memory 229*4882a593Smuzhiyunversion - print monitor version 230*4882a593Smuzhiyun-> 231