From 28bcac7b2225f4d3f0879385167ce9e7e6785435 Mon Sep 17 00:00:00 2001 From: Mayank Rana Date: Tue, 21 Jan 2020 16:26:55 -0800 Subject: [PATCH 1/3] ARM: dts: msm: add UCSI connector and USB port on Lahaina Add UCSI and USB port related information to allow USB role switch framework to discover connection, and provide USB role related configuration. Change-Id: Idc97cd9b4b63df0b934224226a5e58f1cec40ad9 --- qcom/lahaina-usb.dtsi | 7 +++++++ qcom/lahaina.dtsi | 5 +++++ 2 files changed, 12 insertions(+) diff --git a/qcom/lahaina-usb.dtsi b/qcom/lahaina-usb.dtsi index b50b21854538..f140a425e78d 100644 --- a/qcom/lahaina-usb.dtsi +++ b/qcom/lahaina-usb.dtsi @@ -46,6 +46,7 @@ 0x144 /* GSI_RING_BASE_ADDR_H */ 0x1a4>; /* GSI_IF_STS */ qcom,dwc-usb3-msm-tx-fifo-size = <27696>; + usb-role-switch; interconnect-names = "usb-ddr", "usb-ipa", "ddr-usb"; interconnects = <&aggre1_noc MASTER_USB3_0 &mc_virt SLAVE_EBI1>, @@ -99,6 +100,12 @@ qcom,descriptor-fifo-size = <0x800>; }; }; + + port { + usb_port0: endpoint { + remote-endpoint = <&usb_port0_connector>; + }; + }; }; /* Primary USB port related High Speed PHY */ diff --git a/qcom/lahaina.dtsi b/qcom/lahaina.dtsi index 03580c92d14e..7db97cd1534b 100644 --- a/qcom/lahaina.dtsi +++ b/qcom/lahaina.dtsi @@ -3718,6 +3718,11 @@ qcom,ucsi { compatible = "qcom,ucsi-glink"; + port { + usb_port0_connector: endpoint { + remote-endpoint = <&usb_port0>; + }; + }; }; qcom,altmode { From 0cfe13e29843bb78c5c3797fe86f633bc9f7ddb2 Mon Sep 17 00:00:00 2001 From: Mayank Rana Date: Wed, 22 Jan 2020 15:03:09 -0800 Subject: [PATCH 2/3] ARM: dts: msm: Set dr_mode as OTG on Lahaina Both USB controller support USB host and USB device mode. Hence set dr_mode as OTG on Lahaina. Change-Id: Iddcf9a666f5ea3935a016cca44cc70bd61cfc850 --- qcom/lahaina-usb.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/qcom/lahaina-usb.dtsi b/qcom/lahaina-usb.dtsi index f140a425e78d..f52a45827e1e 100644 --- a/qcom/lahaina-usb.dtsi +++ b/qcom/lahaina-usb.dtsi @@ -69,7 +69,7 @@ usb-core-id = <0>; tx-fifo-resize; maximum-speed = "super-speed-plus"; - dr_mode = "peripheral"; + dr_mode = "otg"; }; qcom,usbbam@a704000 { From f300f4cf541764bd8f2061e6a2bc12d9c4b8d60f Mon Sep 17 00:00:00 2001 From: Mayank Rana Date: Tue, 28 Jan 2020 16:28:11 -0800 Subject: [PATCH 3/3] ARM: dts: msm: Add EUD extcon handler for primary USB on Lahaina USB driver needs to start and stop USB device stack on receiving EUD based spoof connect and disconnect. Hence add EUD extcon handler with USB device node on Lahaina. Change-Id: If2d2e6cf46bb772e64b18bb50dc53f3c8dc09e2c --- qcom/lahaina-usb.dtsi | 1 + 1 file changed, 1 insertion(+) diff --git a/qcom/lahaina-usb.dtsi b/qcom/lahaina-usb.dtsi index f52a45827e1e..946a4e6b96c9 100644 --- a/qcom/lahaina-usb.dtsi +++ b/qcom/lahaina-usb.dtsi @@ -47,6 +47,7 @@ 0x1a4>; /* GSI_IF_STS */ qcom,dwc-usb3-msm-tx-fifo-size = <27696>; usb-role-switch; + extcon = <&eud>; interconnect-names = "usb-ddr", "usb-ipa", "ddr-usb"; interconnects = <&aggre1_noc MASTER_USB3_0 &mc_virt SLAVE_EBI1>,