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