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.

AM3517 enable USB0

Other Parts Discussed in Thread: AM3517

Hello,

I have been using the 3.6 omap kernel for some time and now wanting to utilise USB0 port but not being able to register the device correctly.

In the board config I 'think' I have enabled the port but when I plug any kind of device into it there is no dmesg or activity.

I just want to use the port as a dedicated USB port for a storage device, Im not bothered about OTG support.  Has anyone got an extract of board config to configure USB0 as a single high speed port please ?

Kind Regards

Marc

  • I am not sure which 3.6 kernel you use, but officially TI only supports 2.6.37 kernel for AM3517.

    Please check if you have file 'drivers/usb/musb/am35x.c' in your kernel, if not, it does not have MUSB support for AM3517.

  • I am using 3.6-rc2 which seems to be fairly stable.  I have created the board config and think the issue may be in there for initialising the USB0 port.

    I have taken the settings from the 2.6.37 kernel so it should work... everything else has.  Could anyone please explain the relationship of the

     usbhs_omap_platform_data and omap_musb_board_data

    I have been looking in the mach-omap2/usb-host.c source and see that there are 3 indexes for usbhs_omap_platform_data.port_mode do these relate to usb0/1 and 2 ?  In the usb-host.c the description is for usb1/2 and 3.

    Also should changing the configuration of omap_musb_board_data to be a host rather than otg:

    static struct omap_musb_board_data musb_board_data = {
     .interface_type         = MUSB_INTERFACE_ULPI,
     .mode                   = MUSB_HOST,
     .power                  = 500,
     .set_phy_power  = am35x_musb_phy_power,
     .clear_irq  = am35x_musb_clear_irq,
     .set_mode  = am35x_set_mode,
     .reset   = am35x_musb_reset,
    };

    And still have the config of DEVCONF2 register as OTG ?
     u32 devconf2;

     devconf2 = omap_ctrl_readl(AM35XX_CONTROL_DEVCONF2);

     /* USB2.0 PHY reference clock is 13 MHz */
     devconf2 &= ~(CONF2_REFFREQ | CONF2_OTGMODE | CONF2_PHY_GPIOMODE);
     devconf2 |=  CONF2_REFFREQ_13MHZ | CONF2_SESENDEN | CONF2_VBDTCTEN
       | CONF2_DATPOL;

     omap_ctrl_writel(devconf2, AM35XX_CONTROL_DEVCONF2);

     usb_musb_init(&musb_board_data);

    Im sure its something simple but the lack of kownledge about documentation for how to setup and configuration of the USB controllers is the part that is confusing me.

    Any assistance in getting this running is appreciated.

     

     

  • After a session of JTAG debugging I have managed to get it working now with the correct kernel config and adding 2 clock references that the kernel was trying to use that weren't in the table.

    If anyone is interested I can post the changes and settings.

     

    Thanks

    Marc

  • Can you post your changes to the kernel? If someone runs in the same problem he would solve it faster.