61. USB HS PHY controller (USBPHYC)

61.1 USBPHYC introduction

The USBPHYC block is in the context of a system containing:

The USBPHYC enables the control and observation of a 2 port high-speed USB PHY configuration and status, and the sharing of one of those ports between different controllers.

61.2 USBPHYC main features

61.3 USBPHYC functional description

The USB HS PHY control block

61.3.1 USBPHYC block diagram

The USBPHYC registers and main functions are shown in Figure 769: USBPHYC block diagram.

Figure 769. USBPHYC block diagram

Block diagram of the USBPHYC showing its internal components and external interfaces. The USBPHYC block contains a 32-bit APB bus interface, a Clock forwarding and division (including UTMI) block, a Registers block (containing USBPHYC_PLL, USBPHYC_MISC, USBPHYC_VERSION, USBPHYC_TUNE_PHY1, and USBPHYC_TUNE_PHY2), and a UTMI switch. It is connected to an RCC (reset and clock control) block which provides the primary clock for the HS PHY PLL. The USBPHYC also interfaces with a USB High Speed two port PHY block containing a PLL and Calibration block. The PHY block has two HS PHY ports (port #1 and port #2) connected to external pins: USBH_HS_DP1, USBH_HS_DM1, USBH_HS_DP2/OTG_HS_DP, and USBH_HS_DM2/OTG_HS_DM. The USBPHYC also interfaces with a USBH USB HOST EHCI and OHCI controller (2 ports) and an OTG OTG2.0 controller via UTMI+ lines. Control and status signals for the PLL, calibration, and both PHY ports are exchanged between the USBPHYC and the PHY block. A UTMI switch controls the connection between the PHY ports and the external controllers.
Block diagram of the USBPHYC showing its internal components and external interfaces. The USBPHYC block contains a 32-bit APB bus interface, a Clock forwarding and division (including UTMI) block, a Registers block (containing USBPHYC_PLL, USBPHYC_MISC, USBPHYC_VERSION, USBPHYC_TUNE_PHY1, and USBPHYC_TUNE_PHY2), and a UTMI switch. It is connected to an RCC (reset and clock control) block which provides the primary clock for the HS PHY PLL. The USBPHYC also interfaces with a USB High Speed two port PHY block containing a PLL and Calibration block. The PHY block has two HS PHY ports (port #1 and port #2) connected to external pins: USBH_HS_DP1, USBH_HS_DM1, USBH_HS_DP2/OTG_HS_DP, and USBH_HS_DM2/OTG_HS_DM. The USBPHYC also interfaces with a USBH USB HOST EHCI and OHCI controller (2 ports) and an OTG OTG2.0 controller via UTMI+ lines. Control and status signals for the PLL, calibration, and both PHY ports are exchanged between the USBPHYC and the PHY block. A UTMI switch controls the connection between the PHY ports and the external controllers.

MSv47350V3

61.3.2 USBPHYC reset and clocks

The USBPHYC is an APB peripheral. The USBPHYC logic is clocked directly by the PCLK4 clock of the APB bus interface. The registers are reset by the APB bus reset.

The list of other clocks available within the USBPHYC (not used for clocking the logic) is provided hereafter:

Input clocks (all coming from PLL section of the PHY):

Output clocks used for muxing with other options and gating (all going to the RCC):

61.3.3 PLL control

The PLL should normally be configured according to requirements before setting PLLEN=1.

The fractional division mode is not enabled by default. In order to use it PLLFRACCTL should first be set and then the fractional part of the division control can be configured using different possible methods.

With the first method, PLLSTRB should be kept high for at least two cycles of the PLL input clock because the loading of control bits occurs at FBCLK transition (and these transitions cannot be monitored). In addition, the control bits should be stable for at least 3 clock cycles of the input clock after asserting PLLSTRB.

With the second method PLLSTRB should be bypassed by setting PLLSTRBBYP = 1. In this case, the control bits PLLFRACCTL and PLLFRACIN need to be static. The control bits should be changed only when the PLL is in power-down mode (PLLEN=0).

The loading of the control bits using PLLSTRB can be done only when the PLL is in coarse lock state (LOCKP = 1). When PLLSTRBBYP is low, the fractional bits are reset as soon as the PLL is unlocked. To load the fractional control bits, PLLSTRB should be asserted only after the lock is achieved (after a delay of 100 micro seconds).

The recommended approach for fractional division is thus to set all controls to the required values and PLLSTRBBYP=1, before setting PLLEN=1 to start the PLL.

61.4 USBPHYC registers

61.4.1 USBPHYC PLL control register (USBPHYC_PLL)

This register is used to control the PLL of the HS PHY.

Address offset: 0x000

Reset value: 0xC000 0000

31302928272625242322212019181716
PLLDITHEN1PLLDITHEN0PLLFRACCTLPLLSTRBYPPLLSTRBPLLENPLLFRACIN[15:6]
rwrwrwrwrwrwrwrwrwrwrwrwrwrwrwrw
1514131211109876543210
PLLFRACIN[5:0]PLLODF[2:0]PLLNDIV[6:0]
rwrwrwrwrwrwrwrwrwrwrwrwrwrwrwrw

Bit 31 PLLDITHEN1: PLL dither 1 (rectangular)

This bit enables the rectangular dither for the PLL.

0: Enables the rectangular PDF dither input to SDM of PLL (not recommended)

1: Disables the rectangular PDF dither input to SDM of PLL

Bit 30 PLLDITHEN0: PLL dither 2 (triangular)

This bit enables the triangular dither for the PLL.

0: Enables the triangular PDF dither input to SDM of PLL (not recommended)

1: Disables the triangular PDF dither input to SDM of PLL

Bit 29 PLLFRACCTL: PLL fractional mode control

0: Fractional mode off

1: Fractional mode on

Bit 28 PLLSTRBYP: PLL strobe bypass

Bypass the strobe signal. If set to 1 before setting PLLEN=1, then the PLL will start up in fractional mode depending on the setting of PLLFRACCTL.

0: Do not bypass the strobe signal

1: Bypass the strobe signal

Bit 27 PLLSTRB: PLL strobe

This bit allows to control an asynchronous strobe signal provided as an input to the fractional controller. A rising edge of PLLSTRB signal indicates to the fractional controller that a new fractional word is to be loaded.

0: Strobe set to 0

1: Strobe set to 1

Bit 26 PLLEN: PLL enable

This bit enables the PLL.

0: PLL disabled

1: PLL enabled

Bits 25:10 PLLFRACIN[15:0]: PLL fractional input
PLLFRACIN is the fractional input of the PLL divider.

Bits 9:7 PLLODF[2:0]: PLL output division factor

Bits 6:0 PLLNDIV[6:0]: Loop division factor of PLL (integer part)

61.4.2 USBPHYC misc control register (USBPHYC_MISC)

This register is used to control the switch between controllers for the HS PHY.

Address offset: 0x008

Reset value: 0x0000 0000

31302928272625242322212019181716
Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.
1514131211109876543210
Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.PPCKDIS[1:0]SWITHOST
rwrw

Bits 31:3 Reserved, must be kept at reset value.

Bits 2:1 PPCKDIS[1:0]: Intelligent per HS PHY port clock gating control

This register is static.

0x0: No clock gating. PHY dedicated 60 MHz Port1/Port2 clocks are always delivered to target controller. PHY 48 MHz output clock is always delivered to target controller.

0x1: Intelligent clock gating for Port1. Port1 60 MHz input clock gated (Port1 is unused). Port2 dedicated 60 MHz is delivered in case of parallel data comm is requested on target controller (Host or OTG). PHY 48 MHz is delivered in case serial comm is requested on target controller (Host if SWITHOST = 1 else OTG).

0x2: Intelligent clock gating for Port2. Port2 60 MHz input clock gated (Port2 is unused). Port1 dedicated 60 MHz is delivered in case of parallel data comm is requested on target controller (Host). PHY 48 MHz is delivered in case serial comm is requested on target controller (Host if SWITHOST = 1 else OTG).

0x3: Intelligent clock gating for Port1 and Port2. Port1 dedicated 60 MHz is delivered in case of parallel data comm is requested on target (Host). Port2 dedicated 60 MHz is delivered in case of parallel data comm is requested on target (Host if SWITHOST = 1 else OTG). PHY 48 MHz output clock is delivered in case serial comm is requested on target controller (Host or OTG).

Bit 0 SWITHOST: Switch host

Controls main switch connecting USB PHY 2nd port between USB host controller and USB OTG controller. This register is static.

0: Select OTG controller for 2nd PHY port

1: Select Host controller for 2nd PHY port

61.4.3 USBPHYC PHY x MONITOR register (USBPHYC_MONITORx)

This register is used to control and monitor the debug interface of the HS PHY, port #x.

Address offset: 0x108+0x100*(x-1), (x = 1 to 2)

Reset value: 0x0000 000X

31302928272625242322212019181716
Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.
1514131211109876543210
Res.Res.Res.Res.Res.Res.Res.MON_SEL[4:0]LOCKPRes.Res.Res.
rwrwrwrwrwr

Bits 31:9 Reserved, must be kept at reset value.

Bits 8:4 MON_SEL[4:0]: Choice of debug output

31: Enable lock bit visibility

Others: Reserved

Bit 3 LOCKP: PLL lock visibility (when MON_SEL is set to 31)

Bits 2:0 Reserved, must be kept at reset value.

61.4.4 USBPHYC PHY x TUNE register (USBPHYC_TUNEx)

This register is used to control the tune interface of the HS PHY, port #x.

Address offset: 0x10C + 0x100 * (x-1), (x = 1 to 2)

Reset value: 0x0407 0004

31302928272625242322212019181716
Res.Res.Res.Res.STAGSELSHTCCTCTLPROTHSFALLPREEMHSRXOFF[1:0]HDRXGNEQENSQLCHCTL[1:0]OTPCOMP[4:1]
rwrwrwrwrwrwrwrwrwrwrwrw
1514131211109876543210
OTP COMP [0]HSDRVCHKZTRM[1:0]HSDRVCHKITRM[3:0]HSDRVRFREDFSDRVRFADJHSDRVCURINCRHSDRVDCLEVHSDRVDCURHSDRVSLEWLFSCAPENINCURRINTINCURREN
rwrwrwrwrwrwrwrwrwrwrwrwrwrwrwrw

Bits 31:28 Reserved, must be kept at reset value.

Bit 27 STAGSEL: Staggering selection

This bit enables the HS Tx staggering.

0: Disable the basic staggering in HS Tx mode

1: Enable the basic staggering in HS Tx mode

Bit 26 SHTCCTCTLPROT: Short circuit control protection

This bit enables the short circuit protection circuitry in LS/FS driver.

0: Short circuit protection disabled

1: Short circuit protection enabled

Bit 25 HSFALLPREEM: HS fall time pre-emphasis

This bit enables the HS fall time control of single ended signals during pre-emphasis:

0: Control On

1: Control Off

Bits 24:23 HSRXOFF[1:0]: HS receiver offset adjustment

0x0: No offset

0x1: Offset +5 mV

0x2: Offset +10 mV

0x3: Offset -5 mV

Bit 22 HDRXGNEQEN: Enable HS Rx gain equalizer

0: Disable the gain equalizer

1: Enable the gain equalizer

61.4.5 USBPHYC VERSION register (USBPHYC_VERR)

This register defines the version of this IP.

Address offset: 0xFFC

Reset value: 0x0000 0010

column_1column_2Bit 4 Bit 3 Bit 2 Bit 1 Bit 0LFSCAPEN INCURRINT INCURREN:HSDRVDCCUR HSDRVSLEWcolumn_6column_7column_8column_9column_10column_11column_12column_13column_14column_15RM0436
31302928272625242322212019181716
Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.
1514131211109876543210
Res.Res.Res.Res.Res.Res.Res.Res.MAJREV[3:0]MINREV[3:0]
rrrrrrrr
Bits 7:4MAJREV[3:0]: Major revision
Bits 3:0MINREV[3:0]: Minor revision

Bits 31:8 Reserved, must be kept at reset value.

Bits 7:4 MAJREV[3:0]: Major revision

Bits 3:0 MINREV[3:0]: Minor revision

61.4.6 USBPHYC register map

Table 488. USBPHYC register map and reset values

Packet typeHardwareIP header checksum checking
Offset Register Name 31 3 0 2 9 2 8 2 7 2 6 2 5 2 4 2 3 2 2 21 2 0 19 1817 16 15 14 13 12 1 1 10 9 8 7 6 5 4 3 2 1 0
USBPHYC_PLL PLLFRACIN[15:0]PLLNDIV[6:0]
C C P L L F R A T
P L L DIT H E N 0
S P L L T R B
S P L L T R B Y P
LO P L D F[2:0]
P L L E N
P L L DIT H E N1
R e s.
R e s.
R e s.
R e s.
R e s.
R e s.
R e s.
R e s.
R e s.
R e s.
R e s.
R e s.
R e s.
R e s.
Re s.
R e s.
R e s.
R e s .
R e s.
R e s.
R e s.
R e s.
R e s.
R e s.
R e s.
R e s.
R e s.
R e s.
R e s.
R e s.
R e s.
R e s.
R e s.
C DIS[1:0] P P K
O SWIT H S T
R e s.
R e s.
R e s.
R e s.
R e s.
R e s.
R e s.
R e s.
R e s.
R e s.
R e s.
R e s.
R e s.
Re s.
R e s.
R e s.
R e s .
R e s.
R e s.
R e s.
R e s.
R e s.
R e s.
R e s.
R e s.
R e s.
R e s.
R e s.
R e s.
R e s.
R e s.
R e s.
R e s.
R e s.
R e s.
R e s.
R e s.
R e s.
R e s.
R e s.
R e s.
R e s.
R e s.
Re s.
R e s.
R e s.
R e s .
R e s.
R e s.
R e s.
R e s.
R e s.
R e s.
R e s.
R e s.
R e s.
R e s.
R e s.
R e s.
R e s.
R e s.
R e s.
LO C K P
MONITOR1 R e s. R e s. R e s. R e s. R e s. R e s. R e s. R e s. R e s. R e s. R e s. R e s. R e s. Re s.R e s. R e s. R e s . R e s. R e s. R e s. R e s. R e s. R e s. [4:0] R e s. R e s. R e s.
Reset value00000X
H S D R V D CL E V
IN C U R RIN T
H S D R V S L EW
S C C H D R V U RIN R
H S D R V D C C U R
S OF H R X F[1:0]
S C C C O H T T T L P R T
S C H D R V H K Z T R M[1:0]
S C H D R V H KIT R M[3:0]
S H D R V R F R E D
IN C U R R E N
S H FAL L P R E E M
G Q H D R X N E E N
S F D R V R FA DJ
L F S C A P E N
S G S T A E L
S QLC C L[1:0] H T
R e s.
R e s.
R e s.
R e s.
R e s.
R e s.
R e s.
R e s.
R e s.
R e s.
R e s.
R e s.
R e s.
R e s.
R e s.
R e s.
R e s.
R e s.
Re s.
R e s.
R e s.
R e s .
R e s.
R e s.
R e s.
R e s.
R e s.
R e s.
R e s.
R e s.
R e s.
R e s.
R e s.
R e s.
R e s.
R e s.
R e s.
LO C K P
MONITOR2 R e s. R e s. R e s. R e s. R e s. R e s. R e s. R e s. R e s. R e s. R e s. R e s. R e s. Re s.R e s. R e s. R e s . R e s. R e s. R e s. R e s. R e s. R e s. [4:0] R e s. R e s. R e s.
Reset value00000X
H S D R V S L EW
IN C U R RIN T
S C C H D R V U RIN R
H S D R V D C C U R
H S D R V D CL E V
S C C C O H T T T L P R T
S H D R V R F R E D
IN C U R R E N
S C H D R V H K Z T R M[1:0]
S G S T A E L
S C H D R V H KIT R M[3:0]
S H FAL L P R E E M
G Q H D R X N E E N
S OF H R X F[1:0]
S F D R V R FA DJ
L F S C A P E N
R e s.
R e s.
R e s.
R e s.
S QLC C L[1:0] H T
R e s.
R e s.
R e s.
R e s.
R e s.
R e s.
R e s.
R e s.
R e s.
R e s.
R e s.
R e s.
R e s.
R e s.
Re s.
R e s.
R e s.
R e s .
R e s.
R e s.
R e s.
R e s.
R e s.
R e s.
R e s.
R e s.
R e s.
R e s.
R e s.
R e s.
R e s.
R e s.
R e s.

Table 488. USBPHYC register map and reset values (continued)

OffsetRegister Name313029282726252423222120191817161514131211109876543210
0xFFCUSBPHYC_VERRResResResResResResResResResResResResResResResResResResResResResResResResMAJREV[3:0]MINREV[3:0]
Reset value00010000

Refer to Section 2.5 on page 159 for the register boundary addresses.