Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1515307 > unrolled thread
| Started by | Alexandre Bailon <abailon@baylibre.com> |
|---|---|
| First post | 2016-11-04 17:50 +0100 |
| Last post | 2016-11-04 17:50 +0100 |
| Articles | 1 — 1 participant |
Back to article view | Back to linux.kernel
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
[PATCH v4 4/4] usb: musb: da8xx: Set phy in OTG mode by default Alexandre Bailon <abailon@baylibre.com> - 2016-11-04 17:50 +0100
| From | Alexandre Bailon <abailon@baylibre.com> |
|---|---|
| Date | 2016-11-04 17:50 +0100 |
| Subject | [PATCH v4 4/4] usb: musb: da8xx: Set phy in OTG mode by default |
| Message-ID | <szPQJ-4hU-7@gated-at.bofh.it> |
The DA8xx OTG PHY has some issues when it is forced in host or
peripheral mode. Actually, most of the time, OTG is the best mode
because host or peripheral mode are only required for hardware that
miss some circuitry.
Init the PHY mode OTG mode by default.
Signed-off-by: Alexandre Bailon <abailon@baylibre.com>
---
drivers/usb/musb/da8xx.c | 10 +++++++++-
1 file changed, 9 insertions(+), 1 deletion(-)
diff --git a/drivers/usb/musb/da8xx.c b/drivers/usb/musb/da8xx.c
index 6749aa1..e6f41232 100644
--- a/drivers/usb/musb/da8xx.c
+++ b/drivers/usb/musb/da8xx.c
@@ -401,6 +401,12 @@ static int da8xx_musb_init(struct musb *musb)
goto err_phy_power_on;
}
+ ret = phy_set_mode(glue->phy, PHY_MODE_USB_OTG);
+ if (ret) {
+ dev_err(glue->dev, "Failed to set the phy mode.\n");
+ goto err_phy_set_mode;
+ }
+
msleep(5);
/* NOTE: IRQs are in mixed mode, not bypass to pure MUSB */
@@ -410,6 +416,8 @@ static int da8xx_musb_init(struct musb *musb)
musb->isr = da8xx_musb_interrupt;
return 0;
+err_phy_set_mode:
+ phy_power_off(glue->phy);
err_phy_power_on:
phy_exit(glue->phy);
fail:
@@ -433,7 +441,7 @@ static int da8xx_musb_exit(struct musb *musb)
}
static const struct musb_platform_ops da8xx_ops = {
- .quirks = MUSB_DMA_CPPI | MUSB_INDEXED_EP,
+ .quirks = MUSB_DMA_CPPI | MUSB_INDEXED_EP | MUSB_SKIP_SET_MODE,
.init = da8xx_musb_init,
.exit = da8xx_musb_exit,
--
2.7.3
Back to top | Article view | linux.kernel
csiph-web