AnsweredAssumed Answered

uboot usb start USB0:   Port not available.

Question asked by fulin chen on Aug 17, 2016
Latest reply on Aug 24, 2016 by fulin chen

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 }

Outcomes