1*4882a593Smuzhiyun /* include/linux/usb/otg.h 2*4882a593Smuzhiyun * 3*4882a593Smuzhiyun * Copyright (c) 2015 Texas Instruments Incorporated - http://www.ti.com 4*4882a593Smuzhiyun * 5*4882a593Smuzhiyun * USB OTG (On The Go) defines 6*4882a593Smuzhiyun * 7*4882a593Smuzhiyun * SPDX-License-Identifier: GPL-2.0+ 8*4882a593Smuzhiyun */ 9*4882a593Smuzhiyun 10*4882a593Smuzhiyun #ifndef __LINUX_USB_OTG_H 11*4882a593Smuzhiyun #define __LINUX_USB_OTG_H 12*4882a593Smuzhiyun 13*4882a593Smuzhiyun #include <dm/ofnode.h> 14*4882a593Smuzhiyun 15*4882a593Smuzhiyun enum usb_dr_mode { 16*4882a593Smuzhiyun USB_DR_MODE_UNKNOWN, 17*4882a593Smuzhiyun USB_DR_MODE_HOST, 18*4882a593Smuzhiyun USB_DR_MODE_PERIPHERAL, 19*4882a593Smuzhiyun USB_DR_MODE_OTG, 20*4882a593Smuzhiyun }; 21*4882a593Smuzhiyun 22*4882a593Smuzhiyun /** 23*4882a593Smuzhiyun * usb_get_dr_mode() - Get dual role mode for given device 24*4882a593Smuzhiyun * @node: ofnode of the given device 25*4882a593Smuzhiyun * 26*4882a593Smuzhiyun * The function gets phy interface string from property 'dr_mode', 27*4882a593Smuzhiyun * and returns the correspondig enum usb_dr_mode 28*4882a593Smuzhiyun */ 29*4882a593Smuzhiyun enum usb_dr_mode usb_get_dr_mode(ofnode node); 30*4882a593Smuzhiyun 31*4882a593Smuzhiyun /** 32*4882a593Smuzhiyun * usb_get_maximum_speed() - Get maximum speed for given device 33*4882a593Smuzhiyun * @node: ofnode of the given device 34*4882a593Smuzhiyun * 35*4882a593Smuzhiyun * The function gets phy interface string from property 'maximum-speed', 36*4882a593Smuzhiyun * and returns the correspondig enum usb_device_speed 37*4882a593Smuzhiyun */ 38*4882a593Smuzhiyun enum usb_device_speed usb_get_maximum_speed(ofnode node); 39*4882a593Smuzhiyun 40*4882a593Smuzhiyun #endif /* __LINUX_USB_OTG_H */ 41