Permalink
Browse files

dwc3: Enable USB 3.0 redriver in Galaxy S5 for OTG

This change allows to use the OTG port in USB 3.0 SuperSpeed mode.

Most of the OTG adapters with micro USB 3.0 connector have straight
connections of the RX and TX differential pairs, so an additional
adapter needs to be added that swaps the SSRX+- with the SSTX+- signals.

Example of DIY adapter:
https://steve-m.de/pics/s5_otg_adapter.jpg

Signed-off-by: Steve Markgraf <steve@steve-m.de>
  • Loading branch information...
steve-m committed Dec 17, 2017
1 parent 772d1fb commit 24ed6c98a67d7c29ff705fd8cd71f104d1e8d6f7
Showing with 8 additions and 1 deletion.
  1. +8 −1 drivers/usb/dwc3/dwc3-msm.c
@@ -1922,6 +1922,9 @@ static int dwc3_msm_suspend(struct dwc3_msm *mdwc)
0x18000, 0x18000);
dwc3_msm_write_reg(mdwc->base, ALT_INTERRUPT_EN_REG, 0xFC0);
udelay(5);
/* disable redriver IC for USB3.0 */
gpio_set_value(sec_qcom_usb_rdrv,0);
} else {
#ifdef CONFIG_USB_DEBUG_DETEAILED_LOG
dev_info(mdwc->dev, "%s: low power state\n", __func__);
@@ -2112,6 +2115,10 @@ static int dwc3_msm_resume(struct dwc3_msm *mdwc)
dwc3_msm_write_readback(mdwc->base, HS_PHY_CTRL_REG, 0xC00000,
0x0);
/* set gpio to enable redriver IC for USB3.0 when entering
* OTG host mode */
gpio_set_value(sec_qcom_usb_rdrv,1);
}
if (resume_from_core_clk_off) {
@@ -3277,7 +3284,7 @@ static int __devinit dwc3_msm_probe(struct platform_device *pdev)
/* set gpio to enable redriver for USB3.0 */
gpio_tlmm_config(GPIO_CFG(sec_qcom_usb_rdrv, 0, GPIO_CFG_OUTPUT,
GPIO_CFG_NO_PULL, GPIO_CFG_2MA), 1);
gpio_set_value(sec_qcom_usb_rdrv,0);
gpio_set_value(sec_qcom_usb_rdrv,1);
#endif
/* Skip charger detection for simulator targets */

0 comments on commit 24ed6c9

Please sign in to comment.