跳到主要内容

14.2 USB

14.2.1 Overview​

The K3 SoC integrates multiple USB interfaces to support high-speed connectivity and flexible device configurations. The USB subsystem includes the following ports:

  • One USB 2.0 Host Port.
  • One USB 3.0 DRD (Dual-Role Device) Port with an integrated USB 2.0 DRD interface (USB 3.0 Port A).
  • Three USB 3.0 Host Ports (USB 3.0 Port B/C/D) — their SuperSpeed PHYs are shared with PCIe and can operate in either USB or PCIe mode, but only one function can be selected at a time.

14.2.2 Features​

14.2.2.1 USB 2.0 Host Port Key Features​

  • Supports High-Speed (480 Mbps), Full-Speed (12 Mbps), and Low-Speed (1.5 Mbps) operation.
  • Dedicated UTMI+ PHY interface.
  • Provides a VBUS_DRV pin for controlling external VBUS power supply.
  • Supports operation as a system wake-up source.

14.2.2.2 USB 3.0 DRD Port (Port A) Key Features​

  • Supports SuperSpeed (5 Gb/s), High-Speed (480 Mb/s), Full-Speed (12 Mb/s), and Low-Speed (1.5 Mb/s, Host mode only).
  • Supports Dual-Role Device (DRD) operation, enabling both Host and Device modes.
    • USB 2.0 Low-Speed is supported in Host mode only.
  • Dedicated USB 2.0 UTMI+ PHY interface, configurable for USB 2.0-only mode.
  • Dedicated dual USB 3.0 SuperSpeed PIPE3 PHY interfaces, with an integrated Type-C orientation switch, configurable via hardware GPIO or software.
  • Provides:
    • A VBUS_DRV pin for controlling external VBUS power supply;
    • Sideband pins for interfacing with a Type-C CC logic device.
  • In Device mode, supports connection and disconnection detection via the VBUS_ON pin.
  • Supports operation as a system wake-up source.

14.2.2.3 USB 3.0 Host Ports (Port B / C / D) Key Features​

  • Supports SuperSpeed (5 Gb/s), High-Speed (480 Mb/s), Full-Speed (12 Mb/s), and Low-Speed (1.5 Mb/s) operation.
  • Dedicated UTMI+ PHY interface, configurable for USB 2.0-only mode.
  • Shares a USB 3.0 SuperSpeed / PCIe Combo PHY, selectable between USB 3.0 and PCIe interfaces.
  • Provides a VBUS_DRV pin for controlling external VBUS power supply.
  • Supports operation as a system wake-up source.

14.2.3 Block Diagram​

14.2.4 Sideband IO for USB​

  • USB20_HOST_DRV: For External VBUS Switch Control of USB2.0 Host Only Controller, controlled by PMU_USB_SD_ROT_WAKE_CLR, or use GPIO mode.
  • USB30_DRD_DIR: For DRD Port A Dual PHY Direction select Input, controlled by PMUA_USB_PHY_CTRL0 register.
  • USB30_DRD_INT: For Type-C CC logic chip interrupt Input, controlled by PMUA_USB_PHY_CTRL0, or use GPIO interrupt mode.
  • USB30_DRD_DRV: For External VBUS Switch Control of USB3.0 Port A Controller, controlled by PMU_USB3_WAKE_CLR_A, or use GPIO mode.
  • USB30_DRD_ID: For MicroUSB ID Pin Input, the status could be read at PMUA_USB_PHY_READ register.
  • USB30_DRD_VBUSON: For MicroUSB VBUS Pin Input, the status could be read at PMUA_USB_PHY_READ register.
  • USB30_B_DRV/USB30H-1_DRV: For External VBUS Switch Control of USB3.0 Port B Controller, controlled by PMU_USB3_WAKE_CLR_B, or use GPIO mode.
  • USB30_C_DRV/USB30H-2_DRV: For External VBUS Switch Control of USB3.0 Port C Controller, controlled by PMU_USB3_WAKE_CLR_C, or use GPIO mode.
  • USB30_D_DRV: For External VBUS Switch Control of USB3.0 Port D Controller, controlled by PMU_USB3_WAKE_CLR_D, or use GPIO mode.

14.2.5 Interrupt List​

Interrupt NumberDescription
105USB2.0 Host Only Controller
155USB2.0 Host Only Controller Sideband
118USB3.0 DRD Port A Controller
156USB3.0 DRD PortA Controller Sideband
125USB3.0 Host Only Port B Controller
157USB3.0 Host Only Port B Controller Sideband
148USB3.0 Host Only Port C Controller
158USB3.0 Host Only Port C Controller Sideband
149USB3.0 Host Only Port D Controller
159USB3.0 Host Only Port D Controller Sideband

14.2.6 Register Descriptions​

14.2.6.1 Power Management Registers​

PMU_USB_CLK_RES_CTRL​

Base: 0xd4282800 Offset: 0x5C

BitsFieldTypeResetDescription
31:20RSVDRO0Reserved for future use
19USB3_PORTD_PHY_RESETNRW0x0phy_resetn 1: de-assert
18USB3_PORTD_VCC_RESETNRW0x0usb3_0_vcc_resetn
17USB3_PORTD_AHB_RSTNRW0x0usb3_0_ahb_rstn
16USB3_PORTD_BUS_CLK_ENRW0x0usb3_0_bus_clk_en 1=enable
15USB3_PORTC_PHY_RESETNRW0x0phy_resetn 1: de-assert
14USB3_PORTC_VCC_RESETNRW0x0usb3_0_vcc_resetn
13USB3_PORTC_AHB_RSTNRW0x0usb3_0_ahb_rstn
12USB3_PORTC_BUS_CLK_ENRW0x0usb3_0_bus_clk_en
11USB3_PORTB_PHY_RESETNRW0x0phy_resetn 1: de-assert
10USB3_PORTB_VCC_RESETNRW0x0usb3_0_vcc_resetn
9USB3_PORTB_AHB_RSTNRW0x0usb3_0_ahb_rstn
8USB3_PORTB_BUS_CLK_ENRW0x0usb3_0_bus_clk_en
7USB3_PORTA_PHY_RESETNRW0x0phy_resetn 1: de-assert
6USB3_PORTA_VCC_RESETNRW0x0usb3_0_vcc_resetn
5USB3_PORTA_AHB_RSTNRW0x0usb3_0_ahb_rstn
4USB3_PORTA_BUS_CLK_ENRW0x0usb3_0_bus_clk_en
3USB2_PORT_PHY_RESETNRW0x0phy_resetn 1: de-assert
2USB2_PORT_VCC_RESETNRW0x0usb3_0_vcc_resetn
1USB2_PORT_AHB_RSTNRW0x0usb3_0_ahb_rstn
0USB2_PORT_BUS_CLK_ENRW0x0usb3_0_bus_clk_en

PMU_USB_SD_ROT_WAKE_CLR​

Base: 0xd4282800 Offset: 0x7C

Wakeup control register and Vbus Drv Register for USB2.0 Host Port.

BitsFieldTypeResetDescription
31USB_WK_INT_STATUSRO0x0USB Wake up status
30:29RSVDRO0Reserved for future use
28USB_CHGDET_WK_STATUSRO0x0USB Line charge detect wake up status
27USB_ID_WK_STATUSRO0x0USB Line ID wake up status
26USB_VBUS_WK_STATUSRO0x0USB Line vbus valid wake up status
25USB_LINE1_WK_STATUSRO0x0USB Line state1 wake up status
24USB_LINE0_WK_STATUSRO0x0USB Line state0 wake up status
23USB_IDDIG_OVRD_VALUERO0x0USB IDDIG OVERRIDE VALUE
22USB_IDDIG_OVRD_ENRO0x0USB IDDIG OVERRIDE ENABLE
21USB_VBUS_DRVRW0x0USB VBUS DRV
20USB_CHGDET_WK_CLRRW0x0USB Line charge detect wake up Clear
1 = Clear
This bit is self-cleared by hardware
19USB_ID_WK_CLRRW0x0USB Line ID wake up Clear
1 = Clear
This bit is self-cleared by hardware
18USB_VBUS_WK_CLRRW0x0USB Line vbus valid wake up Clear
1 = Clear
This bit is self-cleared by hardware
17USB_LINE1_WK_CLRRW0x0USB Line state1 wake up Clear
1 = Clear
This bit is self-cleared by hardware
16USB_LINE0_WK_CLRRW0x0USB Line state0 wake up Clear
1 = Clear
This bit is self-cleared by hardware
15USB_WK_INT_MASKRW0x0USB Wakeup Interrupt Enable
1 = Enable
14:13RSVDRO0Reserved for future use
12USB_CHGDET_WK_MASKRW0x0USB Line charge detect wake up Enable
1 = Enable
11USB_ID_WK_MASKRW0x0USB Line ID wake up Enable
1 = Enable
10USB_VBUS_WK_MASKRW0x0USB Line vbus valid wake up Enable
1 = Enable
9USB_LINE1_WK_MASKRW0x0USB Line state1 wake up Enable
1 = Enable
8USB_LINE0_WK_MASKRW0x0USB Line state0 wake up Enable
1 = Enable
7CS_WK_STATUSRO0x0CS wake up status
6SDH2_WK_CLRRW0x1SDH2 Wake Clear
1 = SDH2 wake event clear
This bit is self-cleared by hardware
5CS_WK_CLRRW0x0Clear of dap Power Wake Up Request (DAP CSYSPWRUPREQ)
1 = Clear DAP_REQ wakeup
4CS_WK_MASKRW0x0Dap Power Wake Up Enable (DAP CSYSPWRUPREQ)
1 = Enable
3KB_WK_CLRRW0x1Keypad Wake Clear
1 = ROT wake event clear
This bit is self-cleared by hardware
2ROT_WK_CLRRW0x1Rotary Wake Clear
1 = ROT wake event clear
This bit is self-cleared by hardware
1SDH1_WK_CLRRW0x1SDH1 Wake Clear
1 = SDH1 wake event clear
This bit is self-cleared by hardware
0SDH0_WK_CLRRW0x1SDH0 Wake Clear
1 = SDH0 wake event clear
This bit is self-cleared by hardware

PMU_USB3_WAKE_CLR_A/B/C/D​

Base: 0xd4282800 Offset:0x3C4/0x3C8/0x3CC/0x3D0

Wakeup control register and Vbus Drv Register for USB3.0 DRD PortA, USB3.0 Host Only Port B/C/D.

BitsFieldTypeResetDescription
31USB3_WK_INT_STATUSRO0x0USB3 Wake up status
30RSVDRO0Reserved for future use
29USB3_LFPS_WK_STATUSRO0x0USB3 LFPS wake up status
28USB3_CHGDET_WK_STATUSRO0x0USB3 Line charge detect wake up status
27USB3_ID_WK_STATUSRO0x0USB3 Line ID wake up status
26USB3_VBUS_WK_STATUSRO0x0USB3 Line vbus valid wake up status
25USB3_LINE1_WK_STATUSRO0x0USB3 Line state1 wake up status
24USB3_LINE0_WK_STATUSRO0x0USB3 Line state0 wake up status
23USB3_IDDIG_OVRD_VALUERO0x0USB3 IDDIG OVERRIDE VALUE
22USB3_IDDIG_OVRD_ENRO0x0USB3 IDDIG OVERRIDE ENABLE
21USB3_VBUS_DRVRW0x0USB3 VBUS DRV
20USB3_CHGDET_WK_CLRRW0x0USB3 Line charge detect wake up Clear
1 = Clear
This bit is self-cleared by hardware
19USB3_ID_WK_CLRRW0x0USB3 Line ID wake up Clear
1 = Clear
This bit is self-cleared by hardware
18USB3_VBUS_WK_CLRRW0x0USB3 Line vbus valid wake up Clear
1 = Clear
This bit is self-cleared by hardware
17USB3_LINE1_WK_CLRRW0x0USB3 Line state1 wake up Clear
1 = Clear
This bit is self-cleared by hardware
16USB3_LINE0_WK_CLRRW0x0USB3 Line state0 wake up Clear
1 = Clear
This bit is self-cleared by hardware
15USB3_WK_INT_MASKRW0x0USB3 Wakeup Interrupt Enable
1 = Enable
14USB3_LFPS_WK_CLRRW0x0USB3 LFPS wake up Clear
1 = Clear
This bit is self-cleared by hardware
13USB3_LFPS_WK_MASKRW0x0USB3 LFPS wake up Enable
1 = Enable
12USB3_CHGDET_WK_MASKRW0x0USB3 Line charge detect wake up Enable
1 = Enable
11USB3_ID_WK_MASKRW0x0USB3 Line ID wake up Enable
1 = Enable
10USB3_VBUS_WK_MASKRW0x0USB3 Line vbus valid wake up Enable
1 = Enable
9USB3_LINE1_WK_MASKRW0x0USB3 Line state1 wake up Enable
1 = Enable
8USB3_LINE0_WK_MASKRW0x0USB3 Line state0 wake up Enable
1 = Enable
7:0RSVDRO0x0RSVD

PMUA_USB_PHY_READ​

Base: 0xd4282800 Offset: 0x118

BitsFieldTypeResetDescription
31:30RSVDRO0x0RSVD
29USB3_PORT_RSVDRO0x0RSVD
28USB3_PORT_RX_ELEC_DLERO0x0USB3_PORT RxELEC_DLE output
27:26USB3_PORT_PHY_LINE_STATERO0x0USB3_PORT PHY line_state [1:0] output
25USB3_PORT_PHY_VBUS_VALIDRO0x0USB3_PORT PHY VbusValid output. Tie to 0
24USB3_PORT_PHY_ID_DIGRO0x0USB3_PORT PHY ID DIG output. Tie to 1
23USB3_PORT_RSVDRO0x0RSVD
22USB3_PORT_RX_ELEC_DLERO0x0USB3_PORT RxELEC_DLE output
21:20USB3_PORT_PHY_LINE_STATERO0x0USB3_PORT PHY line_state [1:0] output
19USB3_PORT_PHY_VBUS_VALIDRO0x0USB3_PORT PHY VbusValid output. Tie to 0
18USB3_PORT_PHY_ID_DIGRO0x0USB3_PORT PHY ID DIG output. Tie to 1
17USB3_PORT_RSVDRO0x0RSVD
16USB3_PORT_RX_ELEC_DLERO0x0USB3_PORT RxELEC_DLE output
15:14USB3_PORT_PHY_LINE_STATERO0x0USB3_PORT PHY line_state [1:0] output
13USB3_PORT_PHY_VBUS_VALIDRO0x0USB3_PORT PHY VbusValid output. Tie to 0
12USB3_PORT_PHY_ID_DIGRO0x0USB3_PORT PHY ID DIG output. Tie to 1
11USB3_PORTA_TYPECNTRO0x0USB3_PORTA TYPECNT input from GPIO
10USB3_PORTA_RX_ELEC_DLERO0x0USB3_PORTA RxELEC_DLE output
9:8USB3_PORTA_PHY_LINE_STATERO0x0USB3_PORTA PHY line_state [1:0] output
7USB3_PORTA_PHY_VBUS_VALIDRO0x0USB3_PORTA PHY VbusValid output
6USB3_PORTA_PHY_ID_DIGRO0x0USB3_PORTA PHY ID DIG output
5:4USB3_PORT_RSVDRO0x0RSVD
3:2USB2_PORT_PHY_LINE_STATERO0x0USB2_PORT PHY line_state[1:0] output
1USB2_PORT_PHY_VBUS_VALIDRO0x0USB2_PORT PHY VbusValid output. Tie to 0
0USB2_PORT_PHY_ID_DIGRO0x0USB2_PORT PHY ID DIG output. Tie to 1

PMUA_USB_PHY_CTRL0​

Base: 0xd4282800 Offset: 0x110

BitsFieldTypeResetDescription
31:20RSVDRO0x0Reserved for future use
19USB_TYPEC_WAKEUP_INTRO0x0usb_typec_wakeup_int
18USB_TYPEC_INT_DEBRO0x0usb_typec_int_deb
17USB_TYPEC_DIR_STATUSRO0x0usb_typec_dir_status
16USB_TYPEC_DIR_DEBRO0x0usb_typec_dir_deb
15:12RSVDRO0x0Reserved for future use
11USB_TYPEC_INT_WAKEUP_INT_MASKRW0x0usb_typec_int_wakeup_int_mask
10USB_TYPEC_INT_CLRRW0x0usb_typec_int_clr
9USB_TYPEC_INT_WAKEUP_MASKRW0x0usb_typec_int_wakeup_mask
8USB_TYPEC_INT_RISE_MASKRW0x0usb_typec_int_rise_mask
7USB_TYPEC_INT_FALL_MASKRW0x0usb_typec_int_fall_mask
6:5USB_TYPEC_INT_DEB_CFGRW0x0usb_typec_int_deb_cfg
4USB_TYPEC_DIR_OVRD_VALRW0x0usb_typec_dir_ovrd_val.
This is valid to choose from phy8/phy9 only when usb_typec_dir_ovrd_en is 1b.
3USB_TYPEC_DIR_OVRD_ENRW0x0usb_typec_dir_ovrd_en.
1b: will choose phy8/phy9 according to usb_typec_dir_ovrd_val.
0b: will choose phy8/phy9 according to USB30_DRD_DIR Pin Input.
2USB_TYPEC_DIR_FLIPRW0x0usb_typec_dir_flip.
1b: will flip selection result of phy8/phy9 based on USB30_DRD_DIR input.
1:0USB_TYPEC_DIR_DEB_CFGRW0x0usb_typec_dir_deb_cfg

PCIE_SUBSYS_MGMT​

Base: 0xd4282800 Offset: 0x1D8

To select USB mode for Combo PHY, BIT 4 of PCIE_SUBSYS_MGMT must set to 1b.

BitsFieldTypeResetDescription
31:24RSVDRO0x0Reserved for future use
23:16PCIE_USB_MEM_LPW_DSLP_MASKRW0xffPCIe USB Subsystem Memory Low Power program:
pcie_usb_mem_lpw [7:0] is top DSLP's mask signal of memory in each controller (PCIe A to E and USB B to D).
When it is cleared to 0, the DSLP signal of this controller memory is not controlled by the app_top.
15:11RSVDRO0x0Reserved for future use
10PCIE_USB_MEM_LPW_SDRW0x0PCIe USB Subsystem Memory Low Power program:
pcie_usb_mem_lpw [8] is shut down of memory
9:8PCIE_EMAC_PTP_SRC_SELRW0x0PCIe EMAC PTP Source Selection
00: Disable.
01: EMAC0.
10: EMAC1.
11: EMAC2.
7:5PCIE_IOMMU_BYPASSRW0x7PCIe Controller A, B and C IOMMU bypass.
[5]: PortA.
[6]: PortB.
[7]: PortC.
4:0PCIE_USB_COMBO_MODERW0x0PHY Matrix Configuration
[4] PCIe Controller A X8:
1: Non X8, 0: PCIe A X8
[3] PCIe Controller B X2:
1: PCIe B X2, 0: PCIe A X4
[2] PCIe Controller C X1:
1: USB, 0: PCIe
[1] PCIe Controller C X1:
1: USB, 0: PCIe
[0] PCIe Controller D X1:
1: USB, 0: PCIe

14.2.6.2 USB2 PHY Registers​

Base AddressDescription
0xC0A20000USB2.0 Host UTMI registers
0xCAD20000USB3 Port A UTMI registers
0x81500000USB3 Port B UTMI registers
0x81800000USB3 Port C UTMI registers
0x81B00000USB3 Port D UTMI registers

USB2PHYREGISTER08​

Base: PHY Base Offset:0x20

BitsFieldTypeResetDescription
31:9RSVDRO0x0Reserved for future use
8CFG_HSDIS_CLR_IMTRW0x0SW must set this bit to 1 to clear host disconnect status for next connect
7:0RSVDRO0x0Reserved for future use

USB2PHYREGISTER05​

Base: PHY Base Offset:0x14 This register is functional on USB3.0 PortA Only.

BitsFieldTypeResetDescription
31:10RSVDRO0x0Reserved for future use
9CFG_UTMIOTG_VBUSVALIDRW0x0cfg_utmiotg_vbusvalid; default 0. set to 1 to enable vbus generate disconnect event
8CFG_UTMISRP_BVALIDRW0x1cfg_utmisrp_bvalid; default 1, always bvalid, no disconnect. set to 0 to enable vbus generate disconnect event
7CFG_UTMIOTG_AVALIDRW0x0cfg_utmiotg_avalid; default 0. set to 1 = force a valid
6:0RSVDRO0x0Reserved for future use

14.2.6.3 USB3 PHY and Combo PHY​

PortPHY Base AddressDescription
USB3 Port A0xCAD30000, 0xCAD40000Dual PHY for Type-C orientation (phy8, phy9 of K3). Only one can be enabled at a time.
USB3 Port B0x81F00000PCIe/USB3 PortB combo PHY (phy2 of K3)
USB3 Port C0x82000000PCIe/USB3 PortC combo PHY (phy3 of K3)
USB3 Port D0x82100000PCIe/USB3 PortD combo PHY (phy4 of K3)

PHY Calibration​

APB_SPARE31_REG​

Base: 0xD4090000 Offset: 0x178 This register is to control the USB3/PCIe PHY calibration.

BitsFieldTypeResetDescription
31:18RSVDRO0x0Reserved for future use
17PU_CALRW0x0pu_cal. Set PU_CAL bit to enable PHY calibration, when it's done, the PU_CAL_DONE of APB_SPARE32_REG would be set.
16EN_ATEST_RCALRW0x0en_atest_rcal
15:0R_REGRW0x1087r_reg
APB_SPARE32_REG​

Base: 0xD4090000 Offset: 0x17c This register is to control the USB3/PCIe PHY calibration.

BitsFieldTypeResetDescription
31:9RSVDRO0x0Reserved for future use
8PU_CAL_DONERO0x0hsio_rcal_done_stable
7:0RSVDRO0x0Reserved for future use

PCIE_PHY_VERSION​

Base: PHY Base Offset: 0x0

BitsFieldTypeResetDescription
31:0PCIE_PHY_VERSION_IDRO0x302pcie_phy version ID

PCIE_PHY_CLK_CFG​

Base: PHY Base Offset: 0x8 SW can enable CFG_PU_SSC_OUT to enable SSC.

BitsFieldTypeResetDescription
31:25RSVDRO0x0Reserved for future use
24PU_SSC_INRO0x0indicates if current lane's ssc feature is enabled
23CFG_PU_SSC_OUTRW0x0SW can enable this bit to enable PMA SSC
22OVRD_PIPE_RX_STANDBYSTATUSRW0x0if ovrd_pipe_rx_standbystatus is set to 1, the pipe rx_standbystatus is driven by cfg_pipe_rx_standbystatus
21CFG_PIPE_RX_STANDBYSTATUSRW0x0if ovrd_pipe_rx_standbystatus is set to 1, the pipe rx_standbystatus is driven by this field
20IGNORE_RXSTATUS_ERRRW0x0if this bit is set to 1, phy will not notify controller of errors such as decode error
19OVRD_LOOPBACK_ENRW0x0if ovrd_loopback_en is set to 1, the loopback_en is driven by cfg_loopback_en
18CFG_LOOPBACK_ENRW0x0if ovrd_loopback_en is set to 1, the loopback_en is driven by this field
17OVRD_RXELECIDLERW0x0if this bit is set to 1, the pipe_rxelecidle is driven by value of cfg_rxelecidle
16CFG_RXELECIDLERW0x0refer to ovrd_rxelecidle
15:14RSVDRO0x0Reserved for future use
13:12CFG_PLL_SEL_MODERW0x0
11CFG_SW_PHY_INIT_DONERW0x0SW shall set this bit to 1 after all pll-related configuration is done.
PHY PLL will not work until this bit is set to 1
10:7CFG_REFCLK_FREQRW0x2Indicate the reference clock frequency
4'h0 : 26 MHz
4'h1 : 19.2 MHz
4'h2 : 24 MHz
4'h3 : 25 MHz
4'h4 : 27 MHz
4'h5 : 30 MHz
4'h6 : 38.4 MHz
4'h7 : 100 MHz
6CFG_PIPE_PCLK_ENRW0x1pipe_pclk clock gating enable
5CFG_PCLK_ENRW0x1pclk clock gating enable
4CFG_TXCLK_ENRW0x1txclk clock gating enable
3CFG_RXCLK_ENRW0x1rxclk clock gating enable
2CFG_TXCLK_INVRW0x0txclk inverter enable
1CFG_RXCLK_INVRW0x0rxclk inverter enable
0PLL_READYRO0x0Indicate the pll is locked

14.2.6.4 USB Controller Registers​

All USB Host Controller registers and data structures are compliant with the Intel xHCI specification, please refer to the specification documents. The USB3.0 Device controller (DRD Port A only) registers and data structures are self-defined requiring software configuration.