STRUCT DWC2_HW_PARAMS(9)
okay so bestie, welcome to the Kernel API Manual β this is the struct dwc2_hw_params(9) page, and it is literally all about the autodetected parameters, no cap β¨π
π NAME π
struct dwc2_hw_params β the autodetected parameters, and yes that's the whole vibe π«Ά
β¨ SYNOPSIS β¨
here's the struct in all its glory, bestie β copy it exactly, character for character π
struct dwc2_hw_params {
unsigned op_mode:3;
unsigned arch:2;
unsigned dma_desc_enable:1;
unsigned enable_dynamic_fifo:1;
unsigned en_multiple_tx_fifo:1;
unsigned rx_fifo_size:16;
unsigned host_nperio_tx_fifo_size:16;
unsigned dev_nperio_tx_fifo_size:16;
unsigned host_perio_tx_fifo_size:16;
unsigned nperio_tx_q_depth:3;
unsigned host_perio_tx_q_depth:3;
unsigned dev_token_q_depth:5;
unsigned max_transfer_size:26;
unsigned max_packet_count:11;
unsigned host_channels:5;
unsigned hs_phy_type:2;
unsigned fs_phy_type:2;
unsigned i2c_enable:1;
unsigned acg_enable:1;
unsigned num_dev_ep:4;
unsigned num_dev_in_eps : 4;
unsigned num_dev_perio_in_ep:4;
unsigned total_fifo_size:16;
unsigned power_optimized:1;
unsigned hibernation:1;
unsigned utmi_phy_data_width:2;
unsigned lpm_mode:1;
unsigned ipg_isoc_en:1;
unsigned service_interval_mode:1;
u32 snpsid;
u32 dev_ep_dirs;
u32 g_tx_fifo_size[MAX_EPS_CHANNELS];
};
π¦ Members π¦
op_modeβ Mode of Operation:0β HNP- and SRP-Capable OTG (Host & Device);1β SRP-Capable OTG (Host & Device);2β Non-HNP and Non-SRP Capable OTG (Host & Device);3β SRP-Capable Device;4β Non-OTG Device;5β SRP-Capable Host;6β Non-OTG Host πarchβ Architecture:0β Slave only;1β External DMA;2β Internal DMA β¨dma_desc_enableβ when DMA mode is enabled, this specifies whether to use address DMA mode or descriptor DMA mode for accessing the data FIFOs. The driver will automatically detect the value for this if none is specified.0β Address DMA;1β Descriptor DMA (default, if available) π«enable_dynamic_fifoβ0β Use coreConsultant-specified FIFO size parameters;1β Allow dynamic FIFO sizing (default, if available) πen_multiple_tx_fifoβ specifies whether dedicated per-endpoint transmit FIFOs are enabled for non-periodic IN endpoints in device mode π«Άrx_fifo_sizeβ number of 4-byte words in the Rx FIFO when dynamic FIFO sizing is enabled,16to32768. Actual maximum value is autodetected and also the default πΈhost_nperio_tx_fifo_sizeβ number of 4-byte words in the non-periodic Tx FIFO in host mode when dynamic FIFO sizing is enabled,16to32768. Actual maximum value is autodetected and also the default πdev_nperio_tx_fifo_sizeβ number of 4-byte words in the non-periodic Tx FIFO in device mode when dynamic FIFO sizing is enabled,16to32768. Actual maximum value is autodetected and also the default π¦host_perio_tx_fifo_sizeβ number of 4-byte words in the periodic Tx FIFO in host mode when dynamic FIFO sizing is enabled,16to32768. Actual maximum value is autodetected and also the default πnperio_tx_q_depthβ Non-Periodic Request Queue Depth:2,4or8βhost_perio_tx_q_depthβ Host Mode Periodic Request Queue Depth:2,4or8βdev_token_q_depthβ Device Mode IN Token Sequence Learning Queue Depth:0to30π§max_transfer_sizeβ the maximum transfer size supported, in bytes,2047to65,535. Actual maximum value is autodetected and also the default π₯max_packet_countβ the maximum number of packets in a transfer,15to511. Actual maximum value is autodetected and also the default πhost_channelsβ the number of host channel registers to use,1to16. Actual maximum value is autodetected and also the default πhs_phy_typeβ High-speed PHY interface type:0β High-speed interface not supported;1β UTMI+;2β ULPI;3β UTMI+ and ULPI β¨fs_phy_typeβ Full-speed PHY interface type:0β Full speed interface not supported;1β Dedicated full speed interface;2β FS pins shared with UTMI+ pins;3β FS pins shared with ULPI pins πΈi2c_enableβ specifies whether to use the I2Cinterface for a full speed PHY. This parameter is only applicable ifphy_typeis FS.0β No (default);1β Yes πacg_enableβ for enabling Active Clock Gating in the controller:0β Disable;1β Enable π«num_dev_epβ number of device endpoints available π«Άnum_dev_in_epsβ number of device IN endpoints available π«Άnum_dev_perio_in_epβ number of device periodic IN endpoints available π«Άtotal_fifo_sizeβ total internal RAM for FIFOs (bytes) πΈpower_optimizedβ are power optimizations enabled? β‘hibernationβ is hibernation enabled? π΄utmi_phy_data_widthβ UTMI+ PHY data width:0β 8 bits;1β 16 bits;2β 8 or 16 bits πlpm_modeβ for enabling Link Power Management in the controller:0β Disable;1β Enable πipg_isoc_enβ this feature indicates that the controller supports the worst-case scenario of Rx followed by Rx Interpacket Gap (IPG) (32 bitTimes) as per the utmi specification for any token following ISOC OUT token.0β Don't support;1β Support π₯service_interval_modeβ for enabling service interval based scheduling in the controller.0β Disable;1β Enable βsnpsidβ value from SNPSID register πdev_ep_dirsβ direction of device endpoints (GHWCFG1) π¦g_tx_fifo_sizeβ power-on values of TxFIFO sizes π
π Description π
these parameters are the various parameters read from hardware registers during initialization. They typically contain the best supported or maximum value that can be configured in the corresponding dwc2_core_params value π
the values that are not in dwc2_core_params are documented below π«Ά
π SEE ALSO π
- Kernel file
./drivers/usb/dwc2/core.h struct dwc2_hsotg_ep(9)struct dwc2_hsotg_req(9)struct dwc2_core_params(9)struct dwc2_gregs_backup(9)struct dwc2_dregs_backup(9)struct dwc2_hregs_backup(9)struct dwc2_hsotg(9)
mwah π this little love letter lives in ./drivers/usb/dwc2, dated October 2026, and it's the struct dwc2_hw_params(9) page β bye bestie, go read some hardware registers for me πβ¨periodt
π¦ where this page comes from
- nixpkgs unstable: linux-manual 7.3.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms