Merge tag 'efi-2020-04-rc1' of https://gitlab.denx.de/u-boot/custodians/u-boot-efi
[oweals/u-boot.git] / include / dwc3-uboot.h
index 228ab3b10294687af132b6c452740d783d3adf49..3c9e204cf0705bfdd6aed4e8e2fbf765ce9e82e1 100644 (file)
 #define __DWC3_UBOOT_H_
 
 #include <linux/usb/otg.h>
+#include <linux/usb/phy.h>
 
 struct dwc3_device {
        unsigned long base;
        enum usb_dr_mode dr_mode;
+       enum usb_phy_interface hsphy_mode;
        u32 maximum_speed;
        unsigned tx_fifo_resize:1;
        unsigned has_lpm_erratum;
@@ -38,4 +40,23 @@ struct dwc3_device {
 int dwc3_uboot_init(struct dwc3_device *dev);
 void dwc3_uboot_exit(int index);
 void dwc3_uboot_handle_interrupt(int index);
+
+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
+
 #endif /* __DWC3_UBOOT_H_ */