mirror of
https://github.com/u-boot/u-boot.git
synced 2025-05-09 03:21:51 +00:00
usb: dwc3: amend UTMI/UTMIW phy interface setup
Let move 8/16-bit UTMI+ interface initialization into DWC3 core init that is convenient for both DM_USB and u-boot traditional process. Signed-off-by: Frank Wang <frank.wang@rock-chips.com> Signed-off-by: Jagan Teki <jagan@amarulasolutions.com> Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
This commit is contained in:
parent
fafaa02290
commit
646979425a
4 changed files with 82 additions and 31 deletions
|
@ -10,10 +10,28 @@
|
|||
#ifndef __LINUX_USB_PHY_H
|
||||
#define __LINUX_USB_PHY_H
|
||||
|
||||
#include <dm/ofnode.h>
|
||||
|
||||
enum usb_phy_interface {
|
||||
USBPHY_INTERFACE_MODE_UNKNOWN,
|
||||
USBPHY_INTERFACE_MODE_UTMI,
|
||||
USBPHY_INTERFACE_MODE_UTMIW,
|
||||
};
|
||||
|
||||
#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
|
||||
|
||||
#endif /* __LINUX_USB_PHY_H */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue