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.

OMAP EHCI/OHCI controller

Other Parts Discussed in Thread: TUSB2551, TUSB1210, OMAP3530, SYSCONFIG

Hi,

I am working on USB EHCI driver for OMAP3. I have got the EHCI stack up and running. I am able to test the driver with USB High Speed devices like USB Mass Storage, a high speed HUB, and USB keyboard, mouse through a high speed HUB.

Hardware Configuration:

1. HS USB HC Port2 --> configured in ULPI with external PHY mode. Other ports not being used.

2. EHCI is only configured and enabled.

3. External Transceiver used is USB83320 from SMSC.

Problem:  If I connect any FS or LS devices directly to Physical port instead of connecting through a High Speed HUB then EHCI driver identifies the port change detect  and identifies that as FS/LS device and switches the port ownership to OHCI. This is normal operation. But as soon I plug out this FS/LS device, EHCI controller should get an interrupt with port change detect which is not happening. So further even if I connect any high speed device EHCI controller does not respond since the ownership is still with the OHCI port. Due to this the EHCI driver will be in a sort of hang state.

But normally, OHCI and EHCI both should get the port status change interrupt and EHCI sholud take the ownership of the port control by setting the Port Owner bit in PORTSC and should signal a disconnet to OHCI. I am seeing this is not happening in OMAP3.

Is that a known hardware issue? If yes then how do I recover port control to EHCI once any FS/LS device is connected and disconnected from a HS port. I couldn't find any in the errata.

Regards,
Sharath

 

  • The OMAP35x Silicon Errata describes this limitation in section 4.1.3 High-Speed USB Host Subsystem: Some Limitations Exist When Connecting to External Devices.

     

    As shown in Figure 14, USB Port 1 and Port 2 can be used to connect to external high-speed PHYs which include a ULPI port. However, in this case, the external USB PHY must be able to accept a source clock generated by the OMAP high-speed USB controller. Also, in this usage model the USB ports cannot support full-speed and low-speed operation. Therefore, using this approach, USB Port 1 and Port 2 cannot provide a fully compliant USB 2.0 Type-A receptacle; a high-speed USB hub would be required in this case; please see Figure 15.

     

    Regards,

    Paul

  • Hi Paul,

     

    Thanks for your quick response. I understand the point mentioned in the errata. But I thought that even though the port doesn't support FS/LS when operated in ULPI HS mode, it is possible to switch the port control back  to EHCI HS mode with interrupts, when I plug out FS/LS device and plug in a HS device. I felt this point is not explicit from errata.

    So now I understand that if I connect a FS/LS device to HS EHCI port directly then the hardware goes to unrecoverable state(with OHCI owning the port control). And in this state OHCI holds the port ownership and there is no way to recover the port control to EHCI. Please confirm if my understanding is right.

     

    Regards,

    Sharath

  • Paul,

    Can you please confirm if my understanding is correct as posted...?

    Regards,

    Sharath

  • You should never connect a low speed or full speed device to a HSUSB port configured for ULPI high speed operation unless it is connected through a high speed hub.  Doing this may put the device into a locked condition this will not allow it to work with high speed devices.

     

    Regards,

    Paul

     

  • Hi Sharath Kumar,

                                      I need some help in the initialization of ohci.

    The default entry is ehci. When Fs\Ls device is connected the ehci reg recognize it and releases the port to ohci. I am not able to enumerate in ohci. I have not tried in Ehci.

      Do i have to configure the ulpi registers for both ehci and ohci?

  • Hello Sir,

                     My name is Akshay Cariappa,

    USB HOST - Impossible To Attach a FS Device To An EHCI Port. Handoff To OHCI Is
    Not Functional 

    It is not possible to perform USB transactions with a FS device on port[1]in [0,1,2]. EHCI is able to detect the device, reset it and find that it is a FS device. SW will then hand off the port to OHCI by setting PORTSC[5]:PO (PORT OWNER) bit. OHCI is able to detect the connection, but then cannot communicate with the device.

    Thank You

  • The OHCI controller expects the respective host port to be configured for serial mode with a USB serial transceiver similar to the TI TUSB2551 connected to this port.  The OHCI controller can not be used with a ULPI PHY.

    Your choices are:

    Use OHCI with a USB serial transceiver for connecting to LS and FS USB peripherals.
    Use EHCI with a ULPI PHY for connecting to HS peripherals.
    Use EHCI with a ULPI PHY which is connected to an on-board or external HS USB HUB for connecting to LS, FS, and HS peripherals.

    Regards,
    Paul

  • Hi Paul,

                Thanks for the response. 

    I have 1 port named EHCI HOST on it. Can i configure it to be usb serial transceiver for connecting to LS and FS USB device? Is it possible to make it recognize only FS LS device in it?

    Thanks & Regards,

    Akshay Cariappa .

  • Please refer to Section 23.2 of the OMAP35xx Technical Reference Manual (TI document SPRUF98) for details related to the USB Host Subsystem.

    Figure 23-7 provides a block diagram of the USB Host subsystem.  It has three ports.  Ports 1 and 2 can be configured to operate with ULPI PHY connected to the EHCI or serial transceiver connected to OHCI.  Port 3 can only be used with serial transceiver connected to OHCI.

    OHCI only supports LS and FS USB peripherals and EHCI only supports HS peripherals.

    OHCI can be used with any of the USB Host ports configured for serial transceiver mode and connected to a USB serial transceiver (TI TUSB2551 or equivalent).

    EHCI can only be used on USB Host ports 1 or 2 configured for ULPI mode and connected to a ULPI PHY (SMSC USB3320 or TI TUSB1210).

    The only way this USB Host subsystem can support all three speeds on a common port is to use EHCI on port 1 or 2 with a ULPI PHY connected to a HS USB hub.

    Regards,
    Paul    

  • Thanks for the response Paul,

                          I understand what you are trying to say. See the errata says 

    The OMAP35x Silicon Errata describes this limitation in section 4.1.3 High-Speed USB Host Subsystem: Some Limitations Exist When Connecting to External Devices.

    As shown in Figure 14, USB Port 1 and Port 2 can be used to connect to external high-speed PHY which include a ULPI port. However, in this case, the external USB PHY must be able to accept a source clock generated by the OMAP high-speed USB controller. Also, in this usage model the USB ports cannot support full-speed and low-speed operation. Therefore, using this approach, USB Port 1 and Port 2 cannot provide a fully compliant USB 2.0 Type-A receptacle; a high-speed USB hub would be required in this case; please see Figure 15.

    I would like to know the properly what this meant? Is this port by default configured only to ULPI PHY for HS device , can this be changed to serial according to data sheet?

    If yes 

     

    So now my issue here is ,when i configure the port named "EHCI HOST" which is port 1 (0,1,2 are the ports) into serial PHY (transceiver)6 pin DAT/SE0 mode for FS/LS device  only by bypassing ulpi; after enabling port power and when I insert the pen drive the current connect status shows no device connected . Am i missing something in the initialization? 

    i have enabled clock,configured serial PHY (transceiver)6 pin DAT/SE0 mode for FS/LS device , done mux set up for hsusb2,configured gpio and sure that it's not going to expansion connector .

    Please help me.

    Regards 

    Akshay


  • Your reply indicates you are using USB Host port 1 and configuring pin multiplexing to connect the hsusb2 signals to a 6-pin serial transceiver.  Therefore, it appears you understand the port numbering scheme. 

    Just in case it is not clear. The USB signals with prefix "hsusb0" are connected to the USB OTG Controller, prefix "hsusb1" are connected to the USB Host Subsystem port 0, prefix "hsusb2" are connected to the USB Host Subsystem port 1, and prefix "hsusb3" are connected to the USB Host Subsystem port 2.

    I think we may need to review your serial transceiver connections to the processor as a next step.  Please provide the USB transceiver part number and detailed list of connections to the processor.

    Is the USB serial transceiver configured to operate in DAT/SE0 signaling mode or DP/DM signaling mode?

    If configured for DAT/SE0 signaling mode the serial transceiver should be connected as shown in Figure 23-19 of the TRM, USBHOST.TLL_CHANNEL_CONF_i[2:1] should be set to 0x1, and USBHOST.TLL_CHANNEL_CONF_i[27:24] should be set to 0x0.

    If configured for DP/DM signaling mode the serial transceiver should be connected as shown in Figure 23-20 of the TRM, USBHOST.TLL_CHANNEL_CONF_i[2:1] should be set to 0x1, and USBHOST.TLL_CHANNEL_CONF_i[27:24] should be set to 0x1.

    I'm not sure what you mean when you say "I configure the port named EHCI HOST".  What defines this name?  We may need to get some help from the software team so please provide details of OS and drivers.

    Regards,
    Paul

  • Thank you very much Paul,

    I am using omap3530 evm  which has the port named "EHCI HOST" on it in the place where I insert the pen drive.I have windows xp in my computer and using CCS studio as IDE.

    usb serial transceiver is  configured to operate in DAT/SE0 mode.

    Yes I have done the mux set up as shown in Figure 23-19 of the TRM. USBHOST.TLL_CHANNEL_CONF_i[2:1] is set to 0x1, and USBHOST.TLL_CHANNEL_CONF_i[27:24] is set to 0x0.

    The steps I have followed is 

    1. Enable ohci , ehci controller clocks (both functional and interface clock)

    2. Enabled USBTLL clock (non of them are in idle mode)

    3. Done the mux set up as shown in Figure 23-19 of the TRM for USB serial transceiver configured to operate in DAT/SE0 signaling mode .

    4 Then I perform reset on transceiver by making low gpio1 out (GPIO1_OUT)  pin 21and made it high.

    5. UHH_SYSCONFIG  configuration and UHH_HOSTCONFIG  configuration 

                                        UHH_SYSCONFIG |= 0x1108;
                                        /* Bypass the TLL module for PHY mode operation */
                                        UHH_HOSTCONFIG |= 0x1F1D;

    6. Disable AutoIdle, BitStuffing and use SDR Mode in TLL_CHANNEL_CONF_1

    7. Enable the USBHOST.TLL_CHANNEL_CONF_1[2:1] by setting to 0x1, and USBHOST.TLL_CHANNEL_CONF_1[27:24] by setting to 0x0 and enabling the channel 

              USBHOST.TLL_CHANNEL_CONF_1[0] by 1.

    8. By default ConfigFlag in EHCI is 1 so I make it 0.

    9 Initialize the ohci controller  

    {

    /* USB Reset. */

    /* Waiting for 10 micro seconds. */

    usb_drv_device_data.pt_HC->ul_HcCommandStatus |= HC_CMDSTS_HCR; //(0x1<<0)
    MilliSleep();
    MilliSleep();

    while (usb_drv_device_data.pt_HC->ul_HcCommandStatus & (0x01));

    /* Initialising Host Controller Communications Area . */
    /* Aligned to 256 byte. */
    usb_drv_device_data.pt_HCCA = &usb_drv_t_ohci_hcca;

    /*
    * Initialising Base address of Host Controller
    * Communication Area(pt_HCCA). (256 Byte aligned)
    */
    usb_drv_device_data.pt_HC->ul_HcHCCA =
    (unsigned long) usb_drv_device_data.pt_HCCA;

    /* Initialising Frame Interval. */
    ul_frame_interval = FRAME_INTERVAL_DEFAULT_VALUE; //(0x1<<0)

    /* 90% of Frame interval Register, as per OHCI standard.*/
    usb_drv_device_data.pt_HC->ul_HcPeriodicStart = (ul_frame_interval * 9)
    / 10;

    ul_frame_interval |= ((((ul_frame_interval - 210) * 6) / 7) << 16);

    usb_drv_device_data.pt_HC->ul_HcFmInterval = ul_frame_interval;

    /* Initialising default low speed threshold value. */
    usb_drv_device_data.pt_HC->ul_HcLSThreshold =
    LOW_SPEED_THRESHOLD_DEFAULT_VALUE; //0x628

    }

    10. Then i do port power by 

           clearing the PSM bit in UHCRHDA

           set lpsc to enable global power mode in UHCRHS

           set lpsc to enable global power mode in UHCRHS making it operational.

    11 then poll for the device but as i attach the device the CurrentConnectStatus should go high but it does not.

    This is what I have done so far.

    I am using black hawk system trace debugger.

    Please assist me Paul

    Thanks and Regards,

    Akshay Cariappa

  • I'm confused.

    I assumed you had designed your own board with a 6-pin serial transceiver.  The OMAP3EVM does not have a 6-pin USB transceiver.  It only has two ULPI PHYs, one connected to the OTG controller and the other connected to the USB host.

    I'm not sure which board you are using.  You need to provide more details about the board you are using.

    Regards,
    Paul

  • Hi Paul,

                   Thank you so much for your patience,

    I didn't design my own board.I am using OMAP3530 Evaluation module .It has "OMAP EVM MAIN BOARD REV G " written on the board .It's a MISTRAL board. So it is OMAP3evm .It has a "HSUSB_OTG" port and another port named "EHCI host".

    1.Is it possible to configure ohci controller using this evm?

    2.Can HSUSB_OTG be used to communicate with FS/LS devices ?

    3.Is it possible to use EHCI host controller to work with FS/LS devices?

    Please tell me my options. I want to use the controller to communicate with FS?LS device now.

    Thanks & Regards,

    Akshay Cariappa.

  • 1. No, this board only has ULPI PHY connected to the USB Host which only works with EHCI.

    2. Yes, when using one of the supported OS with drivers for this port.

    3. Yes, but only if you insert a HS hub in the path.

    4. Insert a HS hub in the path or build your own board with a 6-pin transceiver connected to the USB Host.

    Regards,
    Paul

  • Thank you very much Paul,

                              I have 1 last question. OMAP3530 evm board has SMSC USB3320 transceiver in it. The data sheet of SMSC USB3320 ,in section "6.4 Full speed Low speed serial modes"  mentions that USB3320 includes two serial modes to support legacy links which use either the 3 pin or 6 pin serial format .To enter serial mode the link will need to write a 1 to 6 pin FSLSserialmode or the 3 pin FSLSserial mode bits in the interface control register. 

    I wanted the clarification on this Paul.

    Thanks & Regards,

    Akshay Cariappa

  • It has been a while since I have looked at this, but as I recall the OMAP35xx does not assign the 6-pin USB serial signals to the same terminals that are changed from ULPI signals to serial signals when you set this register.

    You can confirm this by finding the ULPI signal to serial signal assignments defined in the ULPI specification and compare this assignment to the signal assignments available in OMAP35xx.

    Regards,
    Paul 

  • Hi Paul,

                  The pinouts for the serial configurations were not matching between processor and the transceiver. The pinouts were swapped and the transmit
    enable has been inverted through external wire jumpers. Even then the transceiver did not respond.

    ISSUE

    The device gets detected even before the device is attached. But does not get enabled. So for the port to get enabled ,device has to be present in the port.After I insert the device I reset and enable the port by making usb operational and thus the port gets enabled . But here the FS device always gets detected as LS device and still the USB communication is not possible.

    Can you suggest me something?

    Thanks & Regards

    Akshay Cariappa .

  • Hi Paul,

                   "building your own board with a 6-pin transceiver connected to the USB Host" what did you mean by this?

    Did you mean that i can remove the existing transceiver and put other transceiver supported for FS/LS device?

                      With the hardware changes that I had mentioned to you in my previous response I was still not able to rout the port directly to OHCI but had to release the port from configuration register(EHCI reg) by setting it to 0. Is software Handoff To OHCI from EHCI and communication with USB device possible?

    Thanks & Regards,

    Akshay Cariappa

  • Hi Sir,

                               I am using Mistral OMAP 3530 evm board. As per the schematics  i have configured HSUSB2 for HS device. when I insert the pen drive it is getting recognized  in Port 1(there are 3 ports , port[0,1,20),however I am not able to access ULPI registers from port1. I am able to access it from PORT2. Hence I am not able to proceed as the port1 is not getting enabled after the reset(device is recognised in port1 but port1 is not enabled) . Can you please guide me on this?

    regards,

    Akshay Cariappa

  • The Mistral OMAP3 EVM has two ULPI PHYs.

    One is a ST Ericsson ISP1507 which is connected between the HSUSB0 (OTG controller) port and USB mini-AB connector P16.  The other is a SMSC USB3320 which connected between the HSUSB2 (Host Subsystem) port and USB series-A connector P18.

    In previous posts it sounds like you attempted to modify the board.  Has this board been modified?  If not, this sounds like this is a software issue or a mis-understand of how the software works.  Please answer the following questions and I will try to find a software person that can help.

    I assume you are connecting the pen drive to P18.  Is this correct?

    What operating system and revision are you using?

    How does this software indicate it sees a connection on port 1?

    How are you trying to access ULPI registers on port 1?

    How are you accessing ULPI registers on port 2?

    Regards,
    Paul

  • HI Paul,

                 1)In previous posts it sounds like you attempted to modify the board.  Has this board been modified?

                 I had made changes and reverted it back to the previous form.Now the board is in the same way I had received it.

                2) I assume you are connecting the pen drive to P18.  Is this correct?

                    No it is USB series-A connector J18.Have you confused with J18 to P18?

                3)What operating system and revision are you using?

                    I am not using any OS,I am writing my own drivers.I am using Blackhawk emulator.

               4)How does this software indicate it sees a connection on port 1?

                    when I connect the pen drive to USB_HOST(EHCI HOST) Port ,In the EHCI registers it shows it as port1 among port0,port1,port2. I am not connecting to OTG port.

              5)How are you trying to access ULPI registers on port 1?

                 I am trying to access ULPI registers from INSNREG05_ULPI in EHCI register set with Port 1 selected for register access.

            6)   How are you accessing ULPI registers on port 2?

                 I am trying to access ULPI registers from INSNREG05_ULPI in EHCI register set with Port 2 selected for register access.Totally there are Port 1 selected for register access,Port 2 selected for register access and Port 3 selected for register access in the INSNREG05_ULPI  register in EHCI .

    Regards,

    Akshay Cariappa.

  • Hi Paul,

                In INSNREG05_ULPI  using  PORTSEL=Port 2 selected for register access I am able to access the ULPI registers.In this I had made settings and tried for "Host High Speed" and "Host Chirp". With both these settings , after reset and enable , the port did not enable for High Speed Device(I have verified the device,its a High speed device.).

    As I have mentioned earlier I have configured HSUSB2 and in the EHCI registers Port[1] recognized the device attached.

    What am I missing,Kindly guide me in this issue.

    Best regards,

    Akshay Cariappa

  • Hi Paul,

                I tried with the windows Embedded CE6.0 Demo OS. But it could not recognize the pen drive.Kindly reply as soon as possible.

    Thanks & Regards,

    Akshay Cariappa.

  • I'm trying to find someone from the software team that can help answer your questions.

    Regards,
    Paul

  • Hi Paul,

                Any updates on the EHCI issue? Is it possible for you to share any source code related EHCI drivers in OMAP 3530.

    Best Regards,

    Akshay Cariappa.

  • Hello Paul,

                      How to program OTG in mistral omap3530 evm. There is no much information given about it in the Texas Instruments reference manual. Can you give me some insight on this ?

    Thanks & Regards

    Akshay Cariappa

  • Hi Paul,

                How to program OTG in mistral OMAP3530 evm.There is not much information given in "texas instruments reference manual" on developing drivers for OTG. Can you please provide me some insight on this .

    Thanks & Regards

    Akshay Cariappa