41.11 UHPHS Port Status and Control Register
The number of port registers is documented in the UHPHS_HCSPARAMS register. Software uses this information as an input parameter to determine how many ports need to be serviced. All ports have the structure defined below.
This register is in the auxiliary power well. It is only reset by hardware when the auxiliary power is initially applied or in response to a host controller reset. The initial conditions of a port are:
- No device connected
- Port disabled
If the port has port power control, software cannot change the state of the port until after it applies power to the port by setting port power to a 1. Software must not attempt to change the state of the port until after power is stable on the port. The host is required to have power stable to the port within 20 milliseconds of the 0 to 1 transition.
- When a device is attached, the port state transitions to the connected state and system software will process this as with any status change notification.
- If a port is being used as the Debug Port, then the port may report device connected and enabled when the Configured Flag is set to 0.
Name: | UHPHS_PORTSCx |
Offset: | 0x54 + x*0x04 [x=0..2] |
Reset: | 0x00003000 |
Property: | Read/Write |
Bit | 31 | 30 | 29 | 28 | 27 | 26 | 25 | 24 | |
Access | |||||||||
Reset |
Bit | 23 | 22 | 21 | 20 | 19 | 18 | 17 | 16 | |
WKOC_E | WKDSCNNT_E | WKCNNT_E | PTC[3:0] | ||||||
Access | R/W | R/W | R/W | R/W | R/W | R/W | R/W | ||
Reset | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
Bit | 15 | 14 | 13 | 12 | 11 | 10 | 9 | 8 | |
PIC[1:0] | PO | PP | LS[1:0] | PR | |||||
Access | R/W | R/W | R/W | R-R/W | R | R | R/W | ||
Reset | 0 | 0 | 1 | 1 | 0 | 0 | 0 |
Bit | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 | |
SUS | FPR | OCC | OCA | PEDC | PED | CSC | CCS | ||
Access | R/W | R/W | R/W | R | R/W | R/W | R/W | R | |
Reset | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
Bit 22 – WKOC_E Wake on Overcurrent Enable
This field is 0 if Port Power is 0.
Value | Description |
---|---|
0 | Disables the port to be sensitive to overcurrent conditions as wake-up events. |
1 | Enables the port to be sensitive to overcurrent conditions as wake-up events. |
Bit 21 – WKDSCNNT_E Wake on Disconnect Enable
This field is 0 if Port Power is 0.
Value | Description |
---|---|
0 | Disables the port to be sensitive to device disconnects as wake-up events. |
1 | Enables the port to be sensitive to device disconnects as wake-up events. |
Bit 20 – WKCNNT_E Wake on Connect Enable
This field is 0 if Port Power is 0.
Value | Description |
---|---|
0 | Disables the port to be sensitive to device connects as wake-up events. |
1 | Enables the port to be sensitive to device connects as wake-up events. |
Bits 19:16 – PTC[3:0] Port Test Control
When this field is set to 0, the port is NOT operating in a test mode. A non-zero value indicates that it is operating in test mode and the specific test mode is indicated by the specific value.
Test mode bits are encoded as follows (6 to 15 are reserved):
Value | Test Mode |
---|---|
0 | Test mode not enabled |
1 | Test J_STATE |
2 | Test K_STATE |
3 | Test SE0_NAK |
4 | Test Packet |
5 | Test FORCE_ENABLE |
Refer to the USB Specification Revision 2.0, Chapter 7, for details on each test mode.
Bits 15:14 – PIC[1:0] Port Indicator Control
Value | Meaning |
---|---|
0 | Port indicators are off |
1 | Amber |
2 | Green |
3 | Undefined |
Refer to the USB Specification Revision 2.0 for a description of how these bits are to be used.
This field is 0 if Port Power is 0.
Bit 13 – PO Port Owner
System software uses this field to release ownership of the port to a selected host controller (in the event that the attached device is not a high-speed device). Software writes 1 to this bit when the attached device is not a high-speed device. A 1 in this bit means that a companion host controller owns and controls the port.
Value | Description |
---|---|
0 | This bit unconditionally goes to a 0 when the bit UHPHS_CONFIGFLAG.CF makes a 0 to 1 transition. |
1 | This bit unconditionally goes to 1 whenever the bit UHPHS_CONFIGFLAG.CF=0. |
Bit 12 – PP Port Power
The function of this bit depends on the value of the Port Power Control (PPC) field in the UHPHS_HCSPARAMS register. When host controller has port power control switches (PPC=0), PP is in read-only mode:
Value | Description |
---|---|
1 | Each port is hard-wired to power. |
When host controller has port power control switches (PPC=1), PP is in read/write mode:
Value | Description |
---|---|
0 |
Host port power switch is off. When power is not available on a port (i.e., PP at 0), the port is non-functional and does not report attaches, detaches, etc. |
1 |
Host port power switch is on. When power is not available on a port (i.e., PP at 0), the port is non-functional and does not report attaches, detaches, etc. |
When an overcurrent condition is detected on a powered port and PPC is set to 1, the PP bit in each affected port may be transitioned by the host controller from 1 to 0 (removing power from the port).
Bits 11:10 – LS[1:0] Line Status
These bits reflect the current logical levels of the D+ (bit 11) and D- (bit 10) signal lines. These bits are used for detection of low-speed USB devices prior to the port reset and enable sequence. This field is valid only when the port enable bit is 0 and the current connect status bit is set to 1.
This value of this field is undefined if Port Power is 0.
Value | Name | Description |
---|---|---|
0 | SE0 | Not a low-speed device, perform EHCI reset |
1 | K-STATE | Low-speed device, release ownership of port |
2 | J-STATE | Not a low-speed device, perform EHCI reset |
3 | Undefined | Not a low-speed device, perform EHCI reset |
Bit 8 – PR Port Reset
When software writes a 1 to this bit (from 0), the bus reset sequence as defined in the USB Specification Revision 2.0 is started. Software writes a 0 to this bit to terminate the bus reset sequence. Software must keep this bit set to 1 long enough to ensure the reset sequence, as specified in the USB Specification Revision 2.0, completes.
When software writes a 0 to this bit, there may be a delay before the bit status changes to 0. The bit status will not read as 0 until after the reset has completed. If the port is in High-Speed mode after reset is complete, the host controller will automatically enable this port (set the Port Enable bit to 1, for example). A host controller must terminate the reset and stabilize the state of the port within 2 milliseconds of software transitioning this bit from 1 to 0. For example: if the port detects that the attached device is high-speed during reset, then the host controller must have the port in the enabled state within 2 ms of software writing this bit to 0.
The HCHLT bit in the UHPHS_USBSTS register should be set to 0 before software attempts to use this bit. The host controller may hold Port Reset asserted to 1 when the HCHLT bit is 1.
This field is 0 if Port Power is 0.
Value | Description |
---|---|
0 | Port is not in Reset. |
1 | Port is in Reset. |
Bit 7 – SUS Suspend
Port Enabled Bit and Suspend bit of this register define the port states as follows:
Bits [Port Enabled, Suspend] | Port State |
---|---|
0X | Disable |
10 | Enable |
11 | Suspend |
When in suspend state, downstream propagation of data is blocked on this port, except for port reset. The blocking occurs at the end of the current transaction, if a transaction was in progress when this bit was written to 1. In the suspend state, the port is sensitive to resume detection. Note that the bit status does not change until the port is suspended and that there may be a delay in suspending a port if there is a transaction currently in progress on the USB.
- Software sets the Force Port Resume bit to 0 (from 1).
- Software sets the Port Reset bit to 1 (from 0).
If host software sets this bit to 1 when the port is not enabled (i.e., Port Enabled bit set to 0), the results are undefined.
This field is 0 if Port Power is set to 0.
Value | Description |
---|---|
0 | Port not in Suspend state. |
1 | Port in Suspend state. |
Bit 6 – FPR Force Port Resume
This functionality defined for manipulating this bit depends on the value of the Suspend bit. For example, if the port is not suspended (Suspend and Enabled bits are set to 1) and software transitions this bit to 1, then the effects on the bus are undefined.
Software sets this bit to a 1 to drive resume signaling. The Host Controller sets this bit to 1 if a J-to-K transition is detected while the port is in the Suspend state. When this bit transitions to 1 because a J-to-K transition is detected, the Port Change Detect bit in the UHPHS_USBSTS register is also set to 1. If software sets this bit to 1, the host controller must not set the Port Change Detect bit.
Note that when the EHCI controller owns the port, the resume sequence follows the defined sequence documented in the USB Specification Revision 2.0. The resume signaling (Full-speed 'K') is driven on the port as long as this bit remains set to 1. Software must appropriately time the Resume and set this bit to 0 when the appropriate amount of time has elapsed. Writing a 0 (from 1) causes the port to return to High-Speed mode (forcing the bus below the port into a high-speed idle). This bit will remain set to 1 until the port has switched to the high-speed idle. The host controller must complete this transition within 2 milliseconds of software setting this bit to 0.
This field is 0 if Port Power is 0.
Value | Description |
---|---|
0 | No resume (K-state) detected/driven on port. |
1 | Resume detected/driven on port. |
Bit 5 – OCC Overcurrent Change (Cleared on write)
Software clears this bit by writing 1.
Value | Description |
---|---|
0 | No change to Overcurrent Active. |
1 | Changes to Overcurrent Active. |
Bit 4 – OCA Overcurrent Active
This bit will automatically transition from 1 to 0 when the overcurrent condition is removed.
Value | Description |
---|---|
0 | This port does not have an overcurrent condition. |
1 | This port currently has an overcurrent condition. |
Bit 3 – PEDC Port Enable/Disable Change (Cleared on write)
For the root hub, this bit gets set to 1 only when a port is disabled due to the appropriate conditions existing at the EOF2 point (refer to Chapter 11 of the USB Specification for the definition of a Port Error). Software clears this bit by writing a 1 to it.
This field is 0 if Port Power bit is 0.
Value | Description |
---|---|
0 | No change in port enabled/disabled status. |
1 | Port enabled/disabled status has changed. |
Bit 2 – PED Port Enabled/Disabled
Ports can only be enabled by the host controller as a part of the reset and enable. Software cannot enable a port by writing a 1 to this field. The host controller will only set this bit to 1 when the reset sequence determines that the attached device is a high-speed device.
Ports can be disabled by either a fault condition (disconnect event or other fault condition) or by host software. Note that the bit status does not change until the port state actually changes. There may be a delay in disabling or enabling a port due to other host controller and bus events.
When the port is disabled (0b), downstream propagation of data is blocked on this port, except for reset.
This field is 0 if Port Power bit is 0.
Value | Description |
---|---|
0 | Disable. |
1 | Enable. |
Bit 1 – CSC Connect Status Change (Cleared on write)
Indicates a change has occurred in the port’s Current Connect Status. The host controller sets this bit for all changes to the port device connect status, even if system software has not cleared an existing connect status change. For example, the insertion status changes twice before system software has cleared the changed condition, hub hardware will be “setting” an already-set bit (i.e., the bit remains set). Software sets this bit to 0 by writing a 1 to it.
This field is 0 if Port Power bit is 0.
Value | Description |
---|---|
0 | No change. |
1 | Change in Current Connect Status. |
Bit 0 – CCS Current Connect Status
This value reflects the current state of the port, and may not correspond directly to the event that caused the CSC bit to be 1.
This bit is 0 if Port Power is 0.
Value | Description |
---|---|
0 | No device is present. |
1 | Device is present on port. |