custom imx28 yocoto u-boot 2013.10 init fails

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

custom imx28 yocoto u-boot 2013.10 init fails

820 Views
tomdeacon
Contributor II

Hi,

I am trying to switch from LTIB to Yocto on a custom imx28 board. I have the LTIB u-boot with imx bootlets working on sdcard.

The only thing I had to change was define NO_DCDC_BATT_SOURCE in power_prep.c otherwise u-boot would keep reseting.

Booting a sdcard with u-boot 2013.10 results in u-boot failing to initialize with no output on the console.

I added some debug messages and found that it keeps failing at the same line.

In spl_power_init.c, mxs_power_set_vddx(&mxs_vddio_cfg, 3300, 3150) is called and fails at the following line:

cur_target = readl(cfg->reg);

The same sdcard will start loading the kernel fine on the imx28evk.

Any help would be appreciated.

Labels (3)
0 Kudos
3 Replies

510 Views
MarekVasut
Senior Contributor I

Can you please try this patch on top of your 2013.10 [1] ? I recall we had some obscure configuration which needed this, but it's post-2013.10 patch .

[U-Boot,1/2] ARM: mxs: Enable DCDC converter for battery boot - Patchwork

0 Kudos

510 Views
MarekVasut
Senior Contributor I

Otherwise, it'd be nice to learn how does the code pass through mxs_power_configure_power_source() call in spl_power_init.c . Especially since that'd tell me sufficient details about your hardware . Can you instrument the function, publish your instrumentation and what result you got please ?

You can add #define CONFIG_SPL_SERIAL_SUPPORT into mxs.h , then augment the function like so:

+serial_initialize();

793         if (readl(&power_regs->hw_power_sts) & POWER_STS_VDD5V_GT_VDDIO) {

+serial_putc('a');

794                 batt_ready = mxs_is_batt_ready();

795                 if (batt_ready) {

+serial_putc('b');

796                         /* 5V source detected, good battery detected. */

797                         mxs_batt_boot();

+serial_putc('c');

798                 } else {

+serial_putc('d');

799                         batt_good = mxs_is_batt_good();

800                         if (!batt_good) {

+serial_putc('e');

801                                 /* 5V source detected, bad battery detected. */

802                                 writel(LRADC_CONVERSION_AUTOMATIC,

803                                         &lradc_regs->hw_lradc_conversion_clr);

804                                 clrbits_le32(&power_regs->hw_power_battmonitor,

805                                         POWER_BATTMONITOR_BATT_VAL_MASK);

806                         }

+serial_putc('f');

807                         mxs_5v_boot();

+serial_putc('g');

808                 }

809         } else {

810                 /* 5V not detected, booting from battery. */

+serial_putc('h');

811                 mxs_batt_boot();

812         }

+for(;;);

It's a quick hack, but should spit some letters. The for(;;); at the end will halt the execution of the function so we won't be getting any further interference.

0 Kudos

510 Views
alejandrolozan1
NXP Employee
NXP Employee

Hi,

As far as I understand the same image generated works in the imx28evk, but it does not in your custom board. Correct?

I wonder if you can share your schematics.

Best Regards,

Alejandro

0 Kudos