xref: /rk3399_rockchip-uboot/include/linux/usb/otg.h (revision 81cd8855461024da3ea24dcdd7c31b4aa8b7eee3)
19848e574SKishon Vijay Abraham I /* include/linux/usb/otg.h
29848e574SKishon Vijay Abraham I  *
39848e574SKishon Vijay Abraham I  * Copyright (c) 2015 Texas Instruments Incorporated - http://www.ti.com
49848e574SKishon Vijay Abraham I  *
59848e574SKishon Vijay Abraham I  * USB OTG (On The Go) defines
69848e574SKishon Vijay Abraham I  *
79848e574SKishon Vijay Abraham I  * SPDX-License-Identifier:     GPL-2.0+
89848e574SKishon Vijay Abraham I  */
99848e574SKishon Vijay Abraham I 
109848e574SKishon Vijay Abraham I #ifndef __LINUX_USB_OTG_H
119848e574SKishon Vijay Abraham I #define __LINUX_USB_OTG_H
129848e574SKishon Vijay Abraham I 
139848e574SKishon Vijay Abraham I enum usb_dr_mode {
149848e574SKishon Vijay Abraham I 	USB_DR_MODE_UNKNOWN,
159848e574SKishon Vijay Abraham I 	USB_DR_MODE_HOST,
169848e574SKishon Vijay Abraham I 	USB_DR_MODE_PERIPHERAL,
179848e574SKishon Vijay Abraham I 	USB_DR_MODE_OTG,
189848e574SKishon Vijay Abraham I };
199848e574SKishon Vijay Abraham I 
20c0c62d92SMugunthan V N /**
21c0c62d92SMugunthan V N  * usb_get_dr_mode() - Get dual role mode for given device
22c0c62d92SMugunthan V N  * @node: Node offset to the given device
23c0c62d92SMugunthan V N  *
24c0c62d92SMugunthan V N  * The function gets phy interface string from property 'dr_mode',
25c0c62d92SMugunthan V N  * and returns the correspondig enum usb_dr_mode
26c0c62d92SMugunthan V N  */
27c0c62d92SMugunthan V N enum usb_dr_mode usb_get_dr_mode(int node);
28c0c62d92SMugunthan V N 
29*81cd8855SMugunthan V N /**
30*81cd8855SMugunthan V N  * usb_get_maximum_speed() - Get maximum speed for given device
31*81cd8855SMugunthan V N  * @node: Node offset to the given device
32*81cd8855SMugunthan V N  *
33*81cd8855SMugunthan V N  * The function gets phy interface string from property 'maximum-speed',
34*81cd8855SMugunthan V N  * and returns the correspondig enum usb_device_speed
35*81cd8855SMugunthan V N  */
36*81cd8855SMugunthan V N enum usb_device_speed usb_get_maximum_speed(int node);
37*81cd8855SMugunthan V N 
389848e574SKishon Vijay Abraham I #endif /* __LINUX_USB_OTG_H */
39