1*4882a593Smuzhiyun /* SPDX-License-Identifier: GPL-2.0 */ 2*4882a593Smuzhiyun /* 3*4882a593Smuzhiyun * USB PHY defines 4*4882a593Smuzhiyun * 5*4882a593Smuzhiyun * These APIs may be used between USB controllers. USB device drivers 6*4882a593Smuzhiyun * (for either host or peripheral roles) don't use these calls; they 7*4882a593Smuzhiyun * continue to use just usb_device and usb_gadget. 8*4882a593Smuzhiyun */ 9*4882a593Smuzhiyun 10*4882a593Smuzhiyun #ifndef __LINUX_USB_PHY_H 11*4882a593Smuzhiyun #define __LINUX_USB_PHY_H 12*4882a593Smuzhiyun 13*4882a593Smuzhiyun #include <dm/ofnode.h> 14*4882a593Smuzhiyun 15*4882a593Smuzhiyun enum usb_phy_interface { 16*4882a593Smuzhiyun USBPHY_INTERFACE_MODE_UNKNOWN, 17*4882a593Smuzhiyun USBPHY_INTERFACE_MODE_UTMI, 18*4882a593Smuzhiyun USBPHY_INTERFACE_MODE_UTMIW, 19*4882a593Smuzhiyun }; 20*4882a593Smuzhiyun 21*4882a593Smuzhiyun #if CONFIG_IS_ENABLED(OF_LIVE) && CONFIG_IS_ENABLED(DM_USB) 22*4882a593Smuzhiyun /** 23*4882a593Smuzhiyun * usb_get_phy_mode - Get phy mode for given device_node 24*4882a593Smuzhiyun * @np: Pointer to the given device_node 25*4882a593Smuzhiyun * 26*4882a593Smuzhiyun * The function gets phy interface string from property 'phy_type', 27*4882a593Smuzhiyun * and returns the corresponding enum usb_phy_interface 28*4882a593Smuzhiyun */ 29*4882a593Smuzhiyun enum usb_phy_interface usb_get_phy_mode(ofnode node); 30*4882a593Smuzhiyun #else usb_get_phy_mode(ofnode node)31*4882a593Smuzhiyunstatic inline enum usb_phy_interface usb_get_phy_mode(ofnode node) 32*4882a593Smuzhiyun { 33*4882a593Smuzhiyun return USBPHY_INTERFACE_MODE_UNKNOWN; 34*4882a593Smuzhiyun } 35*4882a593Smuzhiyun #endif 36*4882a593Smuzhiyun 37*4882a593Smuzhiyun #endif /* __LINUX_USB_PHY_H */ 38