]>
Commit | Line | Data |
---|---|---|
83d290c5 | 1 | /* SPDX-License-Identifier: GPL-2.0 */ |
da0d9e42 KVA |
2 | /* include/dwc3-uboot.h |
3 | * | |
a94a4071 | 4 | * Copyright (c) 2015 Texas Instruments Incorporated - https://www.ti.com |
da0d9e42 KVA |
5 | * |
6 | * Designware SuperSpeed USB uboot init | |
da0d9e42 KVA |
7 | */ |
8 | ||
9 | #ifndef __DWC3_UBOOT_H_ | |
10 | #define __DWC3_UBOOT_H_ | |
11 | ||
6dfb8a80 | 12 | #include <generic-phy.h> |
da0d9e42 | 13 | #include <linux/usb/otg.h> |
6b7ebff0 | 14 | #include <linux/usb/phy.h> |
da0d9e42 KVA |
15 | |
16 | struct dwc3_device { | |
4835c737 | 17 | unsigned long base; |
da0d9e42 | 18 | enum usb_dr_mode dr_mode; |
6b7ebff0 | 19 | enum usb_phy_interface hsphy_mode; |
da0d9e42 KVA |
20 | u32 maximum_speed; |
21 | unsigned tx_fifo_resize:1; | |
22 | unsigned has_lpm_erratum; | |
23 | u8 lpm_nyet_threshold; | |
24 | unsigned is_utmi_l1_suspend; | |
25 | u8 hird_threshold; | |
26 | unsigned disable_scramble_quirk; | |
27 | unsigned u2exit_lfps_quirk; | |
28 | unsigned u2ss_inp3_quirk; | |
29 | unsigned req_p1p2p3_quirk; | |
30 | unsigned del_p1p2p3_quirk; | |
31 | unsigned del_phy_power_chg_quirk; | |
32 | unsigned lfps_filter_quirk; | |
33 | unsigned rx_detect_poll_quirk; | |
34 | unsigned dis_u3_susphy_quirk; | |
35 | unsigned dis_u2_susphy_quirk; | |
73ca0140 | 36 | unsigned dis_del_phy_power_chg_quirk; |
dc18413a | 37 | unsigned dis_tx_ipgap_linecheck_quirk; |
7bb62708 | 38 | unsigned dis_enblslpm_quirk; |
b34f8b5d | 39 | unsigned dis_u2_freeclk_exists_quirk; |
da0d9e42 KVA |
40 | unsigned tx_de_emphasis_quirk; |
41 | unsigned tx_de_emphasis; | |
793d347f | 42 | int index; |
da0d9e42 KVA |
43 | }; |
44 | ||
45 | int dwc3_uboot_init(struct dwc3_device *dev); | |
793d347f | 46 | void dwc3_uboot_exit(int index); |
4d158980 | 47 | int dwc3_uboot_interrupt_status(struct udevice *dev); |
d648a50c JJH |
48 | |
49 | struct phy; | |
50 | #if CONFIG_IS_ENABLED(PHY) && CONFIG_IS_ENABLED(DM_USB) | |
6dfb8a80 CY |
51 | int dwc3_setup_phy(struct udevice *dev, struct phy_bulk *phys); |
52 | int dwc3_shutdown_phy(struct udevice *dev, struct phy_bulk *phys); | |
d648a50c | 53 | #else |
6dfb8a80 | 54 | static inline int dwc3_setup_phy(struct udevice *dev, struct phy_bulk *phys) |
d648a50c JJH |
55 | { |
56 | return -ENOTSUPP; | |
57 | } | |
58 | ||
6dfb8a80 | 59 | static inline int dwc3_shutdown_phy(struct udevice *dev, struct phy_bulk *phys) |
d648a50c JJH |
60 | { |
61 | return -ENOTSUPP; | |
62 | } | |
63 | #endif | |
64 | ||
da0d9e42 | 65 | #endif /* __DWC3_UBOOT_H_ */ |