Blame view

include/dwc3-uboot.h 1.48 KB
83d290c56   Tom Rini   SPDX: Convert all...
1
  /* SPDX-License-Identifier: GPL-2.0 */
da0d9e42a   Kishon Vijay Abraham I   include: dwc3-ubo...
2
3
4
5
6
  /* include/dwc3-uboot.h
   *
   * Copyright (c) 2015 Texas Instruments Incorporated - http://www.ti.com
   *
   * Designware SuperSpeed USB uboot init
da0d9e42a   Kishon Vijay Abraham I   include: dwc3-ubo...
7
8
9
10
11
12
13
14
   */
  
  #ifndef __DWC3_UBOOT_H_
  #define __DWC3_UBOOT_H_
  
  #include <linux/usb/otg.h>
  
  struct dwc3_device {
4835c737f   Siva Durga Prasad Paladugu   usb: dwc3: Correc...
15
  	unsigned long base;
da0d9e42a   Kishon Vijay Abraham I   include: dwc3-ubo...
16
17
  	enum usb_dr_mode dr_mode;
  	u32 maximum_speed;
45cf59ff7   Li Jun   MLK-16273-1 usb: ...
18
  	u16 power_down_scale;
da0d9e42a   Kishon Vijay Abraham I   include: dwc3-ubo...
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
  	unsigned tx_fifo_resize:1;
  	unsigned has_lpm_erratum;
  	u8 lpm_nyet_threshold;
  	unsigned is_utmi_l1_suspend;
  	u8 hird_threshold;
  	unsigned disable_scramble_quirk;
  	unsigned u2exit_lfps_quirk;
  	unsigned u2ss_inp3_quirk;
  	unsigned req_p1p2p3_quirk;
  	unsigned del_p1p2p3_quirk;
  	unsigned del_phy_power_chg_quirk;
  	unsigned lfps_filter_quirk;
  	unsigned rx_detect_poll_quirk;
  	unsigned dis_u3_susphy_quirk;
  	unsigned dis_u2_susphy_quirk;
  	unsigned tx_de_emphasis_quirk;
  	unsigned tx_de_emphasis;
793d347f5   Kishon Vijay Abraham I   dwc3: core: add s...
36
  	int index;
da0d9e42a   Kishon Vijay Abraham I   include: dwc3-ubo...
37
38
39
  };
  
  int dwc3_uboot_init(struct dwc3_device *dev);
793d347f5   Kishon Vijay Abraham I   dwc3: core: add s...
40
  void dwc3_uboot_exit(int index);
27d3b89d3   Kishon Vijay Abraham I   dwc3: core: added...
41
  void dwc3_uboot_handle_interrupt(int index);
d648a50c0   Jean-Jacques Hiblot   dwc3: move phy op...
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
  
  struct phy;
  #if CONFIG_IS_ENABLED(PHY) && CONFIG_IS_ENABLED(DM_USB)
  int dwc3_setup_phy(struct udevice *dev, struct phy **array, int *num_phys);
  int dwc3_shutdown_phy(struct udevice *dev, struct phy *usb_phys, int num_phys);
  #else
  static inline int dwc3_setup_phy(struct udevice *dev, struct phy **array,
  				 int *num_phys)
  {
  	return -ENOTSUPP;
  }
  
  static inline int dwc3_shutdown_phy(struct udevice *dev, struct phy *usb_phys,
  				    int num_phys)
  {
  	return -ENOTSUPP;
  }
  #endif
da0d9e42a   Kishon Vijay Abraham I   include: dwc3-ubo...
60
  #endif /* __DWC3_UBOOT_H_ */