I am trying to configure USB Host1 in U-Boot, Please suggest

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

I am trying to configure USB Host1 in U-Boot, Please suggest

Jump to solution
3,686 Views
sarveshgupta84
Contributor II

CPU:   Freescale i.MX53 family 2.1V at 800 MHz

mx53 pll1: 800MHz

mx53 pll2: 400MHz

mx53 pll3: 216MHz

mx53 pll4: 455MHz

ipg clock     : 66666666Hz

ipg per clock : 33333333Hz

uart clock    : 66666666Hz

cspi clock    : 54000000Hz

ahb clock     : 133333333Hz

axi_a clock   : 400000000Hz

axi_b clock   : 200000000Hz

emi_slow clock: 133333333Hz

ddr clock     : 400000000Hz

esdhc1 clock  : 80000000Hz

esdhc2 clock  : 80000000Hz

esdhc3 clock  : 80000000Hz

esdhc4 clock  : 80000000Hz

nfc clock     : 26666666Hz

Board: MX53-LOCO 1.0

Boot Reason: [POR]

Boot Device: SD

I2C:   ready

DRAM:   1 GB

MMC:   FSL_ESDHC: 0, FSL_ESDHC: 1

*** Warning - bad CRC or MMC, using default environment

IPU CLK = 200000000

MXC IPUV3 configured

XRES = 320 YRES = 240 BitsXpixel = 4

In:    serial

Out:   serial

Err:   serial

Serial reinitilized!

Net:   got MAC address from IIM: 00:04:9f:02:41:18

FEC0 [PRIME]

Hit any key to stop autoboot:  0

MX53-LOCO U-Boot >

MX53-LOCO U-Boot >

MX53-LOCO U-Boot > usb start

(Re)start USB...

USB:   Register 10011 NbrPorts 1

USB EHCI 1.00

scanning bus for devices... New Device 0

USB GET DESCRIPTOR 

usb_control_msg: request: 0x6, requesttype: 0x80, value 0x100 index 0x0 length 0x40

USB DESCRIPTOR 18

set address 1

usb_control_msg: request: 0x5, requesttype: 0x0, value 0x1 index 0x0 length 0x0

USB GET DESCRIPTOR 

usb_control_msg: request: 0x6, requesttype: 0x80, value 0x100 index 0x0 length 0x12

Sar - New Device Max Ports are: 0

USB GET DESCRIPTOR 

usb_control_msg: request: 0x6, requesttype: 0x80, value 0x200 index 0x0 length 0x9

USB GET DESCRIPTOR 

usb_control_msg: request: 0x6, requesttype: 0x80, value 0x200 index 0x0 length 0x19

get_conf_no 0 Result 25, wLength 25

if 0, ep 0

##EP epmaxpacketin[1] = 8

set configuration 1

usb_control_msg: request: 0x9, requesttype: 0x0, value 0x1 index 0x0 length 0x0

new device strings: Mfr=1, Product=2, SerialNumber=0

usb_control_msg: request: 0x6, requesttype: 0x80, value 0x300 index 0x0 length 0xFF

USB device number 1 default language ID 0x1

usb_control_msg: request: 0x6, requesttype: 0x80, value 0x301 index 0x1 length 0xFF

usb_control_msg: request: 0x6, requesttype: 0x80, value 0x302 index 0x1 length 0xFF

Manufacturer u-boot

Product      EHCI Host Controller

SerialNumber

USB hub found

usb_control_msg: request: 0x6, requesttype: 0xA0, value 0x2900 index 0x0 length 0x4

usb_control_msg: request: 0x6, requesttype: 0xA0, value 0x2900 index 0x0 length 0x8

1 ports detected

individual port power switching

standalone hub

global over-current protection

power on to power good time: 20ms

hub controller current requirement: 0mA

port 1 is removable

usb_control_msg: request: 0x0, requesttype: 0xA0, value 0x0 index 0x0 length 0x4

get_hub_status returned status 1, change 8101

local power source is lost (inactive)

no over-current condition exists

enabling power on all ports

usb_control_msg: request: 0x3, requesttype: 0x23, value 0x8 index 0x1 length 0x0

port 1 returns 0

usb_control_msg: request: 0x0, requesttype: 0xA3, value 0x0 index 0x1 length 0x4

Port 1 Status 301 Change 1

port 1 connection change

port 1 connection change

usb_control_msg: request: 0x0, requesttype: 0xA3, value 0x0 index 0x1 length 0x4

portstatus 301, change 1, 1.5 Mb/s

usb_control_msg: request: 0x1, requesttype: 0x23, value 0x10 index 0x1 length 0x0

hub_port_reset: resetting port 0...

usb_control_msg: request: 0x3, requesttype: 0x23, value 0x4 index 0x1 length 0x0

usb_control_msg: request: 0x0, requesttype: 0xA3, value 0x0 index 0x1 length 0x4

portstatus 303, change 10, 1.5 Mb/s

STAT_C_CONNECTION = 0 STAT_CONNECTION = 1  USB_PORT_STAT_ENABLE 1

usb_control_msg: request: 0x1, requesttype: 0x23, value 0x14 index 0x1 length 0x0

New Device 1

USB GET DESCRIPTOR 

usb_control_msg: request: 0x6, requesttype: 0x80, value 0x100 index 0x0 length 0x40

EHCI timed out on TD - token=0x80008c80

USB DESCRIPTOR 64

hub_port_reset: resetting port 0...

usb_control_msg: request: 0x3, requesttype: 0x23, value 0x4 index 0x1 length 0x0

usb_control_msg: request: 0x0, requesttype: 0xA3, value 0x0 index 0x1 length 0x4

portstatus 303, change 10, 1.5 Mb/s

STAT_C_CONNECTION = 0 STAT_CONNECTION = 1  USB_PORT_STAT_ENABLE 1

usb_control_msg: request: 0x1, requesttype: 0x23, value 0x14 index 0x1 length 0x0

set address 2

usb_control_msg: request: 0x5, requesttype: 0x0, value 0x2 index 0x0 length 0x0

EHCI timed out on TD - token=0x80008d80

USB GET DESCRIPTOR 

usb_control_msg: request: 0x6, requesttype: 0x80, value 0x100 index 0x0 length 0x12

EHCI timed out on TD - token=0x80008c80

Sar - New Device Max Ports are: 0

USB GET DESCRIPTOR 

usb_control_msg: request: 0x6, requesttype: 0x80, value 0x200 index 0x0 length 0x9

EHCI timed out on TD - token=0x80008c80

usb_get_configuration_no: failed to get descriptor - too long: 65535

ERROR: NOT USB_CONFIG_DESC ff

set configuration 0

usb_control_msg: request: 0x9, requesttype: 0x0, value 0x0 index 0x0 length 0x0

EHCI timed out on TD - token=0x80008d80

new device strings: Mfr=0, Product=0, SerialNumber=0

Manufacturer

Product     

SerialNumber

Manufacturer

Product     

SerialNumber

2 USB Device(s) found

       scanning bus for storage devices...

0 Storage Device(s) found


Labels (1)
1 Solution
1,833 Views
fabio_estevam
NXP Employee
NXP Employee

Yes, correct. On mx53qsb USBHost works by default on the latest U-boot.

View solution in original post

10 Replies
1,833 Views
dreamfly
Contributor I

Hi friend,haven‘t you solve this problem.Can you share the ehci_mx5.c file?

0 Kudos
1,833 Views
sarveshgupta84
Contributor II

Thanks for responding, no I haven't solved that. I have attached echi_mx5.c. For the time being I am using mainline u-boot v2013.01 in that USB is working fine.

0 Kudos
1,833 Views
dreamfly
Contributor I

Thanks very much.:smileyhappy:

0 Kudos
1,834 Views
fabio_estevam
NXP Employee
NXP Employee

Yes, correct. On mx53qsb USBHost works by default on the latest U-boot.

1,833 Views
dreamfly
Contributor I

Hi Fabio Estevam

I found a problem when i debug,now this is my print

CPU:   Freescale i.MX53 family 2.1V at 800 MHz

mx53 pll1: 800MHz

mx53 pll2: 400MHz

mx53 pll3: 432MHz ------------------------------this is important

mx53 pll4: 455MHz

ipg clock     : 66666666Hz

ipg per clock : 33333333Hz

uart clock    : 66666666Hz

cspi clock    : 108000000Hz-------------------and this

ahb clock     : 133333333Hz

axi_a clock   : 400000000Hz

axi_b clock   : 200000000Hz

emi_slow clock: 133333333Hz

ddr clock     : 400000000Hz

esdhc1 clock  : 80000000Hz

esdhc2 clock  : 80000000Hz

esdhc3 clock  : 80000000Hz

esdhc4 clock  : 80000000Hz

nfc clock     : 26666666Hz

Board: MX53-LOCO 1.0

Boot Reason: [POR]

Boot Device: SD

but the iMX53RM write the usbhost working on the PLL3 216mhz,setup_pll  PLL3_BASE_ADDR,216 is writen

in the lowlevel_init.S, Why it become 432MHZ,and what should i do to change it to 216mhz ,I used u-boot-2009.08

thanks!

                                   yang rui

0 Kudos
1,833 Views
fabio_estevam
NXP Employee
NXP Employee

Please use 2013.01. U-boot instead. You will get USB Host working out of the box.

0 Kudos
1,833 Views
flaviosuligoi
Contributor III

Hi Fabio,

but the u-boot 2013.04 has not mxc_nand_bi_swap function in driver/mtd/nand/mxc_nand.c file, so the NAND flash bad block management is not correctly managed and it can be cause some malfunctions with the NAND.

Or perhaps the bad block indicator swap is now implemented in another way?

Flavio

0 Kudos
1,833 Views
fabio_estevam
NXP Employee
NXP Employee

Flavio,

This thread is about usb host support in U-boot for mx53, not about NAND.

0 Kudos
1,833 Views
flaviosuligoi
Contributor III

ok

0 Kudos
1,833 Views
sarveshgupta84
Contributor II

Well i am using the freescale's MX53-Start-R board for the same. I am trying to recognise the USB Mass storage through USB Host1.

I am also attaching the mx53_loco.h file in which i have include the following for USB:

#define CONFIG_CMD_USB

#define CONFIG_USB_EHCI

#define CONFIG_USB_EHCI_MX5

#define CONFIG_USB_STORAGE

#define CONFIG_USB_HOST_ETHER

#define CONFIG_USB_ETHER_ASIX

#define CONFIG_USB_ETHER_SMSC95XX

#define CONFIG_MXC_USB_PORT            1

#define CONFIG_MXC_USB_PORTSC        (PORT_PTS_UTMI | PORT_PTS_PTW)

//#define CONFIG_MXC_USB_FLAGS            (1 << 5)

#define CONFIG_MXC_USB_FLAGS        0

#define CONFIG_MX53

#define CONFIG_EHCI_HCD_INIT_AFTER_RESET

#define CONFIG_EHCI_IS_TDI

#define CONFIG_SUPPORT_VFAT

#define CONFIG_CMD_FAT   1

Am I missing something??

Please suggest...

0 Kudos