diff options
Diffstat (limited to 'drivers/usb/dwc3/core.h')
| -rw-r--r-- | drivers/usb/dwc3/core.h | 25 | 
1 files changed, 16 insertions, 9 deletions
diff --git a/drivers/usb/dwc3/core.h b/drivers/usb/dwc3/core.h index 582ebd9cf9c2..1f043c31a096 100644 --- a/drivers/usb/dwc3/core.h +++ b/drivers/usb/dwc3/core.h @@ -263,6 +263,7 @@  #define DWC3_GUCTL1_DEV_FORCE_20_CLK_FOR_30_CLK	BIT(26)  #define DWC3_GUCTL1_DEV_L1_EXIT_BY_HW		BIT(24)  #define DWC3_GUCTL1_PARKMODE_DISABLE_SS		BIT(17) +#define DWC3_GUCTL1_PARKMODE_DISABLE_HS		BIT(16)  #define DWC3_GUCTL1_RESUME_OPMODE_HS_HOST	BIT(10)  /* Global Status Register */ @@ -280,6 +281,7 @@  /* Global USB2 PHY Configuration Register */  #define DWC3_GUSB2PHYCFG_PHYSOFTRST	BIT(31)  #define DWC3_GUSB2PHYCFG_U2_FREECLK_EXISTS	BIT(30) +#define DWC3_GUSB2PHYCFG_ULPIEXTVBUSDRV	BIT(17)  #define DWC3_GUSB2PHYCFG_SUSPHY		BIT(6)  #define DWC3_GUSB2PHYCFG_ULPI_UTMI	BIT(4)  #define DWC3_GUSB2PHYCFG_ENBLSLPM	BIT(8) @@ -526,6 +528,7 @@  #define DWC3_DGCMD_SET_ENDPOINT_NRDY	0x0c  #define DWC3_DGCMD_SET_ENDPOINT_PRIME	0x0d  #define DWC3_DGCMD_RUN_SOC_BUS_LOOPBACK	0x10 +#define DWC3_DGCMD_DEV_NOTIFICATION	0x07  #define DWC3_DGCMD_STATUS(n)		(((n) >> 12) & 0x0F)  #define DWC3_DGCMD_CMDACT		BIT(10) @@ -538,6 +541,8 @@  #define DWC3_DGCMDPAR_TX_FIFO			BIT(5)  #define DWC3_DGCMDPAR_LOOPBACK_DIS		(0 << 0)  #define DWC3_DGCMDPAR_LOOPBACK_ENA		BIT(0) +#define DWC3_DGCMDPAR_DN_FUNC_WAKE		BIT(0) +#define DWC3_DGCMDPAR_INTF_SEL(n)		((n) << 4)  /* Device Endpoint Command Register */  #define DWC3_DEPCMD_PARAM_SHIFT		16 @@ -969,12 +974,10 @@ struct dwc3_scratchpad_array {   * @drd_work: workqueue used for role swapping   * @ep0_trb: trb which is used for the ctrl_req   * @bounce: address of bounce buffer - * @scratchbuf: address of scratch buffer   * @setup_buf: used while precessing STD USB requests   * @ep0_trb_addr: dma address of @ep0_trb   * @bounce_addr: dma address of @bounce   * @ep0_usb_req: dummy req used while handling STD USB requests - * @scratch_addr: dma address of scratchbuf   * @ep0_in_setup: one control transfer is completed and enter setup phase   * @lock: for synchronizing   * @mutex: for mode switching @@ -999,7 +1002,6 @@ struct dwc3_scratchpad_array {   * @current_otg_role: current role of operation while using the OTG block   * @desired_otg_role: desired role of operation while using the OTG block   * @otg_restart_host: flag that OTG controller needs to restart host - * @nr_scratch: number of scratch buffers   * @u1u2: only used on revisions <1.83a for workaround   * @maximum_speed: maximum speed requested (mainly for testing purposes)   * @max_ssp_rate: SuperSpeed Plus maximum signaling rate and lane count @@ -1056,7 +1058,6 @@ struct dwc3_scratchpad_array {   * @delayed_status: true when gadget driver asks for delayed status   * @ep0_bounced: true when we used bounce buffer   * @ep0_expect_in: true when we expect a DATA IN transfer - * @has_hibernation: true when dwc3 was configured with Hibernation   * @sysdev_is_parent: true when dwc3 device has a parent driver   * @has_lpm_erratum: true when core was configured with LPM Erratum. Note that   *			there's now way for software to detect this in runtime. @@ -1098,10 +1099,14 @@ struct dwc3_scratchpad_array {   *			change quirk.   * @dis_tx_ipgap_linecheck_quirk: set if we disable u2mac linestate   *			check during HS transmit. - * @resume-hs-terminations: Set if we enable quirk for fixing improper crc + * @resume_hs_terminations: Set if we enable quirk for fixing improper crc   *			generation after resume from suspend. + * @ulpi_ext_vbus_drv: Set to confiure the upli chip to drives CPEN pin + *			VBUS with an external supply.   * @parkmode_disable_ss_quirk: set if we need to disable all SuperSpeed   *			instances in park mode. + * @parkmode_disable_hs_quirk: set if we need to disable all HishSpeed + *			instances in park mode.   * @tx_de_emphasis_quirk: set if we enable Tx de-emphasis quirk   * @tx_de_emphasis: Tx de-emphasis value   *	0	- -6dB de-emphasis @@ -1110,6 +1115,8 @@ struct dwc3_scratchpad_array {   *	3	- Reserved   * @dis_metastability_quirk: set to disable metastability quirk.   * @dis_split_quirk: set to disable split boundary. + * @wakeup_configured: set if the device is configured for remote wakeup. + * @suspended: set to track suspend event due to U3/L2.   * @imod_interval: set the interrupt moderation interval in 250ns   *			increments or 0 to disable.   * @max_cfg_eps: current max number of IN eps used across all USB configs. @@ -1123,11 +1130,9 @@ struct dwc3 {  	struct work_struct	drd_work;  	struct dwc3_trb		*ep0_trb;  	void			*bounce; -	void			*scratchbuf;  	u8			*setup_buf;  	dma_addr_t		ep0_trb_addr;  	dma_addr_t		bounce_addr; -	dma_addr_t		scratch_addr;  	struct dwc3_request	ep0_usb_req;  	struct completion	ep0_in_setup; @@ -1187,7 +1192,6 @@ struct dwc3 {  	u32			current_otg_role;  	u32			desired_otg_role;  	bool			otg_restart_host; -	u32			nr_scratch;  	u32			u1u2;  	u32			maximum_speed;  	u32			gadget_max_speed; @@ -1284,7 +1288,6 @@ struct dwc3 {  	unsigned		delayed_status:1;  	unsigned		ep0_bounced:1;  	unsigned		ep0_expect_in:1; -	unsigned		has_hibernation:1;  	unsigned		sysdev_is_parent:1;  	unsigned		has_lpm_erratum:1;  	unsigned		is_utmi_l1_suspend:1; @@ -1317,7 +1320,9 @@ struct dwc3 {  	unsigned		dis_del_phy_power_chg_quirk:1;  	unsigned		dis_tx_ipgap_linecheck_quirk:1;  	unsigned		resume_hs_terminations:1; +	unsigned		ulpi_ext_vbus_drv:1;  	unsigned		parkmode_disable_ss_quirk:1; +	unsigned		parkmode_disable_hs_quirk:1;  	unsigned		gfladj_refclk_lpm_sel:1;  	unsigned		tx_de_emphasis_quirk:1; @@ -1327,6 +1332,8 @@ struct dwc3 {  	unsigned		dis_split_quirk:1;  	unsigned		async_callbacks:1; +	unsigned		wakeup_configured:1; +	unsigned		suspended:1;  	u16			imod_interval;  |