1 /* 2 * drivers/usb/gadget/dwc2_udc.h 3 * Designware DWC2 on-chip full/high speed USB device controllers 4 * Copyright (C) 2005 for Samsung Electronics 5 * 6 * SPDX-License-Identifier: GPL-2.0+ 7 */ 8 9 #ifndef __DWC2_USB_GADGET 10 #define __DWC2_USB_GADGET 11 12 #define PHY0_SLEEP (1 << 5) 13 #define DWC2_MAX_HW_ENDPOINTS 16 14 15 struct dwc2_plat_otg_data { 16 void *priv; 17 int phy_of_node; 18 int (*phy_control)(int on); 19 unsigned int regs_phy; 20 uintptr_t regs_otg; 21 unsigned int usb_phy_ctrl; 22 unsigned int usb_flags; 23 unsigned int usb_gusbcfg; 24 unsigned int rx_fifo_sz; 25 unsigned int np_tx_fifo_sz; 26 unsigned int tx_fifo_sz; 27 unsigned int tx_fifo_sz_array[DWC2_MAX_HW_ENDPOINTS]; 28 unsigned char tx_fifo_sz_nb; 29 bool force_b_session_valid; 30 bool activate_stm_id_vb_detection; 31 }; 32 33 int dwc2_udc_probe(struct dwc2_plat_otg_data *pdata); 34 35 int dwc2_udc_B_session_valid(struct udevice *dev); 36 37 #endif /* __DWC2_USB_GADGET */ 38