1/* SPDX-License-Identifier: GPL-2.0-or-later */
2/*
3 * Copyright (C) 2011 Marvell International Ltd. All rights reserved.
4 */
5
6#ifndef __MV_PLATFORM_USB_H
7#define __MV_PLATFORM_USB_H
8
9enum {
10 MV_USB_MODE_OTG,
11 MV_USB_MODE_HOST,
12};
13
14enum {
15 VBUS_LOW = 0,
16 VBUS_HIGH = 1 << 0,
17};
18
19struct mv_usb_addon_irq {
20 unsigned int irq;
21 int (*poll)(void);
22};
23
24struct mv_usb_platform_data {
25 struct mv_usb_addon_irq *id; /* Only valid for OTG. ID pin change*/
26 struct mv_usb_addon_irq *vbus; /* valid for OTG/UDC. VBUS change*/
27
28 /* only valid for HCD. OTG or Host only*/
29 unsigned int mode;
30
31 /* This flag is used for that needs id pin checked by otg */
32 unsigned int disable_otg_clock_gating:1;
33 /* Force a_bus_req to be asserted */
34 unsigned int otg_force_a_bus_req:1;
35
36 int (*phy_init)(void __iomem *regbase);
37 void (*phy_deinit)(void __iomem *regbase);
38 int (*set_vbus)(unsigned int vbus);
39};
40#endif
41

source code of linux/include/linux/platform_data/mv_usb.h