From b48af3ccf03da667d7e763f65a4cbfafdd559ea4 Mon Sep 17 00:00:00 2001 From: Rohith Kollalsi Date: Tue, 29 Mar 2022 15:24:58 +0530 Subject: [PATCH 1/3] ARM: dts: msm: Add interrupt, interconnects & BAM nodes to parrot Adding interconnects for usb_ddr, ddr_ipa & ddr_usb access, interrupts dp,dm,ss_phy_irq for parrot. Change-Id: Id162e212f4c63a2ce629e8232c995646449af092 --- qcom/parrot-usb.dtsi | 26 ++++++++++++++++++++++++-- 1 file changed, 24 insertions(+), 2 deletions(-) diff --git a/qcom/parrot-usb.dtsi b/qcom/parrot-usb.dtsi index 12e5041c..e75506a0 100644 --- a/qcom/parrot-usb.dtsi +++ b/qcom/parrot-usb.dtsi @@ -1,4 +1,5 @@ #include +#include &soc { usb0: ssusb@a600000 { @@ -23,11 +24,30 @@ resets = <&gcc GCC_USB30_PRIM_BCR>; reset-names = "core_reset"; - interrupts = ; - interrupt-names = "pwr_event_irq"; + interrupts-extended = <&pdc 14 IRQ_TYPE_EDGE_RISING>, + <&intc GIC_SPI 130 IRQ_TYPE_LEVEL_HIGH>, + <&pdc 17 IRQ_TYPE_LEVEL_HIGH>, + <&pdc 15 IRQ_TYPE_EDGE_RISING>; + interrupt-names = "dp_hs_phy_irq", "pwr_event_irq", + "ss_phy_irq", "dm_hs_phy_irq"; + qcom,use-pdc-interrupts; qcom,core-clk-rate = <133333333>; qcom,core-clk-rate-hs = <66666667>; + qcom,pm-qos-latency = <2>; + qcom,num-gsi-evt-buffs = <0x3>; + qcom,gsi-reg-offset = + <0x0fc /* GSI_GENERAL_CFG */ + 0x110 /* GSI_DBL_ADDR_L */ + 0x120 /* GSI_DBL_ADDR_H */ + 0x130 /* GSI_RING_BASE_ADDR_L */ + 0x144 /* GSI_RING_BASE_ADDR_H */ + 0x1a4>; /* GSI_IF_STS */ + + interconnect-names = "usb-ddr", "usb-ipa", "ddr-usb"; + interconnects = <&aggre1_noc MASTER_USB3_0 &mc_virt SLAVE_EBI1>, + <&aggre1_noc MASTER_USB3_0 &cnoc2 SLAVE_IPA_CFG>, + <&gem_noc MASTER_APPSS_PROC &cnoc2 SLAVE_USB3_0>; dwc3@a600000 { compatible = "snps,dwc3"; @@ -47,7 +67,9 @@ snps,dis-u2-entry-quirk; snps,dis_u2_susphy_quirk; tx-fifo-resize; + dr_mode = "peripheral"; maximum-speed = "super-speed"; }; + }; }; From e92bf24ac76cddf2bfe63bfbc8d49f5e0ec0ff83 Mon Sep 17 00:00:00 2001 From: Rohith Kollalsi Date: Thu, 31 Mar 2022 11:23:15 +0530 Subject: [PATCH 2/3] ARM: dts: msm: Add HS USB PHY support in Parrot Add HS USB Phy node in parrot usb in order to support device detection in HS mode. Change-Id: I3dd3b8d3869d52a44457b69b388abcd980218fdd --- qcom/parrot-rumi.dtsi | 4 ---- qcom/parrot-usb.dtsi | 28 +++++++++++++++++++++++++++- 2 files changed, 27 insertions(+), 5 deletions(-) diff --git a/qcom/parrot-rumi.dtsi b/qcom/parrot-rumi.dtsi index 50fc7137..4f3e5b8e 100644 --- a/qcom/parrot-rumi.dtsi +++ b/qcom/parrot-rumi.dtsi @@ -14,10 +14,6 @@ status = "disabled"; }; - usb_nop_phy: usb_nop_phy { - compatible = "usb-nop-xceiv"; - }; - usb_emuphy: phy@a784000 { compatible = "qcom,usb-emu-phy"; reg = <0x0a784000 0x9500>; diff --git a/qcom/parrot-usb.dtsi b/qcom/parrot-usb.dtsi index e75506a0..72c010e4 100644 --- a/qcom/parrot-usb.dtsi +++ b/qcom/parrot-usb.dtsi @@ -59,6 +59,7 @@ dma-coherent; interrupts = ; + usb-phy = <&usb2_phy0>, <&usb_nop_phy>; snps,disable-clk-gating; snps,has-lpm-erratum; snps,hird-threshold = /bits/ 8 <0x0>; @@ -68,8 +69,33 @@ snps,dis_u2_susphy_quirk; tx-fifo-resize; dr_mode = "peripheral"; - maximum-speed = "super-speed"; + maximum-speed = "high-speed"; }; }; + + /* USB port related High Speed PHY */ + usb2_phy0: hsphy@88e3000 { + compatible = "qcom,usb-hsphy-snps-femto"; + reg = <0x88e3000 0x11c>, + <0x088e2000 0x4>; + reg-names = "hsusb_phy_base", + "eud_enable_reg"; + + vdd-supply = <&L5B>; + vdda18-supply = <&L23B>; + vdda33-supply = <&L25B>; + qcom,vdd-voltage-level = <0 880000 920000>; + + clocks = <&rpmhcc RPMH_CXO_CLK>; + clock-names = "ref_clk_src"; + + resets = <&gcc GCC_QUSB2PHY_PRIM_BCR>; + reset-names = "phy_reset"; + }; + + usb_nop_phy: usb_nop_phy { + compatible = "usb-nop-xceiv"; + }; + }; From 9111beb3d598d836dc91024556452f83c2c5af37 Mon Sep 17 00:00:00 2001 From: Rohith Kollalsi Date: Fri, 1 Apr 2022 00:19:07 +0530 Subject: [PATCH 3/3] ARM: dts: msm: Add QMP PHY node for parrot Add QMP phy node for SS USB support in peripheral mode along with audio nodes for parrot. Change-Id: I12a78b8e2e8b4855e944b5156a9c2ce563e0ad7f --- qcom/parrot-usb.dtsi | 207 ++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 206 insertions(+), 1 deletion(-) diff --git a/qcom/parrot-usb.dtsi b/qcom/parrot-usb.dtsi index 72c010e4..38c13709 100644 --- a/qcom/parrot-usb.dtsi +++ b/qcom/parrot-usb.dtsi @@ -59,7 +59,7 @@ dma-coherent; interrupts = ; - usb-phy = <&usb2_phy0>, <&usb_nop_phy>; + usb-phy = <&usb2_phy0>, <&usb_qmp_dp_phy>; snps,disable-clk-gating; snps,has-lpm-erratum; snps,hird-threshold = /bits/ 8 <0x0>; @@ -94,6 +94,211 @@ reset-names = "phy_reset"; }; + /* 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 = <&L7B>; + qcom,vdd-voltage-level = <0 912000 912000>; + qcom,vdd-max-load-uA = <47000>; + core-supply = <&L16B>; + + resets = <&gcc GCC_USB3_DP_PHY_PRIM_BCR>, + <&gcc GCC_USB3_PHY_PRIM_BCR>; + reset-names = "global_phy_reset", "phy_reset"; + + 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_CLK>, + <&gcc GCC_USB3_PRIM_PHY_COM_AUX_CLK>; + clock-names = "aux_clk", "pipe_clk", "pipe_clk_mux", + "pipe_clk_ext_src", "ref_clk_src", + "com_aux_clk"; + + qcom,qmp-phy-reg-offset = + ; + + qcom,qmp-phy-init-seq = + /* */ + ; + }; + + usb_audio_qmi_dev { + compatible = "qcom,usb-audio-qmi-dev"; + iommus = <&apps_smmu 0x180f 0x0>; + qcom,iommu-dma = "disabled"; + qcom,usb-audio-stream-id = <0xf>; + qcom,usb-audio-intr-num = <2>; + }; + usb_nop_phy: usb_nop_phy { compatible = "usb-nop-xceiv"; };