ROM boot code documentation.

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

ROM boot code documentation.

7,851 Views
RandyGraham
Contributor IV

Hello,

I am trying to boot a custom i.mx28 board from an SD card and am seeing the following hex codes displayed from the UART.

0x80502008

0x8020a014
0x8020a014
Prefetch Abort
r14_abt: 0xffff


The SD card contains a version of u-boot that works on the imx28-evk dev board.


Where are these codes documented?


I couldn't find them in the processor reference manual.


Thanks for any help,


-Randy



Labels (2)
33 Replies

2,290 Views
RandyGraham
Contributor IV

Also, where do I find the source code for the rootfs/boot binaries, e.g. power_prep and boot_prep ?

I am using LTIB with a 2.6.35 linux kernel and can successfully build, but can't find the source for these binaries and would like to apply some patches.

-Randy

0 Kudos

2,290 Views
MarekVasut
Senior Contributor I

I'd like to give you a zealous suggestions to use upstream Linux 3.7 and upstream U-Boot 2013.01 instead, but that's really up to you ;-)

As for power_prep and this other junk, it's in imx-bootlets.

0 Kudos

2,290 Views
RandyGraham
Contributor IV

Thanks Marek !

Yes, I have linux 3.7 running on my mx28-evk board with u-boot 2012.10, but have started with Freescale's 'official' release of linux 2.6.35 with LTIB for our custom board to sort out some hardware issues.

I have been using buildroot for our 3.7 builds and it seems to work quite well for our dev board.

But maybe I should just upstream as you say :smileywink:

-Randy

0 Kudos

2,290 Views
MarekVasut
Senior Contributor I

Haha, don't worry, I'm just overzealous and I expect sooner or later, someone will run out of patience with me propagating upstream all around the place :smileygrin:

Anyway, just put down the issues you're facing and someone might come around and help ;-)

0 Kudos

2,290 Views
RandyGraham
Contributor IV

I think it is good advice.

I am going to focus on getting u-boot 2013.01 up and running since I am going to need u-boot anyway for netboot during development.

I am also using buildroot to build my filesystem since it seems to be under active development.

0 Kudos

2,290 Views
MarekVasut
Senior Contributor I

That should be really quick, just look at mx28evk or m28evk , that should give you some idea on how to port it. Basically, just copy it, add entry to boards.cfg , adjust iomux.c / spl_boot.c for the pinmux, adjust MMC WP/CD GPIOs etc. and that should be it.

0 Kudos

2,290 Views
RandyGraham
Contributor IV

Thanks Marek.

Our custom mx28 board is of course based on the reference design.
I am trying to get u-boot 2013.01  running on it and am seeing no output at all.

Our board is configured to boot from SD0, and without an SD card installed I am seeing '0x8020a014' on my debug console, which seems correct.

But when I try to boot from an sd card with u-boot, I see no output at all.

The same sd card runs u-boot fine on my mx28-evk board.

Since our board copies the reference design minus a few components (no SD1, no FEC1, no sound), I assume that I should at least see some output from my u-boot sd card ?

Is there anything obvious I should look at before digging into the u-boot source ?

Thanks again,

-Randy

0 Kudos

2,290 Views
MarekVasut
Senior Contributor I

Check board/<yourboard>/iomux.c or spl_boot.c and look for DUART configuration. That's what is probably misconfigured.

Otherwise you can enable CONFIG_SPL_SERIAL_SUPPORT in your include/configs/<yourboard>.h and then edit arch/arm/cpu/arm926ejs/mxs/spl_boot.c , put serial_initialize() and serial_puts("foo") all around the place. That'll allow you to check if the board boots at all, as it'll output debugging stuff from U-Boot SPL.

2,290 Views
RandyGraham
Contributor IV

Marek, do you ever sleep ?? :smileyhappy:

Thank you very much, my next step was to start inserting debug print prints and you have helped point me in the right direction.

Thanks again.

0 Kudos

2,290 Views
RandyGraham
Contributor IV

u-boot.2013.01 is booting on  my board. I have added serial_puts() to debug the boot process and am seeing the output on my serial console.

So, this is very good.

From my debug output, I see that the board is resetting itself during memory initialization while setting the EMI clock divider :

    /* Set EMI clock divider for EMI clock to 411 / 2 = 205MHz */

    serial_puts("***** set emi clk div *****\n");

    writel((2 << CLKCTRL_EMI_DIV_EMI_OFFSET) |

        (1 << CLKCTRL_EMI_DIV_XTAL_OFFSET),

        &clkctrl_regs->hw_clkctrl_emi);

My hardware guy assures me that our board configuration is identical to the mx28-evk reference board with respect to clock and memory. The same SD card with u-boot boots fine on the mx28-evk board.

Is it possible that mx28-evk contains special boot rom initialization code that I don't have on my stock i.mx28 SOC ?

-Randy

0 Kudos

2,283 Views
MarekVasut
Senior Contributor I

There is really only one BootROM. And this code is tested on MX28EVK by Fabio. Did you derive your board configuration in U-Boot from MX28EVK? Could it be that your memory is underpowered maybe? Do you use the same memory chips?

0 Kudos

2,280 Views
RandyGraham
Contributor IV

Yes, I am using the mx28evk board config in u-boot.

My hardware guy thinks that the issue may be the current limiter setting on the linear regulator.  It's default enabled to limit inrush on USB, which does not apply to our board, since we have a separate supply for USB source.

He suggested disabling the VDDMEM current limiter.

HW_POWER_VDDMEMCTRL[ENABLE_ILIMIT] = 0

We are using equivalent memory chips (same specs) as the evk board. I don't recall the manufacturer (hardware guys knows) but the chips we are using are pin for pin and spec compatible with the evk board memory chip .

0 Kudos

2,280 Views
MarekVasut
Senior Contributor I

You can try disabling the rail protection, comment call to mxs_enable_output_rail_protection() in arch/arm/cpu/arm926ejs/mxs/spl_power_init.c and see what happens.

0 Kudos

2,280 Views
RandyGraham
Contributor IV

Cool, I'll give that a shot, thanks.

0 Kudos

2,280 Views
RandyGraham
Contributor IV

Still no luck.....

0 Kudos

2,280 Views
MarekVasut
Senior Contributor I

Sorry for the late reply, are you still struggling with this issue ? I can't seem to find what could cause it so far, but I've done review of the code. I still have hard time understanding why would enabling EMI clock kill your board. On the other hand, I saw issues when using mDDR at wrong voltage. Are your EMI pads configured properly?

0 Kudos

2,280 Views
RandyGraham
Contributor IV

Yes, I measured and my DDR is at the wrong voltage.

At this point I don't know if it is a configuration issue or a hardware problem.

So, I am studying the power management docs to better understand it.

0 Kudos

2,280 Views
MarekVasut
Senior Contributor I

What wrong voltage are you referring to? Where did you measure it? What is the expected value and what do you measure?

0 Kudos

2,280 Views
RandyGraham
Contributor IV

We measured VDDMEM at ~0.7v  and were expecting close to 1.8 v .

All other rail voltages look correct, going from memory, we measured  4P2=4.2 v, VDDIO = 3.3, VDDD=1.2, VDDA=1.8.

0 Kudos

2,280 Views
MarekVasut
Senior Contributor I

can you check the HW_POWER_VDDMEMCTRL register (print the value) just before the machine crashes ? That might point you to something.

0 Kudos