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