i.MX28 u-boot vs. bootlets - VDD5V Source Only

cancel
Showing results for 
Search instead for 
Did you mean: 

i.MX28 u-boot vs. bootlets - VDD5V Source Only

Jump to solution
5,054 Views
rabryn
Contributor III

I'm bringing up a custom i.MX283 based board.  I'm having trouble with random lockups anywhere from 1 or 2 seconds to several minutes after applying power.  I believe the issue is power related.  I've implemented the design detailed in section 4.1.2.1 (VDD5V source only) of application note AN4199:

http://www.freescale.com/files/32bit/doc/app_note/AN4199.pdf

After researching the problem I came across this patch on the Freescale website:

Linux patch to add more robust support for a VDD5V or DCDC_BATT only

Currently, I'm using mainline kernel version 3.8.3 with u-boot version v2012.10.

Are the fixes described in the bootlet patch implemented in mainline u-boot?  Can u-boot be configured for VDD5V only?  I've looked into the u-boot and bootlet code, but the code is seemingly quite different...

Thanks,

Ryan

Labels (1)
1 Solution
569 Views
rabryn
Contributor III

Hi Fabio,

The problem is u-boot's configuration of the low-level blocks of the power management unit in a 5V only scenario as defined in section 4.1.2 of the application note linked to in the original post.  Late yesterday I was able to prove this by porting over the patched bootlet code into u-boot.  It appears u-boot's SPL implementation is based on Freescale's original bootlet code.  However, Freescale has released a 5V only patch to the bootlet code that has never made it into u-boot.

I now have a working system.  Over time I'll try and clean up my modifications to u-boot and get some kind of patch together.

Thanks,

Ryan

View solution in original post

0 Kudos
34 Replies
483 Views
fabio_estevam
NXP Employee
NXP Employee

Hi Ryan,

Could this also be DDR settings related?

When I run kernel 3.8 with mainline U-boot I do not experience the random lockups.

Would you have access to a mx28evk to compare the behaviour against your hardware?

Regards,

Fabio Estevam

0 Kudos
570 Views
rabryn
Contributor III

Hi Fabio,

The problem is u-boot's configuration of the low-level blocks of the power management unit in a 5V only scenario as defined in section 4.1.2 of the application note linked to in the original post.  Late yesterday I was able to prove this by porting over the patched bootlet code into u-boot.  It appears u-boot's SPL implementation is based on Freescale's original bootlet code.  However, Freescale has released a 5V only patch to the bootlet code that has never made it into u-boot.

I now have a working system.  Over time I'll try and clean up my modifications to u-boot and get some kind of patch together.

Thanks,

Ryan

View solution in original post

0 Kudos
483 Views
fabio_estevam
NXP Employee
NXP Employee

Thanks, Ryan.

I will be glad to help you to fix mainline U-boot.

When you have a chance, please generate the patches against 2013.04 version and submit them to the U-boot list.

Regards,

Fabio Estevam

483 Views
rabryn
Contributor III

Fabio,

I will generate a patch, but it will take some time.  I basically replaced u-boot-2013.04/arch/arm/cpu/arm926ejs/mxs/{spl_power_init.c, spl_mem_init.c} with the bootlet's power_prep.c and init-mx28.c respectively.  A brute force approach if you will.  I'm going to narrow down the changes and try to find specifically what's needed.

Ryan

0 Kudos
483 Views
B_K_Ankur
Contributor IV

Hello Ryan,

I am facing similar issue with VDD5V only mode using U-Boot. Could you please share the patch in case if you have created for u-boot with VDD5v only mode or share the code you modified esp. spl_power_init.c ?

Thank you in Advance.

Regards,

Ankur

0 Kudos
483 Views
B_K_Ankur
Contributor IV

Hello Friends,

I have made changes to u-boot code similar to bootlets source (with Patch L2.6.35_10.12_SDK_5V_SUPPLY_PATCH.tar.gz). Please find the attached u-boot patch for VDD5V, which is not working for me.

Can anyone suggest, what's missing in the patch?

U-Boot Console Output:

Configured for 5v only power source. Battery powered operation disabled.

mxs_power_init_dcdc


Regards,

Ankur

0 Kudos
483 Views
B_K_Ankur
Contributor IV

Find Missing Patch: From above post. [C] Ankur Patel - Pastebin.com

Regards,

Ankur

0 Kudos
483 Views
fabio_estevam
NXP Employee
NXP Employee

Ankur,

Please post your patch to the U-boot list so that people can review it and help you there.

Regards,

Fabio Estevam

0 Kudos
483 Views
B_K_Ankur
Contributor IV

Sure, Let me give it a try to post it on u-boot list.

I appreciate your kind response.

Thank you,

Regards,

Ankur.

0 Kudos
483 Views
B_K_Ankur
Contributor IV

Thanks All.

Atlast, I have working u-boot with VDD5V powersupply. As done by Ryan, I have ported the power related code from Powerprep to spl_power_init.c and it worked.

Regards,

Ankur

0 Kudos
483 Views
fabio_estevam
NXP Employee
NXP Employee

Ankur,

This is great news!

Care to share your patch? Are you familar with submitting it to the U-boot list, so that it could be reviewed and applied to the official project?

Thanks,

Fabio Estevam

0 Kudos
483 Views
B_K_Ankur
Contributor IV

Sure.. Let me create a patch for u-boot. I am not sure if its been accepted by u-boot as I have used some API's of powerlet bootlet bootloader.

Thank you,

Ankur

0 Kudos
483 Views
gonfer
Contributor V

Does anybody know if this issue has been finally solved in mainline U-Boot?? I've been looking for a patch but didn't find one.

U-Boot v2014.07 on my custom hardware (VDD5V only / no battery) doesn't boot up. I get this message non stop:

PowerPrep start initialize power...

Battery Voltage = 3.09VHTLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLFLC

PowerPrep start initialize power...

Battery Voltage = 3.10VHTLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLFLC

Can someone help me on this?

BR,

Gonzalo.

0 Kudos
483 Views
fabio_estevam
NXP Employee
NXP Employee

Hi Gonzalo,

Not sure whether Ryan or Ankur have submitted the patches to the U-boot list.

About your error messages: it looks like you are still using the bootlets. When you use mainline U-boot you should not have the "PowerPrep" related messages as you show. In mainline U-boot the bootlets code are built-in in U-boot, so you only need to flash U-boot in to your hardware.

0 Kudos
476 Views
B_K_Ankur
Contributor IV

Hello Fabio,

The patch already made available at: Suspend/Resume not working on I.MX280?

Regards,

Ankur

0 Kudos
476 Views
fabio_estevam
NXP Employee
NXP Employee

Hi Ankur,

In the link you pointed out there is a patch for bootlets, not for U-boot.

Regards,

Fabio Estevam

0 Kudos
483 Views
gonfer
Contributor V

Hi Fabio,

thanks for pointing that. I just burned U-Boot in a SD card I use with my iMX28evk. Maybe SD card partitioning was incorrect? So I've partitioned the SD card as described in U-Boot documentation, and now it woks but in a weird way.

HTLLCL0x80206008

0x8020a012

0x80502008

and 15 to 20 seconds later:

          HTLLCLLC

U-Boot 2014.07-dirty (Oct 17 2014 - 13:07:42)

CPU:  Freescale i.MX28 rev1.2 at 454 MHz

BOOT:  SSP SD/MMC #0, 3V3

SPI:  ready

DRAM:  128 MiB

NAND:  128 MiB

MMC:  MXS MMC: 0

*** Warning - bad CRC, using default environment

Video: MXSFB: 'videomode' variable not set!

In:    serial

Out:  serial

Err:  serial

Net:  FEC0 [PRIME], FEC1

Warning: FEC1 using MAC address from net device

Hit any key to stop autoboot:  0

switch to partitions #0, OK

mmc0 is current device

** Invalid partition 2 **

** Invalid partition 2 **

Booting from net ...

FEC0: Autonegotiation timeout

BOOTP broadcast 1

BOOTP broadcast 2

BOOTP broadcast 3

It looks first attempt to boot from SD fails, while second try is successful.

What's the reason for this behaviour? If I burn the same SD card with bootlets using the mk_mx28_image script, the board boots fine all the times. I've done this using 2 different SD cards with the same results.

Thanks,

Gonzalo.

Edit: using these SD cards with U-Boot on my custom board leads to a non stop HTLLCHTLLCHTLLCHTLLCHTLLC

How can I make U-Boot more verbose?

0 Kudos
476 Views
fabio_estevam
NXP Employee
NXP Employee

Does this behaviour happen only with your custom board? I have never seen such problem with mx28evk.

Maybe you can start a thread at the u-boot mailing list to discuss this further.

0 Kudos
476 Views
gonfer
Contributor V

Hi Fabio,

This was on my iMX28evk.

As I edited in my previous post, the same SD with U-Boot on my custom board leads to a non stop HTLLCHTLLCHTLLCHTLLCHTLLC.....

How can I make U-Boot more verbose?

Is v2014.07 the recommended tag in U-Boot for the iMX28 precessor?

Thanks,

Gonzalo.

0 Kudos
476 Views
fabio_estevam
NXP Employee
NXP Employee

You can also use 2014.10, which was released earlier this week.

0 Kudos