79 uint32_t terminate : 1;
84TU_VERIFY_STATIC(
sizeof(
ehci_link_t) == 4,
"size is not correct" );
100 uint32_t expected_bytes : 16;
126TU_VERIFY_STATIC(
sizeof(
ehci_qtd_t) == 32,
"size is not correct" );
129typedef struct TU_ATTR_ALIGNED(32)
135 uint32_t dev_addr : 7 ;
136 uint32_t fl_inactive_next_xact : 1 ;
137 uint32_t ep_number : 4 ;
138 uint32_t ep_speed : 2 ;
139 uint32_t data_toggle_control : 1 ;
140 uint32_t head_list_flag : 1 ;
141 uint32_t max_packet_size : 11 ;
142 uint32_t fl_ctrl_ep_flag : 1 ;
143 uint32_t nak_reload : 4 ;
146 uint32_t int_smask : 8 ;
147 uint32_t fl_int_cmask : 8 ;
148 uint32_t fl_hub_addr : 7 ;
149 uint32_t fl_hub_port : 7 ;
153 volatile uint32_t qtd_addr;
167 uint8_t TU_RESERVED[4];
171 uint32_t attached_buffer;
175TU_VERIFY_STATIC(
sizeof(ehci_qhd_t) == 64,
"size is not correct" );
178typedef struct TU_ATTR_ALIGNED(32) {
185 volatile uint32_t offset : 12 ;
186 volatile uint32_t page_select : 3 ;
187 uint32_t int_on_complete : 1 ;
188 volatile uint32_t length : 12 ;
191 volatile uint32_t error : 1 ;
192 volatile uint32_t babble_err : 1 ;
193 volatile uint32_t buffer_err : 1 ;
194 volatile uint32_t active : 1 ;
198 uint32_t BufferPointer[7];
207TU_VERIFY_STATIC(
sizeof(ehci_itd_t) == 64,
"size is not correct" );
210typedef struct TU_ATTR_ALIGNED(32)
216 uint32_t dev_addr : 7;
218 uint32_t ep_number : 4;
220 uint32_t hub_addr : 7;
222 uint32_t port_number : 7;
223 uint32_t direction : 1;
227 uint8_t fl_int_cmask;
232 volatile uint32_t : 1 ;
233 volatile uint32_t split_state : 1 ;
234 volatile uint32_t missed_uframe : 1 ;
235 volatile uint32_t xact_err : 1 ;
236 volatile uint32_t babble_err : 1 ;
237 volatile uint32_t buffer_err : 1 ;
238 volatile uint32_t error : 1 ;
239 volatile uint32_t active : 1 ;
241 volatile uint32_t cmask_progress : 8 ;
242 volatile uint32_t total_bytes : 10 ;
243 volatile uint32_t : 4 ;
244 volatile uint32_t page_select : 1 ;
245 uint32_t int_on_complete : 1 ;
257 uint8_t reserved2[2];
260TU_VERIFY_STATIC(
sizeof(ehci_sitd_t) == 32,
"size is not correct" );
267 EHCI_INT_MASK_USB = TU_BIT(0),
268 EHCI_INT_MASK_ERROR = TU_BIT(1),
269 EHCI_INT_MASK_PORT_CHANGE = TU_BIT(2),
270 EHCI_INT_MASK_FRAMELIST_ROLLOVER = TU_BIT(3),
271 EHCI_INT_MASK_PCI_HOST_SYSTEM_ERROR = TU_BIT(4),
272 EHCI_INT_MASK_ASYNC_ADVANCE = TU_BIT(5),
274 EHCI_INT_MASK_NXP_SOF = TU_BIT(7),
276 EHCI_INT_MASK_HC_HALTED = TU_BIT(12),
277 EHCI_INT_MASK_RECLAIMATION = TU_BIT(13),
278 EHCI_INT_MASK_PERIODIC_SCHED_STATUS = TU_BIT(14),
279 EHCI_INT_MASK_ASYNC_SCHED_STATUS = TU_BIT(15),
282 EHCI_INT_MASK_USB | EHCI_INT_MASK_ERROR | EHCI_INT_MASK_PORT_CHANGE |
283 EHCI_INT_MASK_FRAMELIST_ROLLOVER | EHCI_INT_MASK_PCI_HOST_SYSTEM_ERROR |
284 EHCI_INT_MASK_ASYNC_ADVANCE | EHCI_INT_MASK_NXP_SOF
288 EHCI_USBCMD_FRAMELIST_SIZE_SHIFT = 2,
289 EHCI_USBCMD_CHIPIDEA_FRAMELIST_SIZE_MSB_SHIFT = 15,
290 EHCI_USBCMD_INTERRUPT_THRESHOLD_SHIFT = 16
294 EHCI_USBCMD_RUN_STOP = TU_BIT(0),
295 EHCI_USBCMD_HCRESET = TU_BIT(1),
296 EHCI_USBCMD_PERIOD_SCHEDULE_ENABLE = TU_BIT(4),
297 EHCI_USBCMD_ASYNC_SCHEDULE_ENABLE = TU_BIT(5),
298 EHCI_USBCMD_INTR_ON_ASYNC_ADVANCE_DOORBELL = TU_BIT(6),
302 EHCI_PORTSC_MASK_CURRENT_CONNECT_STATUS = TU_BIT(0),
303 EHCI_PORTSC_MASK_CONNECT_STATUS_CHANGE = TU_BIT(1),
304 EHCI_PORTSC_MASK_PORT_EANBLED = TU_BIT(2),
305 EHCI_PORTSC_MASK_PORT_ENABLE_CHANGE = TU_BIT(3),
306 EHCI_PORTSC_MASK_OVER_CURRENT_CHANGE = TU_BIT(5),
307 EHCI_PORTSC_MASK_FORCE_RESUME = TU_BIT(6),
308 EHCI_PORTSC_MASK_PORT_SUSPEND = TU_BIT(7),
309 EHCI_PORTSC_MASK_PORT_RESET = TU_BIT(8),
310 EHCI_PORTSC_MASK_PORT_POWER = TU_BIT(12),
312 EHCI_PORTSC_MASK_W1C =
313 EHCI_PORTSC_MASK_CONNECT_STATUS_CHANGE |
314 EHCI_PORTSC_MASK_PORT_ENABLE_CHANGE |
315 EHCI_PORTSC_MASK_OVER_CURRENT_CHANGE
318typedef volatile struct
369 uint32_t usb_error : 1 ;
370 uint32_t port_change_detect : 1 ;
371 uint32_t framelist_rollover : 1 ;
372 uint32_t pci_host_system_error : 1 ;
373 uint32_t async_adv : 1 ;
375 uint32_t nxp_int_sof : 1 ;
377 uint32_t nxp_int_async : 1 ;
378 uint32_t nxp_int_period : 1 ;
388 uint32_t reserved[8] ;
417 uint32_t TU_RESERVED : 4;
425typedef volatile struct {
433 uint32_t num_ports : 4;
434 uint32_t port_power_control : 1;
435 uint32_t TU_RESERVED : 2;
436 uint32_t port_route_rule : 1;
439 uint32_t port_ind : 1;
440 uint32_t TU_RESERVED : 3;
443 uint32_t TU_RESERVED : 4;
450 uint32_t addr_64bit : 1;
451 uint32_t programmable_frame_list_flag : 1;
452 uint32_t async_park_cap : 1;
453 uint32_t TU_RESERVED : 1;
454 uint32_t iso_schedule_threshold : 4;
456 uint32_t TU_RESERVED : 16;
460 uint32_t hcsp_portroute;
volatile uint32_t buffer_err
Data overrun/underrun error.
Definition ehci.h:110
uint32_t pid
0: OUT, 1: IN, 2 Setup
Definition ehci.h:114
volatile uint32_t babble_err
Babble detected, also set Halted bit to 1.
Definition ehci.h:109
volatile uint32_t active
Start transfer, clear by HC when complete.
Definition ehci.h:112
volatile uint32_t ping_err
For Highspeed: 0 Out, 1 Ping. Full/Slow used as error indicator.
Definition ehci.h:105
volatile uint32_t non_hs_split_state
Used by HC to track the state of split transaction.
Definition ehci.h:106
volatile uint32_t non_hs_missed_uframe
HC misses a complete split transaction.
Definition ehci.h:107
volatile uint32_t total_bytes
Transfer bytes, decreased during transaction.
Definition ehci.h:118
volatile uint32_t halted
Serious error or STALL received.
Definition ehci.h:111
volatile uint32_t data_toggle
Data Toggle bit.
Definition ehci.h:119
volatile uint32_t current_page
Index into the qTD buffer pointer list.
Definition ehci.h:116
volatile uint32_t xact_err
Error (Timeout, CRC, Bad PID ... )
Definition ehci.h:108
volatile uint32_t err_count
Error Counter of consecutive errors.
Definition ehci.h:115
uint32_t int_on_complete
Interrupt on complete.
Definition ehci.h:117
uint32_t nxp_int_period
NXP customized: This bit is set by the Host Controller when the cause of an interrupt is a completion...
Definition ehci.h:359
uint32_t config_flag
0x40 not used by NXP
Definition ehci.h:389
uint32_t reclamation
Used to detect empty async shecudle.
Definition ehci.h:354
uint32_t port_owner
13: not used by NXP
Definition ehci.h:407
uint32_t port_indicator_control
14-15: 00b: off, 01b: Amber, 10b: green, 11b: undefined
Definition ehci.h:408
uint32_t nxp_phy_clock_disable
23: NXP customized: the PHY can be put into Low Power Suspend – Clock Disable when the downstream dev...
Definition ehci.h:413
uint32_t port_power
12: 0= power off, 1= power on
Definition ehci.h:406
uint32_t async_list_addr
0x18 Address of next async QHD to be executed
Definition ehci.h:386
uint32_t ctrl_ds_seg
0x10 Control Data Structure Segment
Definition ehci.h:384
uint32_t connect_status_change
01: [R/WC] Change in Current Connect Status
Definition ehci.h:396
uint32_t port_reset
08: 1=Port is in Reset. 0=Port is not in Reset
Definition ehci.h:403
uint32_t nxp_framelist_size_msb
NXP customized : Bit 2 of the Frame List Size bits 011b: 128 elements 100b: 64 elements 101b: 3...
Definition ehci.h:335
uint32_t nxp_int_async
NXP customized: This bit is set by the Host Controller when the cause of an interrupt is a completion...
Definition ehci.h:358
uint32_t nxp_port_speed
26-27: NXP customized: This register field indicates the speed atwhich the port is operating....
Definition ehci.h:416
uint32_t wake_on_disconnect_enable
21: Enables device disconnects as wake-up events
Definition ehci.h:411
uint32_t async_status
Async schedule status.
Definition ehci.h:356
uint32_t usb
qTD with IOC is retired
Definition ehci.h:344
uint32_t port_enabled
02: Ports can only be enabled by HC as a part of the reset and enable. SW can write 0 to disable
Definition ehci.h:397
uint32_t async_enable
This bit controls whether the host controller skips processing the Asynchronous Schedule....
Definition ehci.h:328
uint32_t run_stop
1=Run. 0=Stop
Definition ehci.h:324
uint32_t suspend
07: Port in suspend state
Definition ehci.h:402
uint32_t port_test_control
16-19: Port test mode, not used by tinyusb
Definition ehci.h:409
uint32_t force_port_resume
06: Resume detected/driven on port. This functionality defined for manipulating this bit depends on t...
Definition ehci.h:401
uint32_t over_current_change
05: [R/WC] Change to Over-current Active
Definition ehci.h:400
uint32_t port_enable_change
03: [R/WC] Port Enabled has changed
Definition ehci.h:398
uint32_t int_threshold
Default 08h. Interrupt rate in unit of micro frame.
Definition ehci.h:336
uint32_t periodic_enable
This bit controls whether the host controller skips processing the Periodic Schedule....
Definition ehci.h:327
uint32_t async_park_enable
Enable park mode, not used by tinyusb.
Definition ehci.h:333
uint32_t over_current_active
04: Port has an over-current condition
Definition ehci.h:399
uint32_t nxp_tt_control
nxp embedded transaction translator (reserved by EHCI specs)
Definition ehci.h:387
uint32_t line_status
10-11: D+/D- state: 00: SE0, 10: J-state, 01: K-state
Definition ehci.h:405
uint32_t hc_halted
Opposite value to run_stop bit.
Definition ehci.h:353
uint32_t reset
SW write 1 to reset HC, clear by HC when complete.
Definition ehci.h:325
uint32_t framelist_rollover
R/WC The Host Controller sets this bit to a one when the Frame List Index(see Section 2....
Definition ehci.h:347
uint32_t wake_on_connect_enable
20: Enables device connects as wake-up events
Definition ehci.h:410
uint32_t light_reset
Reset HC without affecting ports state.
Definition ehci.h:330
uint32_t periodic_status
Periodic schedule status.
Definition ehci.h:355
uint32_t async_adv
Async Advance interrupt.
Definition ehci.h:349
uint32_t current_connect_status
00: 0: No device, 1: Device is present on port
Definition ehci.h:395
uint32_t async_adv_doorbell
Tell HC to interrupt next time it advances async list. Clear by HC.
Definition ehci.h:329
uint32_t usb_error
qTD retired due to error
Definition ehci.h:345
uint32_t async_park_count
not used by tinyusb
Definition ehci.h:331
uint32_t framelist_size
Frame List size 0: 1024, 1: 512, 2: 256.
Definition ehci.h:326
uint32_t TU_RESERVED
25
Definition ehci.h:415
uint32_t nxp_highspeed_status
09: NXP customized: 0=connected to the port is not in High-speed mode, 1=connected to the port is in ...
Definition ehci.h:404
uint32_t wake_on_over_current_enable
22: Enables over-current conditions as wake-up events
Definition ehci.h:412
uint32_t portsc
0x44 port status and control
Definition ehci.h:393
uint32_t pci_host_system_error
R/WC (not used by NXP) The Host Controller sets this bit to 1 when a serious error occurs during a ho...
Definition ehci.h:348
uint32_t periodic_list_base
0x14 Beginning address of perodic frame list
Definition ehci.h:385
uint32_t nxp_int_sof
NXP customized: this bit will be set every 125us and can be used by host controller driver as a time ...
Definition ehci.h:351
uint32_t nxp_port_force_fullspeed
24: NXP customized: Writing this bit to a 1 will force the port to only connect at Full Speed....
Definition ehci.h:414
uint32_t port_change_detect
Set when PortOwner or ForcePortResume change from 0 -> 1.
Definition ehci.h:346
uint32_t frame_index
0x0C Micro frame counter
Definition ehci.h:383
Link pointer.
Definition ehci.h:76