can U-Boot affect USB detection in Linux?

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

can U-Boot affect USB detection in Linux?

1,999 Views
alwyn_motium
Contributor I

Hi,

We have a custom designed iMX53 board.  It is identical to the imx53 QSB rev.B except we use DDR2 memory.

Because of this, we obviously have had to make our own version of U-Boot.

We have built our own linux system using LTIB which boots etc.  (Networking, lvds etc, are all working fine)

Everything appears to be working correctly except that linux is not detecting any USB devices on our custom board.

If i use the same linux image and run it on the QSB with the default U-Boot image, USB devices are detected.

the only difference software wise between the QSB and our custom board is the U-Boot image.

Is it possible to stop linux detecting USB devices by setting the wrong flags in U-Boot?

Labels (2)
Tags (4)
0 Kudos
Reply
8 Replies

1,570 Views
OtavioSalvador
Senior Contributor II

It does; depending on the PMIC the way of enable the USB is different.

1,570 Views
alwyn_motium
Contributor I

Thanks for the pointer, it does appear that it is to do with the PMIC.

I'm not sure how important it is for U-Boot to identify the PMIC,  though i think it is more to do with the fact that our custom board identifies itself as a Rev A board, so the Kernal tries to access the DA9052 PMIC instead of the MC34708.

This comment here seems to be a similar issue.

i.MX53 Quick Start - Linux on ARM - eewiki

0 Kudos
Reply

1,570 Views
OtavioSalvador
Senior Contributor II

It is critical as the power sequence is different. The two PMICs are very different from U-Boot point of view and the revision detection can be causing this, indeed.

You can check the U-Boot mainline as it has a very good support for both variants of MX53QSB and it should be easier to adapt to your custom board.

0 Kudos
Reply

1,570 Views
alwyn_motium
Contributor I

Hi, Thanks again for your answers.

What do you mean by U-Boot mainline?  Are you talking about the "most recent release"  from http://www.denx.de/wiki/U-Boot/SourceCode ??

We have  a QSB as a reference, and i tried building the mx53loco image for U-Boot 2012.10 , however it wouldn't boot.

Is this what you mean by the "U-Boot Mainline"

Thanks again for your help.

0 Kudos
Reply

1,570 Views
alwyn_motium
Contributor I

Thanks to you both for the answers.

As Fabio noted, the problem with getting the Mainline uboot to run was incorrectly copying the image, however my issue wasn't using u-boot.bin instead of u-boot.imx, ( I was already trying to use that).  I was using dd with "bs=512 seek=2 skip=2" as arguments.  This worked without any problems with the u-boot.bin produced from the LTIB, however, it seems that this doesn't work for the 2013.01 u-boot image.

With the mainline uboot image i've compiled, the USB is now working, even though the Kernel can't talk to the PMIC.

I'll try the change you've suggested and see if the kernel identifies the PMIC

0 Kudos
Reply

1,570 Views
fabio_estevam
NXP Employee
NXP Employee

With U-boot mainline you have to flash u-boot.imx binary into SD card instead of u-boot.bin.

(dd if=u-boot.imx of=/dev/mmcblk0 bs=512 seek=2)

Please find the details here:

http://git.denx.de/?p=u-boot.git;a=blob;f=doc/README.imximage;h=073e3fcb3c6ecc9a7dfa8af468c76f96b16b...

About your original issue: if we do not pass the correct version of the mx53qsb from U-boot to the kernel you will experience USB issues as you described. The kernel from FSL does treat USB differently depending on the board revision.

In both FSL U-boot and mainline U-boot we do read the fuses to check the board revision.

If you haven't blown the fuses and your mx53 board does use a mc34708 pmic then you can force the following:

u32 get_board_rev(void)

{

          return 0x53100;

}


Regards,

Fabio Estevam

1,570 Views
alwyn_motium
Contributor I

Using the

u32 get_board_rev(void)

{

          return 0x53100;

}

allows the kernel to correctly identify the PMIC as the MC34708.

Thanks,

Alwyn

0 Kudos
Reply

1,570 Views
OtavioSalvador
Senior Contributor II

It works for sure. I use it daily. The 2013.01 release should happen this week and it is even more stable and capable. I'd suggest you to try this one.

If you need support for it, contact me.

Regards,

0 Kudos
Reply