linux/drivers/usb/dwc2/hw.h

/* SPDX-License-Identifier: (GPL-2.0+ OR BSD-3-Clause) */
/*
 * hw.h - DesignWare HS OTG Controller hardware definitions
 *
 * Copyright 2004-2013 Synopsys, Inc.
 */

#ifndef __DWC2_HW_H__
#define __DWC2_HW_H__

#define HSOTG_REG(x)

#define GOTGCTL
#define GOTGCTL_EUSB2_DISC_SUPP
#define GOTGCTL_CHIRPEN
#define GOTGCTL_MULT_VALID_BC_MASK
#define GOTGCTL_MULT_VALID_BC_SHIFT
#define GOTGCTL_CURMODE_HOST
#define GOTGCTL_OTGVER
#define GOTGCTL_BSESVLD
#define GOTGCTL_ASESVLD
#define GOTGCTL_DBNC_SHORT
#define GOTGCTL_CONID_B
#define GOTGCTL_DBNCE_FLTR_BYPASS
#define GOTGCTL_DEVHNPEN
#define GOTGCTL_HSTSETHNPEN
#define GOTGCTL_HNPREQ
#define GOTGCTL_HSTNEGSCS
#define GOTGCTL_BVALOVAL
#define GOTGCTL_BVALOEN
#define GOTGCTL_AVALOVAL
#define GOTGCTL_AVALOEN
#define GOTGCTL_VBVALOVAL
#define GOTGCTL_VBVALOEN
#define GOTGCTL_SESREQ
#define GOTGCTL_SESREQSCS

#define GOTGINT
#define GOTGINT_DBNCE_DONE
#define GOTGINT_A_DEV_TOUT_CHG
#define GOTGINT_HST_NEG_DET
#define GOTGINT_HST_NEG_SUC_STS_CHNG
#define GOTGINT_SES_REQ_SUC_STS_CHNG
#define GOTGINT_SES_END_DET

#define GAHBCFG
#define GAHBCFG_AHB_SINGLE
#define GAHBCFG_NOTI_ALL_DMA_WRIT
#define GAHBCFG_REM_MEM_SUPP
#define GAHBCFG_P_TXF_EMP_LVL
#define GAHBCFG_NP_TXF_EMP_LVL
#define GAHBCFG_DMA_EN
#define GAHBCFG_HBSTLEN_MASK
#define GAHBCFG_HBSTLEN_SHIFT
#define GAHBCFG_HBSTLEN_SINGLE
#define GAHBCFG_HBSTLEN_INCR
#define GAHBCFG_HBSTLEN_INCR4
#define GAHBCFG_HBSTLEN_INCR8
#define GAHBCFG_HBSTLEN_INCR16
#define GAHBCFG_GLBL_INTR_EN
#define GAHBCFG_CTRL_MASK

#define GUSBCFG
#define GUSBCFG_FORCEDEVMODE
#define GUSBCFG_FORCEHOSTMODE
#define GUSBCFG_TXENDDELAY
#define GUSBCFG_ICTRAFFICPULLREMOVE
#define GUSBCFG_ICUSBCAP
#define GUSBCFG_ULPI_INT_PROT_DIS
#define GUSBCFG_INDICATORPASSTHROUGH
#define GUSBCFG_INDICATORCOMPLEMENT
#define GUSBCFG_TERMSELDLPULSE
#define GUSBCFG_ULPI_INT_VBUS_IND
#define GUSBCFG_ULPI_EXT_VBUS_DRV
#define GUSBCFG_ULPI_CLK_SUSP_M
#define GUSBCFG_ULPI_AUTO_RES
#define GUSBCFG_ULPI_FS_LS
#define GUSBCFG_OTG_UTMI_FS_SEL
#define GUSBCFG_PHY_LP_CLK_SEL
#define GUSBCFG_USBTRDTIM_MASK
#define GUSBCFG_USBTRDTIM_SHIFT
#define GUSBCFG_HNPCAP
#define GUSBCFG_SRPCAP
#define GUSBCFG_DDRSEL
#define GUSBCFG_PHYSEL
#define GUSBCFG_FSINTF
#define GUSBCFG_ULPI_UTMI_SEL
#define GUSBCFG_PHYIF16
#define GUSBCFG_PHYIF8
#define GUSBCFG_TOUTCAL_MASK
#define GUSBCFG_TOUTCAL_SHIFT
#define GUSBCFG_TOUTCAL_LIMIT
#define GUSBCFG_TOUTCAL(_x)

#define GRSTCTL
#define GRSTCTL_AHBIDLE
#define GRSTCTL_DMAREQ
#define GRSTCTL_CSFTRST_DONE
#define GRSTCTL_CLOCK_SWITH_TIMER_MASK
#define GRSTCTL_CLOCK_SWITH_TIMER_SHIFT
#define GRSTCTL_CLOCK_SWITH_TIMER_VALUE_19
#define GRSTCTL_CLOCK_SWITH_TIMER_VALUE_15
#define GRSTCTL_CLOCK_SWITH_TIMER_VALUE_147
#define GRSTCTL_CLOCK_SWITH_TIMER_VALUE_50
#define GRSTCTL_CLOCK_SWITH_TIMER_VALUE_100
#define GRSTCTL_CLOCK_SWITH_TIMER_VALUE_125
#define GRSTCTL_CLOCK_SWITH_TIMER_VALUE_200
#define GRSTCTL_CLOCK_SWITH_TIMER_VALUE_DIS
#define GRSTCTL_CLOCK_SWITH_TIMER(_x)
#define GRSTCTL_TXFNUM_MASK
#define GRSTCTL_TXFNUM_SHIFT
#define GRSTCTL_TXFNUM_LIMIT
#define GRSTCTL_TXFNUM(_x)
#define GRSTCTL_TXFFLSH
#define GRSTCTL_RXFFLSH
#define GRSTCTL_IN_TKNQ_FLSH
#define GRSTCTL_FRMCNTRRST
#define GRSTCTL_HSFTRST
#define GRSTCTL_CSFTRST

#define GINTSTS
#define GINTMSK
#define GINTSTS_WKUPINT
#define GINTSTS_SESSREQINT
#define GINTSTS_DISCONNINT
#define GINTSTS_CONIDSTSCHNG
#define GINTSTS_LPMTRANRCVD
#define GINTSTS_PTXFEMP
#define GINTSTS_HCHINT
#define GINTSTS_PRTINT
#define GINTSTS_RESETDET
#define GINTSTS_FET_SUSP
#define GINTSTS_INCOMPL_IP
#define GINTSTS_INCOMPL_SOOUT
#define GINTSTS_INCOMPL_SOIN
#define GINTSTS_OEPINT
#define GINTSTS_IEPINT
#define GINTSTS_EPMIS
#define GINTSTS_RESTOREDONE
#define GINTSTS_EOPF
#define GINTSTS_ISOUTDROP
#define GINTSTS_ENUMDONE
#define GINTSTS_USBRST
#define GINTSTS_USBSUSP
#define GINTSTS_ERLYSUSP
#define GINTSTS_I2CINT
#define GINTSTS_ULPI_CK_INT
#define GINTSTS_GOUTNAKEFF
#define GINTSTS_GINNAKEFF
#define GINTSTS_NPTXFEMP
#define GINTSTS_RXFLVL
#define GINTSTS_SOF
#define GINTSTS_OTGINT
#define GINTSTS_MODEMIS
#define GINTSTS_CURMODE_HOST

#define GRXSTSR
#define GRXSTSP
#define GRXSTS_FN_MASK
#define GRXSTS_FN_SHIFT
#define GRXSTS_PKTSTS_MASK
#define GRXSTS_PKTSTS_SHIFT
#define GRXSTS_PKTSTS_GLOBALOUTNAK
#define GRXSTS_PKTSTS_OUTRX
#define GRXSTS_PKTSTS_HCHIN
#define GRXSTS_PKTSTS_OUTDONE
#define GRXSTS_PKTSTS_HCHIN_XFER_COMP
#define GRXSTS_PKTSTS_SETUPDONE
#define GRXSTS_PKTSTS_DATATOGGLEERR
#define GRXSTS_PKTSTS_SETUPRX
#define GRXSTS_PKTSTS_HCHHALTED
#define GRXSTS_HCHNUM_MASK
#define GRXSTS_HCHNUM_SHIFT
#define GRXSTS_DPID_MASK
#define GRXSTS_DPID_SHIFT
#define GRXSTS_BYTECNT_MASK
#define GRXSTS_BYTECNT_SHIFT
#define GRXSTS_EPNUM_MASK
#define GRXSTS_EPNUM_SHIFT

#define GRXFSIZ
#define GRXFSIZ_DEPTH_MASK
#define GRXFSIZ_DEPTH_SHIFT

#define GNPTXFSIZ
/* Use FIFOSIZE_* constants to access this register */

#define GNPTXSTS
#define GNPTXSTS_NP_TXQ_TOP_MASK
#define GNPTXSTS_NP_TXQ_TOP_SHIFT
#define GNPTXSTS_NP_TXQ_SPC_AVAIL_MASK
#define GNPTXSTS_NP_TXQ_SPC_AVAIL_SHIFT
#define GNPTXSTS_NP_TXQ_SPC_AVAIL_GET(_v)
#define GNPTXSTS_NP_TXF_SPC_AVAIL_MASK
#define GNPTXSTS_NP_TXF_SPC_AVAIL_SHIFT
#define GNPTXSTS_NP_TXF_SPC_AVAIL_GET(_v)

#define GI2CCTL
#define GI2CCTL_BSYDNE
#define GI2CCTL_RW
#define GI2CCTL_I2CDATSE0
#define GI2CCTL_I2CDEVADDR_MASK
#define GI2CCTL_I2CDEVADDR_SHIFT
#define GI2CCTL_I2CSUSPCTL
#define GI2CCTL_ACK
#define GI2CCTL_I2CEN
#define GI2CCTL_ADDR_MASK
#define GI2CCTL_ADDR_SHIFT
#define GI2CCTL_REGADDR_MASK
#define GI2CCTL_REGADDR_SHIFT
#define GI2CCTL_RWDATA_MASK
#define GI2CCTL_RWDATA_SHIFT

#define GPVNDCTL
#define GGPIO
#define GGPIO_STM32_OTG_GCCFG_PWRDWN
#define GGPIO_STM32_OTG_GCCFG_VBDEN
#define GGPIO_STM32_OTG_GCCFG_IDEN

#define GUID
#define GSNPSID
#define GHWCFG1
#define GSNPSID_ID_MASK

#define GHWCFG2
#define GHWCFG2_OTG_ENABLE_IC_USB
#define GHWCFG2_DEV_TOKEN_Q_DEPTH_MASK
#define GHWCFG2_DEV_TOKEN_Q_DEPTH_SHIFT
#define GHWCFG2_HOST_PERIO_TX_Q_DEPTH_MASK
#define GHWCFG2_HOST_PERIO_TX_Q_DEPTH_SHIFT
#define GHWCFG2_NONPERIO_TX_Q_DEPTH_MASK
#define GHWCFG2_NONPERIO_TX_Q_DEPTH_SHIFT
#define GHWCFG2_MULTI_PROC_INT
#define GHWCFG2_DYNAMIC_FIFO
#define GHWCFG2_PERIO_EP_SUPPORTED
#define GHWCFG2_NUM_HOST_CHAN_MASK
#define GHWCFG2_NUM_HOST_CHAN_SHIFT
#define GHWCFG2_NUM_DEV_EP_MASK
#define GHWCFG2_NUM_DEV_EP_SHIFT
#define GHWCFG2_FS_PHY_TYPE_MASK
#define GHWCFG2_FS_PHY_TYPE_SHIFT
#define GHWCFG2_FS_PHY_TYPE_NOT_SUPPORTED
#define GHWCFG2_FS_PHY_TYPE_DEDICATED
#define GHWCFG2_FS_PHY_TYPE_SHARED_UTMI
#define GHWCFG2_FS_PHY_TYPE_SHARED_ULPI
#define GHWCFG2_HS_PHY_TYPE_MASK
#define GHWCFG2_HS_PHY_TYPE_SHIFT
#define GHWCFG2_HS_PHY_TYPE_NOT_SUPPORTED
#define GHWCFG2_HS_PHY_TYPE_UTMI
#define GHWCFG2_HS_PHY_TYPE_ULPI
#define GHWCFG2_HS_PHY_TYPE_UTMI_ULPI
#define GHWCFG2_POINT2POINT
#define GHWCFG2_ARCHITECTURE_MASK
#define GHWCFG2_ARCHITECTURE_SHIFT
#define GHWCFG2_SLAVE_ONLY_ARCH
#define GHWCFG2_EXT_DMA_ARCH
#define GHWCFG2_INT_DMA_ARCH
#define GHWCFG2_OP_MODE_MASK
#define GHWCFG2_OP_MODE_SHIFT
#define GHWCFG2_OP_MODE_HNP_SRP_CAPABLE
#define GHWCFG2_OP_MODE_SRP_ONLY_CAPABLE
#define GHWCFG2_OP_MODE_NO_HNP_SRP_CAPABLE
#define GHWCFG2_OP_MODE_SRP_CAPABLE_DEVICE
#define GHWCFG2_OP_MODE_NO_SRP_CAPABLE_DEVICE
#define GHWCFG2_OP_MODE_SRP_CAPABLE_HOST
#define GHWCFG2_OP_MODE_NO_SRP_CAPABLE_HOST
#define GHWCFG2_OP_MODE_UNDEFINED

#define GHWCFG3
#define GHWCFG3_DFIFO_DEPTH_MASK
#define GHWCFG3_DFIFO_DEPTH_SHIFT
#define GHWCFG3_OTG_LPM_EN
#define GHWCFG3_BC_SUPPORT
#define GHWCFG3_OTG_ENABLE_HSIC
#define GHWCFG3_ADP_SUPP
#define GHWCFG3_SYNCH_RESET_TYPE
#define GHWCFG3_OPTIONAL_FEATURES
#define GHWCFG3_VENDOR_CTRL_IF
#define GHWCFG3_I2C
#define GHWCFG3_OTG_FUNC
#define GHWCFG3_PACKET_SIZE_CNTR_WIDTH_MASK
#define GHWCFG3_PACKET_SIZE_CNTR_WIDTH_SHIFT
#define GHWCFG3_XFER_SIZE_CNTR_WIDTH_MASK
#define GHWCFG3_XFER_SIZE_CNTR_WIDTH_SHIFT

#define GHWCFG4
#define GHWCFG4_DESC_DMA_DYN
#define GHWCFG4_DESC_DMA
#define GHWCFG4_NUM_IN_EPS_MASK
#define GHWCFG4_NUM_IN_EPS_SHIFT
#define GHWCFG4_DED_FIFO_EN
#define GHWCFG4_DED_FIFO_SHIFT
#define GHWCFG4_SESSION_END_FILT_EN
#define GHWCFG4_B_VALID_FILT_EN
#define GHWCFG4_A_VALID_FILT_EN
#define GHWCFG4_VBUS_VALID_FILT_EN
#define GHWCFG4_IDDIG_FILT_EN
#define GHWCFG4_NUM_DEV_MODE_CTRL_EP_MASK
#define GHWCFG4_NUM_DEV_MODE_CTRL_EP_SHIFT
#define GHWCFG4_UTMI_PHY_DATA_WIDTH_MASK
#define GHWCFG4_UTMI_PHY_DATA_WIDTH_SHIFT
#define GHWCFG4_UTMI_PHY_DATA_WIDTH_8
#define GHWCFG4_UTMI_PHY_DATA_WIDTH_16
#define GHWCFG4_UTMI_PHY_DATA_WIDTH_8_OR_16
#define GHWCFG4_ACG_SUPPORTED
#define GHWCFG4_IPG_ISOC_SUPPORTED
#define GHWCFG4_SERVICE_INTERVAL_SUPPORTED
#define GHWCFG4_XHIBER
#define GHWCFG4_HIBER
#define GHWCFG4_MIN_AHB_FREQ
#define GHWCFG4_POWER_OPTIMIZ
#define GHWCFG4_NUM_DEV_PERIO_IN_EP_MASK
#define GHWCFG4_NUM_DEV_PERIO_IN_EP_SHIFT

#define GLPMCFG
#define GLPMCFG_INVSELHSIC
#define GLPMCFG_HSICCON
#define GLPMCFG_RSTRSLPSTS
#define GLPMCFG_ENBESL
#define GLPMCFG_LPM_RETRYCNT_STS_MASK
#define GLPMCFG_LPM_RETRYCNT_STS_SHIFT
#define GLPMCFG_SNDLPM
#define GLPMCFG_RETRY_CNT_MASK
#define GLPMCFG_RETRY_CNT_SHIFT
#define GLPMCFG_LPM_REJECT_CTRL_CONTROL
#define GLPMCFG_LPM_ACCEPT_CTRL_ISOC
#define GLPMCFG_LPM_CHNL_INDX_MASK
#define GLPMCFG_LPM_CHNL_INDX_SHIFT
#define GLPMCFG_L1RESUMEOK
#define GLPMCFG_SLPSTS
#define GLPMCFG_COREL1RES_MASK
#define GLPMCFG_COREL1RES_SHIFT
#define GLPMCFG_HIRD_THRES_MASK
#define GLPMCFG_HIRD_THRES_SHIFT
#define GLPMCFG_HIRD_THRES_EN
#define GLPMCFG_ENBLSLPM
#define GLPMCFG_BREMOTEWAKE
#define GLPMCFG_HIRD_MASK
#define GLPMCFG_HIRD_SHIFT
#define GLPMCFG_APPL1RES
#define GLPMCFG_LPMCAP

#define GPWRDN

#define GPWRDN_ULPI_LATCH_EN_DURING_HIB_ENTRY
#define GPWRDN_MULT_VAL_ID_BC_MASK
#define GPWRDN_MULT_VAL_ID_BC_SHIFT
#define GPWRDN_ADP_INT
#define GPWRDN_BSESSVLD
#define GPWRDN_IDSTS
#define GPWRDN_LINESTATE_MASK
#define GPWRDN_LINESTATE_SHIFT
#define GPWRDN_STS_CHGINT_MSK
#define GPWRDN_STS_CHGINT
#define GPWRDN_SRP_DET_MSK
#define GPWRDN_SRP_DET
#define GPWRDN_CONNECT_DET_MSK
#define GPWRDN_CONNECT_DET
#define GPWRDN_DISCONN_DET_MSK
#define GPWRDN_DISCONN_DET
#define GPWRDN_RST_DET_MSK
#define GPWRDN_RST_DET
#define GPWRDN_LNSTSCHG_MSK
#define GPWRDN_LNSTSCHG
#define GPWRDN_DIS_VBUS
#define GPWRDN_PWRDNSWTCH
#define GPWRDN_PWRDNRSTN
#define GPWRDN_PWRDNCLMP
#define GPWRDN_RESTORE
#define GPWRDN_PMUACTV
#define GPWRDN_PMUINTSEL

#define GDFIFOCFG
#define GDFIFOCFG_EPINFOBASE_MASK
#define GDFIFOCFG_EPINFOBASE_SHIFT
#define GDFIFOCFG_GDFIFOCFG_MASK
#define GDFIFOCFG_GDFIFOCFG_SHIFT

#define ADPCTL
#define ADPCTL_AR_MASK
#define ADPCTL_AR_SHIFT
#define ADPCTL_ADP_TMOUT_INT_MSK
#define ADPCTL_ADP_SNS_INT_MSK
#define ADPCTL_ADP_PRB_INT_MSK
#define ADPCTL_ADP_TMOUT_INT
#define ADPCTL_ADP_SNS_INT
#define ADPCTL_ADP_PRB_INT
#define ADPCTL_ADPENA
#define ADPCTL_ADPRES
#define ADPCTL_ENASNS
#define ADPCTL_ENAPRB
#define ADPCTL_RTIM_MASK
#define ADPCTL_RTIM_SHIFT
#define ADPCTL_PRB_PER_MASK
#define ADPCTL_PRB_PER_SHIFT
#define ADPCTL_PRB_DELTA_MASK
#define ADPCTL_PRB_DELTA_SHIFT
#define ADPCTL_PRB_DSCHRG_MASK
#define ADPCTL_PRB_DSCHRG_SHIFT

#define GREFCLK
#define GREFCLK_REFCLKPER_MASK
#define GREFCLK_REFCLKPER_SHIFT
#define GREFCLK_REF_CLK_MODE
#define GREFCLK_SOF_CNT_WKUP_ALERT_MASK
#define GREFCLK_SOF_CNT_WKUP_ALERT_SHIFT

#define GINTMSK2
#define GINTMSK2_WKUP_ALERT_INT_MSK

#define GINTSTS2
#define GINTSTS2_WKUP_ALERT_INT

#define HPTXFSIZ
/* Use FIFOSIZE_* constants to access this register */

#define DPTXFSIZN(_a)
/* Use FIFOSIZE_* constants to access this register */

/* These apply to the GNPTXFSIZ, HPTXFSIZ and DPTXFSIZN registers */
#define FIFOSIZE_DEPTH_MASK
#define FIFOSIZE_DEPTH_SHIFT
#define FIFOSIZE_STARTADDR_MASK
#define FIFOSIZE_STARTADDR_SHIFT
#define FIFOSIZE_DEPTH_GET(_x)

/* Device mode registers */

#define DCFG
#define DCFG_DESCDMA_EN
#define DCFG_EPMISCNT_MASK
#define DCFG_EPMISCNT_SHIFT
#define DCFG_EPMISCNT_LIMIT
#define DCFG_EPMISCNT(_x)
#define DCFG_IPG_ISOC_SUPPORDED
#define DCFG_PERFRINT_MASK
#define DCFG_PERFRINT_SHIFT
#define DCFG_PERFRINT_LIMIT
#define DCFG_PERFRINT(_x)
#define DCFG_DEVADDR_MASK
#define DCFG_DEVADDR_SHIFT
#define DCFG_DEVADDR_LIMIT
#define DCFG_DEVADDR(_x)
#define DCFG_NZ_STS_OUT_HSHK
#define DCFG_DEVSPD_MASK
#define DCFG_DEVSPD_SHIFT
#define DCFG_DEVSPD_HS
#define DCFG_DEVSPD_FS
#define DCFG_DEVSPD_LS
#define DCFG_DEVSPD_FS48

#define DCTL
#define DCTL_SERVICE_INTERVAL_SUPPORTED
#define DCTL_PWRONPRGDONE
#define DCTL_CGOUTNAK
#define DCTL_SGOUTNAK
#define DCTL_CGNPINNAK
#define DCTL_SGNPINNAK
#define DCTL_TSTCTL_MASK
#define DCTL_TSTCTL_SHIFT
#define DCTL_GOUTNAKSTS
#define DCTL_GNPINNAKSTS
#define DCTL_SFTDISCON
#define DCTL_RMTWKUPSIG

#define DSTS
#define DSTS_SOFFN_MASK
#define DSTS_SOFFN_SHIFT
#define DSTS_SOFFN_LIMIT
#define DSTS_SOFFN(_x)
#define DSTS_ERRATICERR
#define DSTS_ENUMSPD_MASK
#define DSTS_ENUMSPD_SHIFT
#define DSTS_ENUMSPD_HS
#define DSTS_ENUMSPD_FS
#define DSTS_ENUMSPD_LS
#define DSTS_ENUMSPD_FS48
#define DSTS_SUSPSTS

#define DIEPMSK
#define DIEPMSK_NAKMSK
#define DIEPMSK_BNAININTRMSK
#define DIEPMSK_TXFIFOUNDRNMSK
#define DIEPMSK_TXFIFOEMPTY
#define DIEPMSK_INEPNAKEFFMSK
#define DIEPMSK_INTKNEPMISMSK
#define DIEPMSK_INTKNTXFEMPMSK
#define DIEPMSK_TIMEOUTMSK
#define DIEPMSK_AHBERRMSK
#define DIEPMSK_EPDISBLDMSK
#define DIEPMSK_XFERCOMPLMSK

#define DOEPMSK
#define DOEPMSK_BNAMSK
#define DOEPMSK_BACK2BACKSETUP
#define DOEPMSK_STSPHSERCVDMSK
#define DOEPMSK_OUTTKNEPDISMSK
#define DOEPMSK_SETUPMSK
#define DOEPMSK_AHBERRMSK
#define DOEPMSK_EPDISBLDMSK
#define DOEPMSK_XFERCOMPLMSK

#define DAINT
#define DAINTMSK
#define DAINT_OUTEP_SHIFT
#define DAINT_OUTEP(_x)
#define DAINT_INEP(_x)

#define DTKNQR1
#define DTKNQR2
#define DTKNQR3
#define DTKNQR4
#define DIEPEMPMSK

#define DVBUSDIS
#define DVBUSPULSE

#define DIEPCTL0
#define DIEPCTL(_a)

#define DOEPCTL0
#define DOEPCTL(_a)

/* EP0 specialness:
 * bits[29..28] - reserved (no SetD0PID, SetD1PID)
 * bits[25..22] - should always be zero, this isn't a periodic endpoint
 * bits[10..0]  - MPS setting different for EP0
 */
#define D0EPCTL_MPS_MASK
#define D0EPCTL_MPS_SHIFT
#define D0EPCTL_MPS_64
#define D0EPCTL_MPS_32
#define D0EPCTL_MPS_16
#define D0EPCTL_MPS_8

#define DXEPCTL_EPENA
#define DXEPCTL_EPDIS
#define DXEPCTL_SETD1PID
#define DXEPCTL_SETODDFR
#define DXEPCTL_SETD0PID
#define DXEPCTL_SETEVENFR
#define DXEPCTL_SNAK
#define DXEPCTL_CNAK
#define DXEPCTL_TXFNUM_MASK
#define DXEPCTL_TXFNUM_SHIFT
#define DXEPCTL_TXFNUM_LIMIT
#define DXEPCTL_TXFNUM(_x)
#define DXEPCTL_STALL
#define DXEPCTL_SNP
#define DXEPCTL_EPTYPE_MASK
#define DXEPCTL_EPTYPE_CONTROL
#define DXEPCTL_EPTYPE_ISO
#define DXEPCTL_EPTYPE_BULK
#define DXEPCTL_EPTYPE_INTERRUPT

#define DXEPCTL_NAKSTS
#define DXEPCTL_DPID
#define DXEPCTL_EOFRNUM
#define DXEPCTL_USBACTEP
#define DXEPCTL_NEXTEP_MASK
#define DXEPCTL_NEXTEP_SHIFT
#define DXEPCTL_NEXTEP_LIMIT
#define DXEPCTL_NEXTEP(_x)
#define DXEPCTL_MPS_MASK
#define DXEPCTL_MPS_SHIFT
#define DXEPCTL_MPS_LIMIT
#define DXEPCTL_MPS(_x)

#define DIEPINT(_a)
#define DOEPINT(_a)
#define DXEPINT_SETUP_RCVD
#define DXEPINT_NYETINTRPT
#define DXEPINT_NAKINTRPT
#define DXEPINT_BBLEERRINTRPT
#define DXEPINT_PKTDRPSTS
#define DXEPINT_BNAINTR
#define DXEPINT_TXFIFOUNDRN
#define DXEPINT_OUTPKTERR
#define DXEPINT_TXFEMP
#define DXEPINT_INEPNAKEFF
#define DXEPINT_BACK2BACKSETUP
#define DXEPINT_INTKNEPMIS
#define DXEPINT_STSPHSERCVD
#define DXEPINT_INTKNTXFEMP
#define DXEPINT_OUTTKNEPDIS
#define DXEPINT_TIMEOUT
#define DXEPINT_SETUP
#define DXEPINT_AHBERR
#define DXEPINT_EPDISBLD
#define DXEPINT_XFERCOMPL

#define DIEPTSIZ0
#define DIEPTSIZ0_PKTCNT_MASK
#define DIEPTSIZ0_PKTCNT_SHIFT
#define DIEPTSIZ0_PKTCNT_LIMIT
#define DIEPTSIZ0_PKTCNT(_x)
#define DIEPTSIZ0_XFERSIZE_MASK
#define DIEPTSIZ0_XFERSIZE_SHIFT
#define DIEPTSIZ0_XFERSIZE_LIMIT
#define DIEPTSIZ0_XFERSIZE(_x)

#define DOEPTSIZ0
#define DOEPTSIZ0_SUPCNT_MASK
#define DOEPTSIZ0_SUPCNT_SHIFT
#define DOEPTSIZ0_SUPCNT_LIMIT
#define DOEPTSIZ0_SUPCNT(_x)
#define DOEPTSIZ0_PKTCNT
#define DOEPTSIZ0_XFERSIZE_MASK
#define DOEPTSIZ0_XFERSIZE_SHIFT

#define DIEPTSIZ(_a)
#define DOEPTSIZ(_a)
#define DXEPTSIZ_MC_MASK
#define DXEPTSIZ_MC_SHIFT
#define DXEPTSIZ_MC_LIMIT
#define DXEPTSIZ_MC(_x)
#define DXEPTSIZ_PKTCNT_MASK
#define DXEPTSIZ_PKTCNT_SHIFT
#define DXEPTSIZ_PKTCNT_LIMIT
#define DXEPTSIZ_PKTCNT_GET(_v)
#define DXEPTSIZ_PKTCNT(_x)
#define DXEPTSIZ_XFERSIZE_MASK
#define DXEPTSIZ_XFERSIZE_SHIFT
#define DXEPTSIZ_XFERSIZE_LIMIT
#define DXEPTSIZ_XFERSIZE_GET(_v)
#define DXEPTSIZ_XFERSIZE(_x)

#define DIEPDMA(_a)
#define DOEPDMA(_a)

#define DTXFSTS(_a)

#define PCGCTL
#define PCGCTL_IF_DEV_MODE
#define PCGCTL_P2HD_PRT_SPD_MASK
#define PCGCTL_P2HD_PRT_SPD_SHIFT
#define PCGCTL_P2HD_DEV_ENUM_SPD_MASK
#define PCGCTL_P2HD_DEV_ENUM_SPD_SHIFT
#define PCGCTL_MAC_DEV_ADDR_MASK
#define PCGCTL_MAC_DEV_ADDR_SHIFT
#define PCGCTL_MAX_TERMSEL
#define PCGCTL_MAX_XCVRSELECT_MASK
#define PCGCTL_MAX_XCVRSELECT_SHIFT
#define PCGCTL_PORT_POWER
#define PCGCTL_PRT_CLK_SEL_MASK
#define PCGCTL_PRT_CLK_SEL_SHIFT
#define PCGCTL_ESS_REG_RESTORED
#define PCGCTL_EXTND_HIBER_SWITCH
#define PCGCTL_EXTND_HIBER_PWRCLMP
#define PCGCTL_ENBL_EXTND_HIBER
#define PCGCTL_RESTOREMODE
#define PCGCTL_RESETAFTSUSP
#define PCGCTL_DEEP_SLEEP
#define PCGCTL_PHY_IN_SLEEP
#define PCGCTL_ENBL_SLEEP_GATING
#define PCGCTL_RSTPDWNMODULE
#define PCGCTL_PWRCLMP
#define PCGCTL_GATEHCLK
#define PCGCTL_STOPPCLK

#define PCGCCTL1
#define PCGCCTL1_TIMER
#define PCGCCTL1_GATEEN

#define EPFIFO(_a)

/* Host Mode Registers */

#define HCFG
#define HCFG_MODECHTIMEN
#define HCFG_PERSCHEDENA
#define HCFG_FRLISTEN_MASK
#define HCFG_FRLISTEN_SHIFT
#define HCFG_FRLISTEN_8
#define FRLISTEN_8_SIZE
#define HCFG_FRLISTEN_16
#define FRLISTEN_16_SIZE
#define HCFG_FRLISTEN_32
#define FRLISTEN_32_SIZE
#define HCFG_FRLISTEN_64
#define FRLISTEN_64_SIZE
#define HCFG_DESCDMA
#define HCFG_RESVALID_MASK
#define HCFG_RESVALID_SHIFT
#define HCFG_ENA32KHZ
#define HCFG_FSLSSUPP
#define HCFG_FSLSPCLKSEL_MASK
#define HCFG_FSLSPCLKSEL_SHIFT
#define HCFG_FSLSPCLKSEL_30_60_MHZ
#define HCFG_FSLSPCLKSEL_48_MHZ
#define HCFG_FSLSPCLKSEL_6_MHZ

#define HFIR
#define HFIR_FRINT_MASK
#define HFIR_FRINT_SHIFT
#define HFIR_RLDCTRL

#define HFNUM
#define HFNUM_FRREM_MASK
#define HFNUM_FRREM_SHIFT
#define HFNUM_FRNUM_MASK
#define HFNUM_FRNUM_SHIFT
#define HFNUM_MAX_FRNUM

#define HPTXSTS
#define TXSTS_QTOP_ODD
#define TXSTS_QTOP_CHNEP_MASK
#define TXSTS_QTOP_CHNEP_SHIFT
#define TXSTS_QTOP_TOKEN_MASK
#define TXSTS_QTOP_TOKEN_SHIFT
#define TXSTS_QTOP_TERMINATE
#define TXSTS_QSPCAVAIL_MASK
#define TXSTS_QSPCAVAIL_SHIFT
#define TXSTS_FSPCAVAIL_MASK
#define TXSTS_FSPCAVAIL_SHIFT

#define HAINT
#define HAINTMSK
#define HFLBADDR

#define HPRT0
#define HPRT0_SPD_MASK
#define HPRT0_SPD_SHIFT
#define HPRT0_SPD_HIGH_SPEED
#define HPRT0_SPD_FULL_SPEED
#define HPRT0_SPD_LOW_SPEED
#define HPRT0_TSTCTL_MASK
#define HPRT0_TSTCTL_SHIFT
#define HPRT0_PWR
#define HPRT0_LNSTS_MASK
#define HPRT0_LNSTS_SHIFT
#define HPRT0_RST
#define HPRT0_SUSP
#define HPRT0_RES
#define HPRT0_OVRCURRCHG
#define HPRT0_OVRCURRACT
#define HPRT0_ENACHG
#define HPRT0_ENA
#define HPRT0_CONNDET
#define HPRT0_CONNSTS

#define HCCHAR(_ch)
#define HCCHAR_CHENA
#define HCCHAR_CHDIS
#define HCCHAR_ODDFRM
#define HCCHAR_DEVADDR_MASK
#define HCCHAR_DEVADDR_SHIFT
#define HCCHAR_MULTICNT_MASK
#define HCCHAR_MULTICNT_SHIFT
#define HCCHAR_EPTYPE_MASK
#define HCCHAR_EPTYPE_SHIFT
#define HCCHAR_LSPDDEV
#define HCCHAR_EPDIR
#define HCCHAR_EPNUM_MASK
#define HCCHAR_EPNUM_SHIFT
#define HCCHAR_MPS_MASK
#define HCCHAR_MPS_SHIFT

#define HCSPLT(_ch)
#define HCSPLT_SPLTENA
#define HCSPLT_COMPSPLT
#define HCSPLT_XACTPOS_MASK
#define HCSPLT_XACTPOS_SHIFT
#define HCSPLT_XACTPOS_MID
#define HCSPLT_XACTPOS_END
#define HCSPLT_XACTPOS_BEGIN
#define HCSPLT_XACTPOS_ALL
#define HCSPLT_HUBADDR_MASK
#define HCSPLT_HUBADDR_SHIFT
#define HCSPLT_PRTADDR_MASK
#define HCSPLT_PRTADDR_SHIFT

#define HCINT(_ch)
#define HCINTMSK(_ch)
#define HCINTMSK_RESERVED14_31
#define HCINTMSK_FRM_LIST_ROLL
#define HCINTMSK_XCS_XACT
#define HCINTMSK_BNA
#define HCINTMSK_DATATGLERR
#define HCINTMSK_FRMOVRUN
#define HCINTMSK_BBLERR
#define HCINTMSK_XACTERR
#define HCINTMSK_NYET
#define HCINTMSK_ACK
#define HCINTMSK_NAK
#define HCINTMSK_STALL
#define HCINTMSK_AHBERR
#define HCINTMSK_CHHLTD
#define HCINTMSK_XFERCOMPL

#define HCTSIZ(_ch)
#define TSIZ_DOPNG
#define TSIZ_SC_MC_PID_MASK
#define TSIZ_SC_MC_PID_SHIFT
#define TSIZ_SC_MC_PID_DATA0
#define TSIZ_SC_MC_PID_DATA2
#define TSIZ_SC_MC_PID_DATA1
#define TSIZ_SC_MC_PID_MDATA
#define TSIZ_SC_MC_PID_SETUP
#define TSIZ_PKTCNT_MASK
#define TSIZ_PKTCNT_SHIFT
#define TSIZ_NTD_MASK
#define TSIZ_NTD_SHIFT
#define TSIZ_SCHINFO_MASK
#define TSIZ_SCHINFO_SHIFT
#define TSIZ_XFERSIZE_MASK
#define TSIZ_XFERSIZE_SHIFT

#define HCDMA(_ch)

#define HCDMAB(_ch)

#define HCFIFO(_ch)

/**
 * struct dwc2_dma_desc - DMA descriptor structure,
 * used for both host and gadget modes
 *
 * @status: DMA descriptor status quadlet
 * @buf:    DMA descriptor data buffer pointer
 *
 * DMA Descriptor structure contains two quadlets:
 * Status quadlet and Data buffer pointer.
 */
struct dwc2_dma_desc {} __packed;

/* Host Mode DMA descriptor status quadlet */

#define HOST_DMA_A
#define HOST_DMA_STS_MASK
#define HOST_DMA_STS_SHIFT
#define HOST_DMA_STS_PKTERR
#define HOST_DMA_EOL
#define HOST_DMA_IOC
#define HOST_DMA_SUP
#define HOST_DMA_ALT_QTD
#define HOST_DMA_QTD_OFFSET_MASK
#define HOST_DMA_QTD_OFFSET_SHIFT
#define HOST_DMA_ISOC_NBYTES_MASK
#define HOST_DMA_ISOC_NBYTES_SHIFT
#define HOST_DMA_NBYTES_MASK
#define HOST_DMA_NBYTES_SHIFT
#define HOST_DMA_NBYTES_LIMIT

/* Device Mode DMA descriptor status quadlet */

#define DEV_DMA_BUFF_STS_MASK
#define DEV_DMA_BUFF_STS_SHIFT
#define DEV_DMA_BUFF_STS_HREADY
#define DEV_DMA_BUFF_STS_DMABUSY
#define DEV_DMA_BUFF_STS_DMADONE
#define DEV_DMA_BUFF_STS_HBUSY
#define DEV_DMA_STS_MASK
#define DEV_DMA_STS_SHIFT
#define DEV_DMA_STS_SUCC
#define DEV_DMA_STS_BUFF_FLUSH
#define DEV_DMA_STS_BUFF_ERR
#define DEV_DMA_L
#define DEV_DMA_SHORT
#define DEV_DMA_IOC
#define DEV_DMA_SR
#define DEV_DMA_MTRF
#define DEV_DMA_ISOC_PID_MASK
#define DEV_DMA_ISOC_PID_SHIFT
#define DEV_DMA_ISOC_PID_DATA0
#define DEV_DMA_ISOC_PID_DATA2
#define DEV_DMA_ISOC_PID_DATA1
#define DEV_DMA_ISOC_PID_MDATA
#define DEV_DMA_ISOC_FRNUM_MASK
#define DEV_DMA_ISOC_FRNUM_SHIFT
#define DEV_DMA_ISOC_TX_NBYTES_MASK
#define DEV_DMA_ISOC_TX_NBYTES_LIMIT
#define DEV_DMA_ISOC_RX_NBYTES_MASK
#define DEV_DMA_ISOC_RX_NBYTES_LIMIT
#define DEV_DMA_ISOC_NBYTES_SHIFT
#define DEV_DMA_NBYTES_MASK
#define DEV_DMA_NBYTES_SHIFT
#define DEV_DMA_NBYTES_LIMIT

#define MAX_DMA_DESC_NUM_GENERIC
#define MAX_DMA_DESC_NUM_HS_ISOC

#endif /* __DWC2_HW_H__ */