From 85fd55734a11d769f41718403761e2811e3e164f Mon Sep 17 00:00:00 2001 From: Uttkarsh Aggarwal Date: Fri, 4 Oct 2024 13:54:50 +0530 Subject: [PATCH 1/3] ARM: dts: qcom: Add QMP DP phy node & init sequence for Tuna QMP phy is used for SS/SSP usb usecases as well as DP use cases in a target. This change adds the basic resources required along with the init sequence for functionality. Note: init sequence is following Kalama QMP init sequence and ref_clk is set to 38.4 Mhz. Change-Id: I9422f9af88801fa0dde4d79a7e72ec74e264420d Signed-off-by: Uttkarsh Aggarwal --- qcom/tuna-usb.dtsi | 212 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 212 insertions(+) diff --git a/qcom/tuna-usb.dtsi b/qcom/tuna-usb.dtsi index 702269d1..be73ee25 100644 --- a/qcom/tuna-usb.dtsi +++ b/qcom/tuna-usb.dtsi @@ -104,4 +104,216 @@ compatible = "usb-nop-xceiv"; }; + /* USB port related QMP USB DP Combo PHY */ + usb_qmp_dp_phy: ssphy@88e8000 { + compatible = "qcom,usb-ssphy-qmp-dp-combo"; + reg = <0x88e8000 0x3000>; + reg-names = "qmp_phy_base"; + + vdd-supply = <&L3B>; + qcom,vdd-voltage-level = <0 880000 880000>; + qcom,vdd-max-load-uA = <47000>; + core-supply = <&L4B>; + + usb3_dp_phy_gdsc-supply = <&gcc_usb3_phy_gdsc>; + clocks = <&gcc GCC_USB3_PRIM_PHY_AUX_CLK>, + <&gcc GCC_USB3_PRIM_PHY_PIPE_CLK>, + <&gcc GCC_USB3_PRIM_PHY_PIPE_CLK_SRC>, + <&usb3_phy_wrapper_gcc_usb30_pipe_clk>, + <&rpmhcc RPMH_CXO_PAD_CLK>, + <&tcsrcc TCSR_USB3_CLKREF_EN>, + <&gcc GCC_USB3_PRIM_PHY_COM_AUX_CLK>; + clock-names = "aux_clk", "pipe_clk", "pipe_clk_mux", + "pipe_clk_ext_src", "ref_clk_src", + "ref_clk", "com_aux_clk"; + + resets = <&gcc GCC_USB3_DP_PHY_PRIM_BCR>, + <&gcc GCC_USB3_PHY_PRIM_BCR>; + reset-names = "global_phy_reset", "phy_reset"; + + qcom,qmp-phy-reg-offset = + ; + + qcom,qmp-phy-init-seq = + /* based on tsmcn3e_USB3_Gen2_Seq v1.6 */ + + ; + }; + }; From 8f9a845d79007389949af156016c647719453334 Mon Sep 17 00:00:00 2001 From: Uttkarsh Aggarwal Date: Fri, 4 Oct 2024 14:09:08 +0530 Subject: [PATCH 2/3] ARM: dts: msm: Add qmi audio node on Tuna USB Adding the necessary audio node providing the necessary resources of the qmi audio to get probed. Note: SID for usb audio is 100B. Change-Id: Ib55eb5957d38e8551c2a2bda5446fc64539203e1 Signed-off-by: Uttkarsh Aggarwal --- qcom/tuna-usb.dtsi | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/qcom/tuna-usb.dtsi b/qcom/tuna-usb.dtsi index be73ee25..bf875987 100644 --- a/qcom/tuna-usb.dtsi +++ b/qcom/tuna-usb.dtsi @@ -316,4 +316,12 @@ USB3_DP_PCS_USB3_RCVR_DTCT_DLY_U3_H 0x00>; }; + usb_audio_qmi_dev { + compatible = "qcom,usb-audio-qmi-dev"; + iommus = <&apps_smmu 0x100b 0x0>; + qcom,iommu-dma = "disabled"; + qcom,usb-audio-stream-id = <0xb>; + qcom,usb-audio-intr-num = <2>; + }; + }; From a0b0aec77beb19177826198fbcb3f3141a570ffb Mon Sep 17 00:00:00 2001 From: Uttkarsh Aggarwal Date: Tue, 8 Oct 2024 15:03:15 +0530 Subject: [PATCH 3/3] ARM: dts: msm: Add register entry to ssusb in tuna Adding a 4-byte register entry for tcsr_dyn-en-dis to enable/disable USB dynamically from dwc3-msm-core. Change-Id: I34163cf381ff92d90dc687817612f0f191407501 Signed-off-by: Uttkarsh Aggarwal --- qcom/tuna-usb.dtsi | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/qcom/tuna-usb.dtsi b/qcom/tuna-usb.dtsi index bf875987..59d0d614 100644 --- a/qcom/tuna-usb.dtsi +++ b/qcom/tuna-usb.dtsi @@ -9,8 +9,10 @@ &soc { usb0: ssusb@a600000 { compatible = "qcom,dwc-usb3-msm"; - reg = <0xa600000 0x100000>; - reg-names = "core_base"; + reg = <0xa600000 0x100000>, + <0x1fc6000 0x4>; + reg-names = "core_base", + "tcsr_dyn_en_dis"; #address-cells = <2>; #size-cells = <2>;