aboutsummaryrefslogtreecommitdiff
path: root/include/linux/usb
diff options
context:
space:
mode:
authorFrank Wang <frank.wang@rock-chips.com>2020-05-26 11:34:30 +0800
committerKever Yang <kever.yang@rock-chips.com>2020-05-29 18:13:19 +0800
commit646979425a9bbf23990b72098c9f70e45743f46a (patch)
tree2e891d4864a293a62baa37741998748edfc9c2bc /include/linux/usb
parentfafaa02290715a02ae97b26fa6937d6a27cdc296 (diff)
downloadu-boot-646979425a9bbf23990b72098c9f70e45743f46a.zip
u-boot-646979425a9bbf23990b72098c9f70e45743f46a.tar.gz
u-boot-646979425a9bbf23990b72098c9f70e45743f46a.tar.bz2
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>
Diffstat (limited to 'include/linux/usb')
-rw-r--r--include/linux/usb/phy.h18
1 files changed, 18 insertions, 0 deletions
diff --git a/include/linux/usb/phy.h b/include/linux/usb/phy.h
index 158ca9c..1e1217a 100644
--- a/include/linux/usb/phy.h
+++ b/include/linux/usb/phy.h
@@ -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 */