dwc3-uboot.h 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  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 <generic-phy.h>
  11. #include <linux/usb/otg.h>
  12. #include <linux/usb/phy.h>
  13. struct dwc3_device {
  14. unsigned long base;
  15. enum usb_dr_mode dr_mode;
  16. enum usb_phy_interface hsphy_mode;
  17. u32 maximum_speed;
  18. unsigned tx_fifo_resize:1;
  19. unsigned has_lpm_erratum;
  20. u8 lpm_nyet_threshold;
  21. unsigned is_utmi_l1_suspend;
  22. u8 hird_threshold;
  23. unsigned disable_scramble_quirk;
  24. unsigned u2exit_lfps_quirk;
  25. unsigned u2ss_inp3_quirk;
  26. unsigned req_p1p2p3_quirk;
  27. unsigned del_p1p2p3_quirk;
  28. unsigned del_phy_power_chg_quirk;
  29. unsigned lfps_filter_quirk;
  30. unsigned rx_detect_poll_quirk;
  31. unsigned dis_u3_susphy_quirk;
  32. unsigned dis_u2_susphy_quirk;
  33. unsigned dis_del_phy_power_chg_quirk;
  34. unsigned dis_tx_ipgap_linecheck_quirk;
  35. unsigned dis_enblslpm_quirk;
  36. unsigned dis_u2_freeclk_exists_quirk;
  37. unsigned tx_de_emphasis_quirk;
  38. unsigned tx_de_emphasis;
  39. int index;
  40. };
  41. int dwc3_uboot_init(struct dwc3_device *dev);
  42. void dwc3_uboot_exit(int index);
  43. void dwc3_uboot_handle_interrupt(int index);
  44. struct phy;
  45. #if CONFIG_IS_ENABLED(PHY) && CONFIG_IS_ENABLED(DM_USB)
  46. int dwc3_setup_phy(struct udevice *dev, struct phy_bulk *phys);
  47. int dwc3_shutdown_phy(struct udevice *dev, struct phy_bulk *phys);
  48. #else
  49. static inline int dwc3_setup_phy(struct udevice *dev, struct phy_bulk *phys)
  50. {
  51. return -ENOTSUPP;
  52. }
  53. static inline int dwc3_shutdown_phy(struct udevice *dev, struct phy_bulk *phys)
  54. {
  55. return -ENOTSUPP;
  56. }
  57. #endif
  58. #endif /* __DWC3_UBOOT_H_ */