This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

AM3352 SDK6.0 update SDK8.0 USB can't work

Other Parts Discussed in Thread: AM3352

Dear,

    My Platform AM3352(MPU), SDK6.0  USB is OK, But update to SDK8.0, the USB can't work, the print error information:

    musb-hdrc musb-hdrc.0.auto: musb_init_controller failed with status -517

   The SDK6.0 the USB controller driver is ti81xx, but SDK8.0 the USB driver is TUSB6010TUSB6010

   I don't known the  TUSB6010 is compatible TI81XX?

  • Hi,
    The SDK6.0 USB driver is: TI81XX
    The SDk8.0 USB driver is: OMAP2430
  • Hi,
    The SDK6.0 USB driver is: TI81XX
    The SDk8.0 USB driver is: OMAP2430
    usb0: usb@47401000
    I use usb0_drvvbus pin, the pin configure:
    usb0_pins: pinmux_usb0_pins {
    pinctrl-single,pins = <
    0x21c (PIN_OUTPUT_PULLDOWN | MUX_MODE0) /* usb0_drvvbus.usb0_drvvbus */
    >;
    };

    usb@47401000 {
    status = "okay";
    dr_mode = "host";
    pinctrl-names = "default";
    pinctrl-0 = <&usb0_pins>;
    };

    I found the Kernel loading have error:
    [ 5.399708] pinctrl-single 44e10800.pinmux: pin 44e10a1c.0 already requested by 47401400.usb; cannot claim for musb-hdrc.0.auto
    [ 5.411851] pinctrl-single 44e10800.pinmux: pin-135 (musb-hdrc.0.auto) status -22
    [ 5.419715] pinctrl-single 44e10800.pinmux: could not request pin 135 (44e10a1c.0) from group pinmux_usb0_pins on device pinctrl-single
    [ 5.432584] musb-hdrc musb-hdrc.0.auto: Error applying setting, reverse things back
    [ 6.357589] musb-hdrc musb-hdrc.0.auto: MUSB HDRC host driver

    So, I want to know the cause of the error information?
  • Error -517 is EPROBE-DEFER, which is caused by missing required resource, which could be, for example, that the USB PHY driver or CPPI DMA driver is not available (most likely not configured correctly).

    You have multiple ways to correct this.

    - Use omap2plus-defconfig as a template, don't change anything which is USB related except those options in class/application driver layer. Or

    - Follow wiki http://processors.wiki.ti.com/index.php/MUSB_Linux_Driver_Configuration to ensure all MUSB related options are configured properly.

    Please don't change/add the pinmux for USB. You don't need the 'usb0_pins' in your dts. Please use am335x-evm.dts as the template for your USB configuration, the *only* thing you need to change is to add dr_mode="host' in usb@47401000, because by default usb0 is in otg mode.

  • xin Ryan said:
    The SDk8.0 USB driver is: OMAP2430

    I should have mentioned that SDK8.0 USB driver for AM335x is "TI DSPS platforms" (CONFIG_USB_MUSB_DSPS), not OMAP2430.

  • Hi,
    Thank you!
    1. Our Hardware refer to the TI Starter Kit board.
    2. Build Kernel & DTB is omap2plus_defconfig & am335x-evmsk.dts
    3. SDK6.0 USB0 mode is setting OTG, support OTG master & slave, but usb0_drvvbus config MODE0
    4. SDK8.0 USB0 mode is setting OTG, I found insert U disk cann't work, So I add usb0_drvvbus configure, but I found add usb0_drvvbus configure, the kernel loading have some error information, the SDK6.0 have no the error information
    5. SDK8.0 USB0 mode must configure OTG Mode, Now, U Disk is working, mode is HOST, configure OTG, U Disk can't work, so I think that usb0_drvvbus pin is not working, SDK8.0 usbX_drvvbus pin can't configure
  • xin Ryan said:
    5. SDK8.0 USB0 mode must configure OTG Mode, Now, U Disk is working, mode is HOST, configure OTG, U Disk can't work, so I think that usb0_drvvbus pin is not working, SDK8.0 usbX_drvvbus pin can't configure

    As long as you have one case enumerates the U-Disk, it means the MUSB is transitioned to host mode, usb0_drvvbus pin has no issue.

    What do you mean by 'mode is HOST, configure OTG'? Can you please give more detail on the case which does not enumerate the U-Disk?


    BTY, I should say to use singlecore-omap2plus_defconfig as the kernel config template, not omap2plus_defconfig.

    singlecore-omap2plus_defconfig has more fine tuning to better work on AM335x, which save you some time on kernel configuration, comparing to omap2plus_defconfig.

  • xin Ryan said:
    1. Our Hardware refer to the TI Starter Kit board.

    The SK board USB0 only support device-only mode. Have you changed the USB0 design to include a power switch to support DRD or host-only mode?

  • Hi,
    Have you changed the USB0 design to include a power switch to support DRD or host-only mode?????
    You can say specific?

    I am sorry, My configure file is singlecore-omap2plus_defconfig , I write wrong.
    1. Build Kernel & DTB is singlecore-omap2plus_defconfig & am335x-evmsk.dts
    2. USBID pin is switch use jumper, My SDK6.0 USB0 Mode is OTG, usb0_drvvbus config MODE0, USB0ID jumper Low, insert U Disk is working, U disk is OTG Slave device, if USB0ID jumper High, connect to PC ,the PC have a device(My board)
    3. So, studying SDK8.0 the USB0 Mode is configure OTG, USB0ID jumper Low, insert U disk, can't found U disk, USB0 configure host, U disk is OK
    4. That's why I'm going to set the USB0 configured to OTG reason!
    5. USB0 high or low is through jumper control, will decide whether to OTG Slave or OTG master?

    Have you changed the USB0 design to include a power switch to support DRD or host-only mode?????
  • xin Ryan said:
    Have you changed the USB0 design to include a power switch to support DRD or host-only mode?????
    You can say specific?

    We will come back on this later if we found this is not an sw issue. We will collect other information first.

    xin Ryan said:
    3. So, studying SDK8.0 the USB0 Mode is configure OTG, USB0ID jumper Low, insert U disk, can't found U disk, USB0 configure host, U disk is OK

    When USB0 mode is configured to OTG, please insert the U-Disk, then collect the following logs.

    # cat /sys/class/udc/musb-hdrc.0.auto/uevent

    # grep -i 'power\|devctl' /sys/kernel/debug/musb-hdrc.0.auto/regdump

  • 1. To be sure sure is a software problem, SDK6.0 is OK, I'm just doing the update BSP
    2. SDK8.0, the usb0 mode is configured to OTG, dts configure:
       usb@47401000 {
                status = "okay";
                dr_mode = "otg";
       };
    3. go linux system, insert U disk,
       root@am335x-evm:~# cat /sys/class/udc/musb-hdrc.0.auto/uevent
       USB_UDC_NAME=musb-hdrc
       root@am335x-evm:~# grep -i 'power\|devctl' /sys/kernel/debug/musb-hdrc.0.auto/regdump
       Power       : 00
       DevCtl      : 80
    4. In fact, SDK8.0, USB0 mode is OTG, jumper USB0ID is Low, insert U disk(OTG Slave    device), But I found the USB_VBUS pin is Low, U disk is not sure to work
       That is why I insisted to configure usb0_drvvbus?

  • Ryan,


    The log shows a gadget driver is not loaded, which is required for OTG to run in host mode.

    You said you have validated that the device mode works. Without a gadget driver loaded, how did you validate the device mode?

    Please load a gadget driver and test the host mode again.

  • Bin,

        1. I need OTG mode to run in host mode(OTG Slave), Could you tell me what is the gadget driver did not Load?

        <M>   USB Gadget Drivers  

        2. SDK6.0 is OK, SUB0 SW setting OTG mode,  USB0ID pin Low or High depend on jumper

        3. SDK8.0 USB0 mode setting host, USBID0 is low, Working fine!

  • xin Ryan said:
    Hi,  1. I need OTG mode to run in host mode(OTG Slave), Could you tell me what is the gadget driver did not Load?

    Any of the USB gadget drivers will work, g_zero, g_ether, or g_mass_storage ...

    xin Ryan said:
    if USB0ID jumper High, connect to PC ,the PC have a device(My board)

    This means you have tested the USB in device mode, you must have had a gadget driver loaded. Just keep the driver loaded when switch to host mode.