Functional Description
16.3.3 Role Assuming Method
For an OTG controller, the usual method followed by the controller to assume the role of a host or a
device is governed by the state of the ID pin which in turn is controlled by the USB cable connector type.
The device has bonded out these ID pins and allows the control to be handled directly from the connector,
i.e. the USB controller would assume the role based on the cable end inserted to the mini or micro A/B
connector. An alternate method where the ID pin signal is bypassed and the firmware controls the role the
controller assumes exists via register access allowing additional control for systems that do not require the
use of the USB ID pin. In this case the USBnMODE [Bit7=IDDIG_MUX] needs to be programmed with a
value of 1 so that Register programming will be used.
Two registers, USB0 Mode Register at offset 10E8h and USB1 Mode Register at offset 18E8h, are used
for a user to select the role the USB controller assumes. The user is required to program the
corresponding register prior to the USB controller is in session.
16.3.4 Clock, PLL, and PHY Initialization
Prior to configuring the USB Module Registers, the USB SubSystem and PHY are required to be released
from reset, enable interconnects and controllers clocks as well as configure the USB PHY with appropriate
setting. Not all registers related for this task are captured within this document. Please refer to the PRCM
for clocking and Control Module for PHY configuration registers definitions.
16.3.5 Indexed and Non-Indexed Register Spaces
The USB controller provides two mechanisms for accessing endpoint control and status registers; Indexed
and Non-Indexed method.
Indexed Endpoint Control/Status Register Space. This register space can be thought of as a region
populated with Proxy Registers. This register space is a memory-mapped region at offset 1410h to 141Fh
for USB0 and 1C10h to 1C1Fh for USB1. The endpoint register space mapped at this region is selected
by programming the corresponding INDEX register (@ offsets 140Eh and 1C0Eh for USB0 and USB1
respectively) of the controller.
By programming the INDEX register with the corresponding endpoint number, the control and status
register corresponding to that particular endpoint is accessible from this Indexed Region. In other words,
Index Register region behaves as a proxy to access a selected endpoint registers.
Non-indexed Endpoint Control/Status Register Space. These regions are dedicated endpoint registers
memory-mapped residing at offsets 1500h to 16FFh for USB0 and 1D00h to 1EFFh for USB1. Registers
at offset 1500h to 150Fh belong to Endpoint 0; registers at offset 1510h to 151Fh belong to Endpoint 1…
and lastly registers at offset 16F0h to 16FFh belong to Endpoint 15 for USB0. Similarly registers at offset
1D00h to 1E0Fh belong to Endpoint 0; registers at offset 1D10h to 1D1Fh belong to Endpoint 1… and
finally registers at offset 1DF0h to 1DFFh belong to Endpoint 15 for USB1.
This allows the user/firmware to access an endpoint register region directly from its unique space, as
specified within a non-indexed region or from a proxy space by programming the corresponding Index
register.
Note: The control and status registers/regions apply to both Tx and Rx of a given Endpoint. That is,
Endpoint 1 Tx and Endpoint 1 Rx registers occupy the same register space.
For detailed information about the USB controller registers, see
.
16.3.6 Dynamic FIFO Sizing
Each USB module supports a total of 32K bytes of FIFO RAM to dynamically allocate FIFO to all
endpoints in use. Each endpoint requires a FIFO to be associated with it. There is one set of register per
endpoint available for FIFO allocation, excluding endpoint 0. FIFO configuration registers are Indexed
registers and cannot be accessed directly; configuration takes place via accessing proxy registers. The
INDEX register at addresses 140Eh or 1C0Eh must be set to the appropriate endpoint. In other words, the
Endpoint FIFO configuration registers do not have non-indexed regions.
The allocation of FIFO space to the different endpoints requires programming for each Tx and Rx endpoint
with the following information:
1698
Universal Serial Bus (USB)
SPRUH73H – October 2011 – Revised April 2013
Copyright © 2011–2013, Texas Instruments Incorporated