2018-05-06 21:58:06 +00:00
|
|
|
/* SPDX-License-Identifier: GPL-2.0 */
|
2015-02-23 13:10:03 +00:00
|
|
|
/* include/dwc3-uboot.h
|
|
|
|
*
|
2023-11-01 20:56:03 +00:00
|
|
|
* Copyright (c) 2015 Texas Instruments Incorporated - https://www.ti.com
|
2015-02-23 13:10:03 +00:00
|
|
|
*
|
|
|
|
* Designware SuperSpeed USB uboot init
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef __DWC3_UBOOT_H_
|
|
|
|
#define __DWC3_UBOOT_H_
|
|
|
|
|
2020-05-02 09:35:13 +00:00
|
|
|
#include <generic-phy.h>
|
2015-02-23 13:10:03 +00:00
|
|
|
#include <linux/usb/otg.h>
|
2019-11-19 08:26:20 +00:00
|
|
|
#include <linux/usb/phy.h>
|
2015-02-23 13:10:03 +00:00
|
|
|
|
|
|
|
struct dwc3_device {
|
2016-05-12 06:57:13 +00:00
|
|
|
unsigned long base;
|
2015-02-23 13:10:03 +00:00
|
|
|
enum usb_dr_mode dr_mode;
|
2019-11-19 08:26:20 +00:00
|
|
|
enum usb_phy_interface hsphy_mode;
|
2015-02-23 13:10:03 +00:00
|
|
|
u32 maximum_speed;
|
|
|
|
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;
|
2020-05-06 07:50:25 +00:00
|
|
|
unsigned dis_del_phy_power_chg_quirk;
|
2020-05-26 03:33:48 +00:00
|
|
|
unsigned dis_tx_ipgap_linecheck_quirk;
|
2020-05-26 03:33:46 +00:00
|
|
|
unsigned dis_enblslpm_quirk;
|
2020-05-26 03:33:47 +00:00
|
|
|
unsigned dis_u2_freeclk_exists_quirk;
|
2015-02-23 13:10:03 +00:00
|
|
|
unsigned tx_de_emphasis_quirk;
|
|
|
|
unsigned tx_de_emphasis;
|
2015-02-23 13:10:05 +00:00
|
|
|
int index;
|
2015-02-23 13:10:03 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
int dwc3_uboot_init(struct dwc3_device *dev);
|
2015-02-23 13:10:05 +00:00
|
|
|
void dwc3_uboot_exit(int index);
|
2023-09-01 09:50:03 +00:00
|
|
|
void dwc3_uboot_handle_interrupt(struct udevice *dev);
|
2018-11-29 09:52:45 +00:00
|
|
|
|
|
|
|
struct phy;
|
|
|
|
#if CONFIG_IS_ENABLED(PHY) && CONFIG_IS_ENABLED(DM_USB)
|
2020-05-02 09:35:13 +00:00
|
|
|
int dwc3_setup_phy(struct udevice *dev, struct phy_bulk *phys);
|
|
|
|
int dwc3_shutdown_phy(struct udevice *dev, struct phy_bulk *phys);
|
2018-11-29 09:52:45 +00:00
|
|
|
#else
|
2020-05-02 09:35:13 +00:00
|
|
|
static inline int dwc3_setup_phy(struct udevice *dev, struct phy_bulk *phys)
|
2018-11-29 09:52:45 +00:00
|
|
|
{
|
|
|
|
return -ENOTSUPP;
|
|
|
|
}
|
|
|
|
|
2020-05-02 09:35:13 +00:00
|
|
|
static inline int dwc3_shutdown_phy(struct udevice *dev, struct phy_bulk *phys)
|
2018-11-29 09:52:45 +00:00
|
|
|
{
|
|
|
|
return -ENOTSUPP;
|
|
|
|
}
|
|
|
|
#endif
|
|
|
|
|
2015-02-23 13:10:03 +00:00
|
|
|
#endif /* __DWC3_UBOOT_H_ */
|