blob: 7324d8a62db49b5f0f62bbcec3be4bcbe1564d03 [file] [log] [blame]
Lukasz Majewski38517a72011-10-27 10:36:46 +02001/*
Marek Vasut5d5716e2015-12-04 02:51:20 +01002 * drivers/usb/gadget/dwc2_udc.h
Marek Vasute179ced2015-12-04 02:55:37 +01003 * Designware DWC2 on-chip full/high speed USB device controllers
Lukasz Majewski38517a72011-10-27 10:36:46 +02004 * Copyright (C) 2005 for Samsung Electronics
5 *
Wolfgang Denk1a459662013-07-08 09:37:19 +02006 * SPDX-License-Identifier: GPL-2.0+
Lukasz Majewski38517a72011-10-27 10:36:46 +02007 */
8
Marek Vasut5d5716e2015-12-04 02:51:20 +01009#ifndef __DWC2_USB_GADGET
10#define __DWC2_USB_GADGET
Lukasz Majewski38517a72011-10-27 10:36:46 +020011
Lukasz Majewski38517a72011-10-27 10:36:46 +020012#define PHY0_SLEEP (1 << 5)
13
Marek Vasutc0982872015-12-04 02:23:29 +010014struct dwc2_plat_otg_data {
Xu Ziyuanfab33572016-07-14 14:52:32 +080015 void *priv;
16 int phy_of_node;
Lukasz Majewski38517a72011-10-27 10:36:46 +020017 int (*phy_control)(int on);
18 unsigned int regs_phy;
19 unsigned int regs_otg;
20 unsigned int usb_phy_ctrl;
21 unsigned int usb_flags;
Marek Vasut481a11c2014-11-04 04:23:25 +010022 unsigned int usb_gusbcfg;
Xu Ziyuan47117882016-07-14 14:52:33 +080023 unsigned int rx_fifo_sz;
24 unsigned int np_tx_fifo_sz;
25 unsigned int tx_fifo_sz;
Lukasz Majewski38517a72011-10-27 10:36:46 +020026};
Marek Vasut2c12ff02015-12-04 01:36:36 +010027
Marek Vasuta4bb9b32015-12-04 02:26:33 +010028int dwc2_udc_probe(struct dwc2_plat_otg_data *pdata);
Marek Vasut2c12ff02015-12-04 01:36:36 +010029
Marek Vasut5d5716e2015-12-04 02:51:20 +010030#endif /* __DWC2_USB_GADGET */