2019-11-19 08:26:20 +00:00
|
|
|
/* SPDX-License-Identifier: GPL-2.0 */
|
|
|
|
/*
|
|
|
|
* USB PHY defines
|
|
|
|
*
|
|
|
|
* These APIs may be used between USB controllers. USB device drivers
|
|
|
|
* (for either host or peripheral roles) don't use these calls; they
|
|
|
|
* continue to use just usb_device and usb_gadget.
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef __LINUX_USB_PHY_H
|
|
|
|
#define __LINUX_USB_PHY_H
|
|
|
|
|
2020-05-26 03:34:30 +00:00
|
|
|
#include <dm/ofnode.h>
|
|
|
|
|
2019-11-19 08:26:20 +00:00
|
|
|
enum usb_phy_interface {
|
|
|
|
USBPHY_INTERFACE_MODE_UNKNOWN,
|
|
|
|
USBPHY_INTERFACE_MODE_UTMI,
|
|
|
|
USBPHY_INTERFACE_MODE_UTMIW,
|
2021-09-20 13:37:22 +00:00
|
|
|
USBPHY_INTERFACE_MODE_ULPI,
|
|
|
|
USBPHY_INTERFACE_MODE_SERIAL,
|
|
|
|
USBPHY_INTERFACE_MODE_HSIC,
|
2019-11-19 08:26:20 +00:00
|
|
|
};
|
|
|
|
|
2020-05-26 03:34:30 +00:00
|
|
|
#if CONFIG_IS_ENABLED(DM_USB)
|
|
|
|
/**
|
|
|
|
* usb_get_phy_mode - Get phy mode for given device_node
|
|
|
|
* @np: Pointer to the given device_node
|
|
|
|
*
|
|
|
|
* The function gets phy interface string from property 'phy_type',
|
|
|
|
* and returns the corresponding enum usb_phy_interface
|
|
|
|
*/
|
|
|
|
enum usb_phy_interface usb_get_phy_mode(ofnode node);
|
|
|
|
#else
|
|
|
|
static inline enum usb_phy_interface usb_get_phy_mode(ofnode node)
|
|
|
|
{
|
|
|
|
return USBPHY_INTERFACE_MODE_UNKNOWN;
|
|
|
|
}
|
|
|
|
#endif
|
|
|
|
|
2019-11-19 08:26:20 +00:00
|
|
|
#endif /* __LINUX_USB_PHY_H */
|