Tom Rini | 10e4779 | 2018-05-06 17:58:06 -0400 | [diff] [blame] | 1 | /* SPDX-License-Identifier: GPL-2.0+ */ |
Lukasz Majewski | ac3c831 | 2011-10-27 10:36:46 +0200 | [diff] [blame] | 2 | /* |
Marek Vasut | f1be9cb | 2015-12-04 02:51:20 +0100 | [diff] [blame] | 3 | * drivers/usb/gadget/dwc2_udc.h |
Marek Vasut | 4a7629a | 2015-12-04 02:55:37 +0100 | [diff] [blame] | 4 | * Designware DWC2 on-chip full/high speed USB device controllers |
Lukasz Majewski | ac3c831 | 2011-10-27 10:36:46 +0200 | [diff] [blame] | 5 | * Copyright (C) 2005 for Samsung Electronics |
Lukasz Majewski | ac3c831 | 2011-10-27 10:36:46 +0200 | [diff] [blame] | 6 | */ |
7 | |||||
Marek Vasut | f1be9cb | 2015-12-04 02:51:20 +0100 | [diff] [blame] | 8 | #ifndef __DWC2_USB_GADGET |
9 | #define __DWC2_USB_GADGET | ||||
Lukasz Majewski | ac3c831 | 2011-10-27 10:36:46 +0200 | [diff] [blame] | 10 | |
Lukasz Majewski | ac3c831 | 2011-10-27 10:36:46 +0200 | [diff] [blame] | 11 | #define PHY0_SLEEP (1 << 5) |
12 | |||||
Marek Vasut | 6939aca | 2015-12-04 02:23:29 +0100 | [diff] [blame] | 13 | struct dwc2_plat_otg_data { |
Xu Ziyuan | 1ecf3e4 | 2016-07-14 14:52:32 +0800 | [diff] [blame] | 14 | void *priv; |
15 | int phy_of_node; | ||||
Lukasz Majewski | ac3c831 | 2011-10-27 10:36:46 +0200 | [diff] [blame] | 16 | int (*phy_control)(int on); |
17 | unsigned int regs_phy; | ||||
Philipp Tomsich | d2a5af8 | 2017-06-06 15:42:29 +0200 | [diff] [blame] | 18 | uintptr_t regs_otg; |
Lukasz Majewski | ac3c831 | 2011-10-27 10:36:46 +0200 | [diff] [blame] | 19 | unsigned int usb_phy_ctrl; |
20 | unsigned int usb_flags; | ||||
Marek Vasut | 8030088 | 2014-11-04 04:23:25 +0100 | [diff] [blame] | 21 | unsigned int usb_gusbcfg; |
Xu Ziyuan | b729dc0 | 2016-07-14 14:52:33 +0800 | [diff] [blame] | 22 | unsigned int rx_fifo_sz; |
23 | unsigned int np_tx_fifo_sz; | ||||
24 | unsigned int tx_fifo_sz; | ||||
Lukasz Majewski | ac3c831 | 2011-10-27 10:36:46 +0200 | [diff] [blame] | 25 | }; |
Marek Vasut | 0b90750 | 2015-12-04 01:36:36 +0100 | [diff] [blame] | 26 | |
Marek Vasut | 01b61fa | 2015-12-04 02:26:33 +0100 | [diff] [blame] | 27 | int dwc2_udc_probe(struct dwc2_plat_otg_data *pdata); |
Marek Vasut | 0b90750 | 2015-12-04 01:36:36 +0100 | [diff] [blame] | 28 | |
Marek Vasut | f1be9cb | 2015-12-04 02:51:20 +0100 | [diff] [blame] | 29 | #endif /* __DWC2_USB_GADGET */ |