Hard Processor System Technical Reference Manual: Agilex™ 5 SoCs

ID 814346
Date 4/01/2024
Public
Document Table of Contents

5.6.6.1.4. Device Initialization

If a USB device is attached to a port when it is in the “Disconnected” state:

  • USB3 PIPE protocol ports must:
  • Advance to the Polling state
    • If Polling is successful, the port must advance to the “Enabled” state, and Current Connect Status (CCS) and Connect Status Change (CSC) flags are set to “1”.
    • If Polling is unsuccessful, the port must advance to the “Disconnected” state.

The following steps for USB Device initialization process:

  1. When xHCI detects a device attach, it must set the Current Connect Status (CCS) and Connect Status Change (CSC) flags to ‘1’. If the assertion of CSC results in a ‘0’ to ‘1’ transaction of Port Status Change Event Generation (PSCEG), the xHCI must generate to a Port Status Change Event.
  2. Upon receipt of a Port Status Change Event system software evaluates the Port ID field to determine the device which has generated the event.
  3. System software then reads the PORTSC register of the port that generated the event.
    • PIPE interface port attempts to automatically advance to the Enabled state as part of attach process
  4. Device Slot is obtained for newly attached device using Enable Slot Command
  5. After that, System Software initializes the data structure associated with the device slot
  6. Once the device related data structure is initialized, System Software shall use an AddressDevice Command to assign an address to the device enable its Default Control Endpoint
  7. Only allowed 8, 64, and 512 for LS, HS and SS Device respectively.
  8. Now default Endpoint is fully functional, System Software may read the complete USB Descriptor and possibly the Configuration Descriptors to find appropriate Class driver
  9. After reading the Configuration Descriptors software may issue an Evaluate Context Commandwith Add Context bit 0 (A0) set to ‘1’ to inform the xHCI of the value of the Max Exit Latency parameter
  10. The Class Driver may then configure the Device Slot using a Configure Endpoint Command
  11. Software may configure Alternate Interface if required
  12. The PIPE interfaces to USB device should be fully functional now.