[PATCH 2/6] chipidea-imx: allow phymode configuration in pdata
Eric Bénard
eric at eukrea.com
Fri Sep 25 08:48:48 PDT 2015
it's currently only handled through DT and for i.MX25 OTG port (at least),
we need to configure portsc to get host mode working but it actually fails
as ci->phymode is 0 which is USBPHY_INTERFACE_MODE_UNKNOWN
Signed-off-by: Eric Bénard <eric at eukrea.com>
---
drivers/usb/imx/chipidea-imx.c | 1 +
include/usb/chipidea-imx.h | 3 +++
2 files changed, 4 insertions(+)
diff --git a/drivers/usb/imx/chipidea-imx.c b/drivers/usb/imx/chipidea-imx.c
index 1dca6bf..28a0fff 100644
--- a/drivers/usb/imx/chipidea-imx.c
+++ b/drivers/usb/imx/chipidea-imx.c
@@ -236,6 +236,7 @@ static int imx_chipidea_probe(struct device_d *dev)
}
ci->portno = dev->id;
ci->flags = pdata->flags;
+ ci->phymode = pdata->phymode;
ci->mode = pdata->mode;
}
diff --git a/include/usb/chipidea-imx.h b/include/usb/chipidea-imx.h
index 09e19af..64f086a 100644
--- a/include/usb/chipidea-imx.h
+++ b/include/usb/chipidea-imx.h
@@ -1,6 +1,8 @@
#ifndef __USB_CHIPIDEA_IMX_H
#define __USB_CHIPIDEA_IMX_H
+#include <usb/phy.h>
+
/*
* POTSC flags
*/
@@ -42,6 +44,7 @@ enum imx_usb_mode {
struct imxusb_platformdata {
unsigned long flags;
+ enum usb_phy_interface phymode;
enum imx_usb_mode mode;
};
--
2.4.3
More information about the barebox
mailing list