--- zzzz-none-000/linux-4.4.60/drivers/usb/dwc3/core.h 2017-04-08 07:53:53.000000000 +0000 +++ scorpion-7490-727/linux-4.4.60/drivers/usb/dwc3/core.h 2021-02-04 17:41:59.000000000 +0000 @@ -31,6 +31,7 @@ #include #include #include +#include #include @@ -105,6 +106,7 @@ #define DWC3_GPRTBIMAP_HS1 0xc184 #define DWC3_GPRTBIMAP_FS0 0xc188 #define DWC3_GPRTBIMAP_FS1 0xc18c +#define DWC3_GUCTL2 0xc19c #define DWC3_VER_NUMBER 0xc1a0 #define DWC3_VER_TYPE 0xc1a4 @@ -172,6 +174,7 @@ #define DWC3_GCTL_U2EXIT_LFPS (1 << 2) #define DWC3_GCTL_GBLHIBERNATIONEN (1 << 1) #define DWC3_GCTL_DSBLCLKGTNG (1 << 0) +#define DWC3_GCTL2_ENABLEEPCACHEEVICT (1 << 12) /* Global USB2 PHY Configuration Register */ #define DWC3_GUSB2PHYCFG_PHYSOFTRST (1 << 31) @@ -640,6 +643,20 @@ __le64 dma_adr[DWC3_MAX_HIBER_SCRATCHBUFS]; }; +#define DWC3_CONTROLLER_ERROR_EVENT 0 +#define DWC3_CONTROLLER_RESET_EVENT 1 +#define DWC3_CONTROLLER_POST_RESET_EVENT 2 +#define DWC3_CORE_PM_PREPARE_EVENT 3 +#define DWC3_CORE_PM_COMPLETE_EVENT 4 +#define DWC3_CORE_PM_SUSPEND_EVENT 5 +#define DWC3_CORE_PM_RESUME_EVENT 6 +#define DWC3_CONTROLLER_POST_INITIALIZATION_EVENT 7 +#define DWC3_CONTROLLER_CONNDONE_EVENT 8 +#define DWC3_CONTROLLER_NOTIFY_OTG_EVENT 9 +#define DWC3_CONTROLLER_SET_CURRENT_DRAW_EVENT 10 +#define DWC3_CONTROLLER_RESTART_USB_SESSION 11 + +#define MAX_INTR_STATS 10 /** * struct dwc3 - representation of our controller * @ctrl_req: usb control request which is used for ep0 @@ -804,6 +821,8 @@ #define DWC3_REVISION_260A 0x5533260a #define DWC3_REVISION_270A 0x5533270a #define DWC3_REVISION_280A 0x5533280a +#define DWC3_REVISION_300A 0x5533300a + /* * NOTICE: we're using bit 31 as a "is usb 3.1" flag. This is really @@ -840,6 +859,9 @@ const char *hsphy_interface; + /* emulation targets specific */ + bool emulation; + unsigned delayed_status:1; unsigned ep0_bounced:1; unsigned ep0_expect_in:1; @@ -865,9 +887,18 @@ unsigned dis_u3_susphy_quirk:1; unsigned dis_u2_susphy_quirk:1; unsigned dis_enblslpm_quirk:1; + unsigned usb3_dev_reset_quirk:1; unsigned tx_de_emphasis_quirk:1; unsigned tx_de_emphasis:2; + atomic_t in_lpm; + + unsigned enable_usb2susphy_quirk:1; + struct usb_susphy susphy; + + unsigned enable_usb2_host_discon_quirk:1; + u32 phy_misc_reg; + u32 phy_host_disc_on; }; /* -------------------------------------------------------------------------- */