mpc5121 bringup

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

mpc5121 bringup

4,436 Views
grass
Contributor I

Hi All,

I've my own mpc5121 based hardware ready, now is the time to flash the UBoot and my own linux image. 

 

Questions:

 

1)  What JTag to use for the board? I have EPI Majic which is supposed to support a lot of CPUs, question is will it support MPC5121?

 

2)  The board is gonna be used as A/V streamer of AAC audio and AVC video. The video is handled by the HW encoder but I plan to use AXE for AAC encoding, where to find info on it and how to compile it into my image?

 

3) Where to find Linux BSP for the board?

 

 

 

0 Kudos
10 Replies

926 Views
grass
Contributor I

EPI (Mentor) said that Freescale CPUs are not supported. Found the BSP and got the USB tap to flash it. The problem is no matter how I try to flash the uboot image it fails.

I try to flash the image to start address 0xfc000000, the chip select and overall design was copied from the MPC5121 reference board so I guess it shouldbe fine.

 

0 Kudos

926 Views
fsl_linux_spt
Contributor III

I am assuming that the reference design you are referring to is the 5121ADS.  The u-boot from the 5121ADS bsp is designed to boot from fff00000.  This is controled by the TEXT_BASE value in u-boot/boards/ads5121/config.mk

 

If you need uboot to come up from fc000000 then try changing the TEXT_BASE address.  You may need to make additional changes to uboot to get it to come up on your custom board. If you google for "porting u-boot" you will get several hits with good information.

 

You should probably also get on both the u-boot and linuxppc kernel mail list for help with porting questions.

 

u-boot mail list:  http://www.denx.de/wiki/U-Boot

Linuxppc mail list:  https://ozlabs.org/mailman/listinfo/linuxppc-dev

 

 

Hope this is helpful.

 

0 Kudos

926 Views
grass
Contributor I

Thanx for you answer.

My design is a bit different from the original 5121ADS, it doesn't have CPLD, so the U-Boot needs to be modified.

I saw in the docs that CodeWarrior can be used to compile u-boot and debug it on target. The problem is I can't find u-boot project file for theCW.

From looking through the u-boot source tree I could only find the GNU toolchain make files and scripts.  

Is there a way to import GNU make file to CodeWarrior?

0 Kudos

926 Views
grass
Contributor I

Ok, first of I've ported the u-boot and now able to boot linux too.

Have one problem though - the dts file supplied with the reference board has PCI node that depends on the CPLD, I don't have CPLD in my design and I need PCI.

 

How can I change the DTS file to work with the PCI of the MPC5121 without CPLD?

0 Kudos

926 Views
martinw
Contributor III

Hi,

 

Did you initially bring your 5121 hardware up using usbtap under codewarrier?

 

That's where I am at the moment, and I'm struggling with the .cfg file for code warrier.

 

I don't suppose you have a .cfg file which will bring up 'clean' hardware, i.e. no UBOOT, that you could let me have?

 

Regards

 

Martin Wakely

 

0 Kudos

926 Views
grass
Contributor I

Please note that I don't configure DDR and I also have no CPLD in my design,

so basically I only need NOR.

 

Here is my config file:

 

writereg    MBAR    0xff400000


# change internal MMR base from 0xff400000 (reset value) to 0x80000000
writemem.l 0xff400000 0x80000000 # IMMRBAR = 0x80000000

writereg    MBAR    0x80000000
# Relocate 128K SRAM Base Address to 0x00000000
writemem.l 0x800000c4 0x00000000 # SRAMBAR

# LocalPlus Bus Local Access Windows
#####################################
# WINDOW 1 - LocalPlus Boot: 64MB NOR FLASH
writemem.l 0x80000020 0xfc00ffff #LPBAW1  - begining at 0xfc000000

#Configure and Enable Clocks
############################
writemem.l 0x80000f0c 0x01A05330  # 0x01605330 # SCFR1 - IPS_DIV=1/2. PCI_DIV=1/6, MBS_GPX_DIV=1/1. LPC_DIV=1/2, NFC_DIV=1/3
writemem.l 0x80000f04 0xCFFFBC00  # 0xfffffc00 # SCCR1 - enable all clocks
writemem.l 0x80000f08 0xE4000000  # 0xfff80000 # SCCR2 - enable all clocks


##############################################
# Local Plus Controller (LPC) Configuration
##############################################

# CS0 - NOR FLASH
writemem.l 0x80010000 0x05051090 # 0x05051090 waitstates, 8-bit databus, CE, enable write access, non muxed

#LPC_CSCR
writemem.l 0x80010020 0x01000000


writereg MSR 0x3000 # FP available, machine check, exception vectors at 0x0000_0000

# SPCR[TBEN] enable timebase
writemem.l 0x80000104 0x00400000

#unprotect flash
# writemem.b 0x82000008 0xC9 # CPLD Address

#invalidate SP
writereg SP 0xF

Message Edited by grass on 2009-07-12 07:52 AM
0 Kudos

926 Views
martinw
Contributor III

Many thanks for the reply, I'll compare that to what I have.

 

Regards

 

Martin Wakely 

0 Kudos

926 Views
lake
Contributor I

can you give me a reference schematics in MPC5251E’s powerspply ? Thank you very much .58356406@163.com

0 Kudos

926 Views
fsl_linux_spt
Contributor III

The device tree settings seem to be a moving target.  you will probably get the best help with that from the kernel forums.

 

here is some info on the uboot site that may be helpful.  there are links at the bottom for pci binding and interrupt mapping.

 

http://www.denx.de/wiki/U-Boot/UBootFdtInfo

 

 

0 Kudos

926 Views
ronco
NXP Employee
NXP Employee

Well, I can't speak to the EPI Majic or what it supports but you may find useful information on AAC coding by searching on keyword "AAC" at www.freescale.com.

 

And you'll find Linux BSPs for the Freescale ADS512101 board at www.freescale.com -> 32-bit Microcontrollers and Processors -> 32-bit Automotive -> Power Architecture Automotive -> 51xx Controllers -> MPC5121e -> Software & Tools -> Board Support Packages.  I hope this helps.

0 Kudos