uboot usb start USB0: Port not available.

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

uboot usb start USB0: Port not available.

7,537 Views
fulinux
Contributor IV

Hi,

i want to add usb support for uboot.

This is my uboot log:

U-Boot 2015.04-14472-gb5946f5-dirty (Aug 18 2016 - 09:49:11)

CPU:   Freescale i.MX6Q rev1.5 at 792 MHz

CPU:   Temperature 38 C

Reset cause: POR

Board: MX6-SabreSD

I2C:   ready

DRAM:  3.8 GiB

PMIC:  PFUZE100 ID=0x10

MMC:   FSL_SDHC: 0, FSL_SDHC: 1, FSL_SDHC: 2, FSL_SDHC: 3

mmc get env dev=0

No panel detected: default to SAMSUNG-LTM230HL08

Display: SAMSUNG-LTM230HL08 (1920x1080)

In:    serial

Out:   serial

Err:   serial

switch to partitions #0, OK

mmc0(part 0) is current device

Net:   Phy 1 not found

PHY reset timed out

FEC [PRIME]

Normal Boot

Hit any key to stop autoboot:  0

=>

i plug a usb disk to my custom board of imx6q, and run usb start command as follows:

=> usb start

starting USB...

USB0:   Port not available.

=> usbboot

** No device specified **

=> usb reset

resetting USB...

USB0:   Port not available.

=>

Status indicator lamp of Usb disk is off, what should i do? usb disk can be read in linux kernel.

in uboot-imx/include/configs/mx6sabresd.h file:

80 /* USB Configs */

81 #define CONFIG_CMD_USB

82 #ifdef CONFIG_CMD_USB

83 #define CONFIG_USB_EHCI

84 #define CONFIG_USB_EHCI_MX6

85 #define CONFIG_USB_STORAGE

86 #define CONFIG_EHCI_HCD_INIT_AFTER_RESET

87 #define CONFIG_USB_HOST_ETHER

88 #define CONFIG_USB_ETHER_ASIX

89 #define CONFIG_MXC_USB_PORTSC       (PORT_PTS_UTMI | PORT_PTS_PTW)

90 #define CONFIG_MXC_USB_FLAGS        0

91 #define CONFIG_USB_MAX_CONTROLLER_COUNT 1 /* Enabled USB controller number */

92 #endif

in uboot-imx/board/freescale/mx6sabresd/mx6sabresd.c file:

898 #ifdef CONFIG_USB_EHCI_MX6

899 #define USB_OTHERREGS_OFFSET    0x800

900 #define UCTRL_PWR_POL       (1 << 9)

901

902 static iomux_v3_cfg_t const usb_otg_pads[] = {

903     MX6_PAD_EIM_D22__USB_OTG_PWR | MUX_PAD_CTRL(NO_PAD_CTRL),

904     MX6_PAD_ENET_RX_ER__USB_OTG_ID | MUX_PAD_CTRL(OTG_ID_PAD_CTRL),

905 };

906

907 static iomux_v3_cfg_t const usb_hc1_pads[] = {

908     MX6_PAD_ENET_TXD1__GPIO1_IO29 | MUX_PAD_CTRL(NO_PAD_CTRL),

909 };

910

911 static void setup_usb(void)

912 {

913     imx_iomux_v3_setup_multiple_pads(usb_otg_pads,

914                      ARRAY_SIZE(usb_otg_pads));

915

916     /*

917      * set daisy chain for otg_pin_id on 6q.

918      * for 6dl, this bit is reserved

919      */

920     imx_iomux_set_gpr_register(1, 13, 1, 0);

921

922     imx_iomux_v3_setup_multiple_pads(usb_hc1_pads,

923                      ARRAY_SIZE(usb_hc1_pads));

924 }

Labels (1)
Tags (1)
0 Kudos
4 Replies

4,274 Views
1282497337
Contributor II

hi  chen 

I encounter the same problem ,when i use the cmd "usb start " in uboot stage ,i got the line :

>>usb start

starting USB...

USB0:   Port not available.

just like you post problem so could you tell me how to solve this problem.

the uboot version is 2015-04,and my board is imx6d7c

thx.

Alee

0 Kudos

4,274 Views
1074562799
Contributor I

hi ,

    I encounter the same problem.do you solve the problem?

0 Kudos

4,274 Views
igorpadykov
NXP Employee
NXP Employee

Hi

when connecting memory stick to usb otg connector please

verify that USB_ID signal is low, use special cable for that.

Best regards

igor

-----------------------------------------------------------------------------------------------------------------------

Note: If this post answers your question, please click the Correct Answer button. Thank you!

-----------------------------------------------------------------------------------------------------------------------

0 Kudos

4,274 Views
fulinux
Contributor IV

Hi,

Thank you for your reply!

我使用了uboot-2013.04版本的,我定制的板子在usb host上挂接了一个主hub, 在主hub上再接了一个从hub, 现在当u盘接在主hub上是可以实现的,但是当u盘接在从hub上的时候会出现找不到u盘,甚至主hub上无法找到从hub, 如下所示:

u盘在主hub上的时候:

[IMX6Q-UBOOT] usb tree
USB device tree:
  1  Hub (480 Mb/s, 0mA)
     u-boot EHCI Host Controller
   
  2  Hub (480 Mb/s, 0mA)
  |  u-boot EHCI Host Controller
  |
  +-3  Hub (480 Mb/s, 100mA) //这个是主hub (root hub)
    |   USB2.0 Hub
    |
    +-4  Mass Storage (480 Mb/s, 98mA) //这个是u盘 (udisk)
    |    Generic USB Storage 000000000272
    |  
    +-5  Human Interface (12 Mb/s, 300mA)
         Touch Follow Your Imagination! TPI2302_U2_H200V141218_8888 TPI2302_U2_H200V141218_8888

u盘在从hub上的时候:

[IMX6Q-UBOOT] usb tree
USB device tree:
  1  Hub (480 Mb/s, 0mA)
     u-boot EHCI Host Controller
   
  2  Hub (480 Mb/s, 0mA)
  |  u-boot EHCI Host Controller
  |
  +-3  Hub (480 Mb/s, 100mA)
    |   USB2.0 Hub
    |
    +-4  Human Interface (12 Mb/s, 300mA)
         Touch Follow Your Imagination! TPI2302_U2_H200V141218_8888 TPI2302_U2_H200V141218_8888

这个时候没有从hub和u盘设备;

下面是我在include/configs/mx6qsabresd.h文件中做的改动:

 33 /* USB Configs */
 34 #define CONFIG_USB_BOOT 1 /* Enabled boot system from usb disk */
 35 #define CONFIG_CMD_USB
 36 #define CONFIG_USB_EHCI
 37 #define CONFIG_USB_EHCI_MX6
 38 #define CONFIG_USB_STORAGE
 39 #define CONFIG_EHCI_HCD_INIT_AFTER_RESET
 40 #define CONFIG_USB_HOST_ETHER
 41 #define CONFIG_USB_ETHER_ASIX
 43 #define CONFIG_MXC_USB_PORTSC  (PORT_PTS_UTMI | PORT_PTS_PTW)
 44 #define CONFIG_MXC_USB_FLAGS   0
 45 #define CONFIG_USB_MAX_CONTROLLER_COUNT 2 /* Enabled USB controller number */
 

请问一下如何才能找到从hub呢?

在头文件中CONFIG_MXC_USB_PORT,CONFIG_MXC_USB_PORTSC,CONFIG_MXC_USB_FLAGS,CONFIG_USB_MAX_CONTROLLER_COUNT这个几个宏是分别表达了什么意思呢?

还有一个奇怪的错误提示:

[IMX6Q-UBOOT] usb start
(Re)start USB...
USB0:   USB EHCI 1.00
scanning bus 0 for devices... 1 USB Device(s) found
USB1:   USB EHCI 1.00
scanning bus 1 for devices... EHCI timed out on TD - token=0x80008d80

      USB device not accepting new address (error=22)
4 USB Device(s) found
       scanning usb for storage devices... 1 Storage Device(s) found
       scanning usb for ethernet devices... 0 Ethernet Device(s) found

这个有是什么原因呢?

期待你的回复,谢谢:)

0 Kudos