文件名称:Enhanced Host Controller Interface Specification for Universal Serial Bus
文件大小:1.06MB
文件格式:PDF
更新时间:2011-03-25 03:44:20
ehci usb
Enhanced Host Controller Interface Specification for Universal Serial Bus
1. INTRODUCTION...............................................................................................1
1.1 EHCI Product Compliance.................................................................................................................2
1.2 Architectural Overview.......................................................................................................................2
1.2.1 Interface Architecture....................................................................................................................4
1.2.2 EHCI Schedule Data Structures.....................................................................................................5
1.2.3 Root Hub Emulation......................................................................................................................5
2. REGISTER INTERFACE ..................................................................................7
2.1 PCI Configuration Registers (USB)...................................................................................................8
2.1.1 PWRMGT ? PCI Power Management Interface..........................................................................8
2.1.2 CLASSC ? CLASS CODE REGISTER......................................................................................9
2.1.3 USBBASE ? Register Space Base Address Register..................................................................9
2.1.4 SBRN ? Serial Bus Release Number Register.............................................................................9
2.1.5 Frame Length Adjustment Register (FLADJ)..............................................................................10
2.1.6 Port Wake Capability Register (PORTWAKECAP)...................................................................11
2.1.7 USBLEGSUP ? USB Legacy Support Extended Capability.....................................................11
2.1.8 USBLEGCTLSTS ? USB Legacy Support Control/Status........................................................12
2.2 Host Controller Capability Registers...............................................................................................13
2.2.1 CAPLENGTH ? Capability Registers Length...........................................................................13
2.2.2 HCIVERSION ? Host Controller Interface Version Number....................................................14
2.2.3 HCSPARAMS ? Structural Parameters.....................................................................................14
2.2.4 HCCPARAMS ? Capability Parameters....................................................................................15
2.2.5 HCSP-PORTROUTE ? Companion Port Route Description.....................................................16
2.3 Host Controller Operational Registers............................................................................................17
2.3.1 USBCMD ? USB Command Register.......................................................................................18
2.3.2 USBSTS ? USB Status Register................................................................................................21
2.3.3 USBINTR ? USB Interrupt Enable Register..............................................................................22
2.3.4 FRINDEX ? Frame Index Register............................................................................................23
2.3.5 CTRLDSSEGMENT ? Control Data Structure Segment Register............................................24
2.3.6 PERIODICLISTBASE ? Periodic Frame List Base Address Register......................................24
2.3.7 ASYNCLISTADDR ? Current Asynchronous List Address Register.......................................25
2.3.8 CONFIGFLAG ? Configure Flag Register................................................................................25
2.3.9 PORTSC ? Port Status and Control Register.............................................................................26
3. DATA STRUCTURES.....................................................................................31
3.1 Periodic Frame List...........................................................................................................................31
3.2 Asynchronous List Queue Head Pointer..........................................................................................32
3.3 Isochronous (High-Speed) Transfer Descriptor (iTD)....................................................................33
USB 2.0 i
EHCI Revision 1.0 3/12/2002
3.3.1 Next Link Pointer.........................................................................................................................33
3.3.2 iTD Transaction Status and Control List......................................................................................34
3.3.3 iTD Buffer Page Pointer List (Plus).............................................................................................35
3.4 Split Transaction Isochronous Transfer Descriptor (siTD)...........................................................36
3.4.1 Next Link Pointer.........................................................................................................................37
3.4.2 siTD Endpoint Capabilities/Characteristics.................................................................................37
3.4.3 siTD Transfer State......................................................................................................................38
3.4.4 siTD Buffer Pointer List (plus)....................................................................................................39
3.4.5 siTD Back Link Pointer...............................................................................................................40
3.5 Queue Element Transfer Descriptor (qTD).....................................................................................40
3.5.1 Next qTD Pointer.........................................................................................................................41
3.5.2 Alternate Next qTD Pointer.........................................................................................................41
3.5.3 qTD Token...................................................................................................................................42
3.5.4 qTD Buffer Page Pointer List......................................................................................................45
3.6 Queue Head........................................................................................................................................46
3.6.1 Queue Head Horizontal Link Pointer...........................................................................................46
3.6.2 Endpoint Capabilities/Characteristics..........................................................................................47
3.6.3 Transfer Overlay..........................................................................................................................49
3.7 Periodic Frame Span Traversal Node (FSTN)................................................................................51
3.7.1 FSTN Normal Path Pointer..........................................................................................................51
3.7.2 FSTN Back Path Link Pointer......................................................................................................52
4. OPERATIONAL MODEL................................................................................53
4.1 Host Controller Initialization............................................................................................................53
4.2 Port Routing and Control..................................................................................................................54
4.2.1 Port Routing Control via EHCI Configured (CF) Bit..................................................................55
4.2.2 Port Routing Control via PortOwner and Disconnect Event.......................................................56
4.2.3 Example Port Routing State Machine..........................................................................................57
4.2.4 Port Power....................................................................................................................................57
4.2.5 Port Reporting Over-Current........................................................................................................58
4.3 Suspend/Resume................................................................................................................................59
4.3.1 Port Suspend/Resume..................................................................................................................59
4.4 Schedule Traversal Rules..................................................................................................................61
4.4.1 Example - Preserving Micro-Frame Integrity..............................................................................62
4.5 Periodic Schedule Frame Boundaries vs Bus Frame Boundaries..................................................64
4.6 Periodic Schedule...............................................................................................................................66
4.7 Managing Isochronous Transfers Using iTDs.................................................................................67
4.7.1 Host Controller Operational Model for iTDs...............................................................................67
4.7.2 Software Operational Model for iTDs.........................................................................................69
4.8 Asynchronous Schedule.....................................................................................................................71
4.8.1 Adding Queue Heads to Asynchronous Schedule........................................................................71
4.8.2 Removing Queue Heads from Asynchronous Schedule..............................................................72
4.8.3 Empty Asynchronous Schedule Detection...................................................................................74
ii USB 2.0
EHCI Revision 1.0 3/12/2002
4.8.4 Restarting Asynchronous Schedule Before EOF.........................................................................74
4.8.5 Asynchronous Schedule Traversal : Start Event..........................................................................76
4.8.6 Reclamation Status Bit (USBSTS Register)................................................................................77
4.9 Operational Model for Nak Counter................................................................................................77
4.9.1 Nak Count Reload Control...........................................................................................................78
4.10 Managing Control/Bulk/Interrupt Transfers via Queue Heads....................................................79
4.10.1 Fetch Queue Head........................................................................................................................80
4.10.2 Advance Queue............................................................................................................................81
4.10.3 Execute Transaction.....................................................................................................................81
4.10.4 Write Back qTD...........................................................................................................................86
4.10.5 Follow Queue Head Horizontal Pointer.......................................................................................86
4.10.6 Buffer Pointer List Use for Data Streaming with qTDs...............................................................86
4.10.7 Adding Interrupt Queue Heads to the Periodic Schedule.............................................................88
4.10.8 Managing Transfer Complete Interrupts from Queue Heads.......................................................88
4.11 Ping Control.......................................................................................................................................88
4.12 Split Transactions..............................................................................................................................89
4.12.1 Split Transactions for Asynchronous Transfers...........................................................................90
4.12.2 Split Transaction Interrupt...........................................................................................................92
4.12.3 Split Transaction Isochronous....................................................................................................103
4.13 Host Controller Pause......................................................................................................................114
4.14 Port Test Modes...............................................................................................................................114
4.15 Interrupts..........................................................................................................................................115
4.15.1 Transfer/Transaction Based Interrupts.......................................................................................115
4.15.2 Host Controller Event Interrupts................................................................................................117
5. EHCI EXTENDED CAPABILITIES...............................................................121
5.1 EHCI Extended Capability: Pre-OS to OS Handoff Synchronization........................................121
APPENDIX A. EHCI PCI POWER MANAGEMENT INTERFACE......................125
A.1 PCI Power Management Register Interface..................................................................................125
A.1.1 Power State Transitions.............................................................................................................126
A.1.2 Power State Definitions.............................................................................................................126
A.1.3 PCI PME# Signal.......................................................................................................................127
APPENDIX B. EHCI 64-BIT DATA STRUCTURES............................................129
APPENDIX C. DEBUG PORT.............................................................................133
C.1 Locating the Debug Port..................................................................................................................133
C.2 Using the Debug Port Fields............................................................................................................134
C.3 USB2 Debug Port Register Interface..............................................................................................134
USB 2.0 iii
EHCI Revision 1.0 3/12/2002
C.3.1 Debug Port Control Register......................................................................................................135
C.3.2 USB PIDs Register.....................................................................................................................137
C.3.3 Data Buffer.................................................................................................................................137
C.3.4 Device Address Register............................................................................................................138
C.4 Operational Model...........................................................................................................................138
C.4.1 OUT/SETUP Transactions.........................................................................................................139
C.4.2 IN transactions...........................................................................................................................139
C.4.3 Debug Software Startup.............................................................................................................139
C.4.4 Finding the Debug Peripheral....................................................................................................140
APPENDIX D. HIGH BANDWIDTH ISOCHRONOUS RULES............................141