Freescale Semiconductor MCF5329 Reference Manual page 472

Devices supported: mcf5327; mcf5328; mcf53281; mcf5329
Table of Contents

Advertisement

Universal Serial Bus Interface – On-The-Go Module
Field
31
ULPI wake-up. Setting this bit begins the wake-up operation. This bit automatically clears after the
ULPI_WU
wake-up is complete. After this bit is set, it can not be cleared by software.
Note: The driver must never execute a wake-up and a read/write operation at the same time.
30
ULPI run. Setting this bit begins a read/write operation. This bit automatically clears after the read/write is
ULPI_RUN
complete. After this bit is set, it can not be cleared by software.
Note: The driver must never execute a wake-up and a read/write operation at the same time.
29
Read/write. Selects between running a read or write operation to the ULPI.
ULPI_RW
0 Read
1 Write
28
Reserved, should be cleared.
27
Sync state. Represents the state of the ULPI interface. Before reading this bit, the ULPI_PORT field should
ULPI_SS
be set accordingly if used with the multi-port host. Otherwise, this field should always remain 0.
0 Any other state (that is, carkit, serial, low power).
1 Normal sync state.
26–24
Port number. For wake-up or read/write operations this value selects the port number to which the ULPI
ULPI_PORT
PHY is attached. Valid values are 0 and 1.
23–16
Data address. When a read or write operation is commanded, the address of the operation is written to
ULPI_ADDR
this field.
15–8
Data read. After a read operation completes, the result is placed in this field.
ULPI_DATRD
7–0
Data write. When a write operation is commanded, the data to be sent is written to this field.
ULPI_DATWR
There are two operations that can be performed with the ULPI viewport, wake-up and read/write
operations. The wake-up operation is used to put the ULPI interface into normal operation mode and
re-enable the clock if necessary. A wake-up operation is required before accessing the registers when the
ULPI interface is operating in low power mode, serial mode, or carkit mode. The ULPI state can be
determined by reading the sync state bit (ULPI_SS). If this bit is set, then the ULPI interface is running in
normal operating mode and can accept read/write operations. If ULPI_SS is cleared, then read/write
operations are not executed. Undefined behavior results if a read or write operation is performed when
ULPI_SS is cleared. To execute a wake-up operation, write all 32-bits of the ULPI VIEWPORT where
ULPI_PORT is constructed appropriately and the ULPI_WU bit is set and the ULPI_RUN bit is cleared.
Poll the ULPI VIEWPORT until ULPI_WU is cleared for the operation to complete.
To execute a read or write operation, write all 32-bits of the ULPI VIEWPORT where ULPI_DATWR,
ULPI_ADDR, ULPI_PORT, ULPI_RW are constructed appropriately and the ULPI_RUN bit is set. Poll
the ULPI VIEWPORT until ULPI_RUN is cleared for the operation to complete. For read operations,
ULPI_DATRD is valid after ULPI_RUN is cleared.
The polling method above can be replaced with interrupts using the ULPI interrupt defined in the USBSTS
and USBINTR registers. When a wake-up or read/write operation completes, the ULPI interrupt is set.
21-30
Table 21-29. ULPI VIEWPORT Field Descriptions
MCF5329 Reference Manual, Rev 3
Description
Freescale Semiconductor

Advertisement

Table of Contents
loading

Table of Contents