dwc3-uboot.h 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. /* SPDX-License-Identifier: GPL-2.0 */
  2. /* include/dwc3-uboot.h
  3. *
  4. * Copyright (c) 2015 Texas Instruments Incorporated - http://www.ti.com
  5. *
  6. * Designware SuperSpeed USB uboot init
  7. */
  8. #ifndef __DWC3_UBOOT_H_
  9. #define __DWC3_UBOOT_H_
  10. #include <linux/usb/otg.h>
  11. struct dwc3_device {
  12. unsigned long base;
  13. enum usb_dr_mode dr_mode;
  14. u32 maximum_speed;
  15. unsigned tx_fifo_resize:1;
  16. unsigned has_lpm_erratum;
  17. u8 lpm_nyet_threshold;
  18. unsigned is_utmi_l1_suspend;
  19. u8 hird_threshold;
  20. unsigned disable_scramble_quirk;
  21. unsigned u2exit_lfps_quirk;
  22. unsigned u2ss_inp3_quirk;
  23. unsigned req_p1p2p3_quirk;
  24. unsigned del_p1p2p3_quirk;
  25. unsigned del_phy_power_chg_quirk;
  26. unsigned lfps_filter_quirk;
  27. unsigned rx_detect_poll_quirk;
  28. unsigned dis_u3_susphy_quirk;
  29. unsigned dis_u2_susphy_quirk;
  30. unsigned tx_de_emphasis_quirk;
  31. unsigned tx_de_emphasis;
  32. int index;
  33. };
  34. int dwc3_uboot_init(struct dwc3_device *dev);
  35. void dwc3_uboot_exit(int index);
  36. void dwc3_uboot_handle_interrupt(int index);
  37. struct phy;
  38. #if CONFIG_IS_ENABLED(PHY) && CONFIG_IS_ENABLED(DM_USB)
  39. int dwc3_setup_phy(struct udevice *dev, struct phy **array, int *num_phys);
  40. int dwc3_shutdown_phy(struct udevice *dev, struct phy *usb_phys, int num_phys);
  41. #else
  42. static inline int dwc3_setup_phy(struct udevice *dev, struct phy **array,
  43. int *num_phys)
  44. {
  45. return -ENOTSUPP;
  46. }
  47. static inline int dwc3_shutdown_phy(struct udevice *dev, struct phy *usb_phys,
  48. int num_phys)
  49. {
  50. return -ENOTSUPP;
  51. }
  52. #endif
  53. #endif /* __DWC3_UBOOT_H_ */