From patchwork Fri Aug 9 13:18:21 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Konrad Dybcio X-Patchwork-Id: 13758790 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 5628719046B; Fri, 9 Aug 2024 13:18:38 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1723209518; cv=none; b=lrDALw3dpvMzUusDNNa4sBr1c16c+RLUdjc+XmL3V+uwdgMfU6n2YVBu+a4pZRPORJvEmXUsC3zk60NVs6qqFFnFkNSOmvjoZ5GIF5mHzYiAFFCnfWGRSrXPDeGsHMBpdQ4R5a0BIq4UXfSlA7MKUWinGSP8hFO82Qi3re05qxQ= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1723209518; c=relaxed/simple; bh=qPDXYs0t+KCjLut77ceTV7SGMVhbMKc30rt8tKpzGcA=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=FWojlCTBhR1sH5JpZ/7XlHLpFh9mOugn+Zw4kS2bs1HJlJMpwD5ZNXQhNFNER/6o/3aUS9j+ERMWV4wYAUXDPM4c76eKKLvhQvTsdSi8rKCtjAUadU9DxClMnZCzi66v89APKE/s6pmt+jkvOH1BUAYvh05cmeJFVr+qTixvht8= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=lqbKgWXD; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="lqbKgWXD" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 3A606C4AF10; Fri, 9 Aug 2024 13:18:34 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1723209517; bh=qPDXYs0t+KCjLut77ceTV7SGMVhbMKc30rt8tKpzGcA=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=lqbKgWXD7oc438lelQHxic1AZn3jf6Ii83QLvadHUedgmsoGr70iPljDSsDLxxJC9 O4rid+MGjkiLKhdTHA0oiCI9yvfa81Lv2WQQulVH3HUwSiR1/FWw8zK+HgcwpoED3P hPliFCS6E0mWDQSuCo2dsf5VBBWpQMFA7vxPkAMqhLlg4LiosltBYQtuil/0l/Bs9h WB4Hg8hkGuixjPPa9s4np3QEkPpbth4JneZ3PpI5ll6HKjV335vI9juOVxNQZoKPtT Zfw5PieX+KKmTjLlHXPWkqxOwy0rIf8YtgIgC8Ul0+N3ZiZcQuaMLu/0hcXFj5ztSO uVr2AxqqnwtXA== From: Konrad Dybcio Date: Fri, 09 Aug 2024 15:18:21 +0200 Subject: [PATCH 1/2] dt-bindings: usb: qcom,dwc3: Document X1E80100 MP controller Precedence: bulk X-Mailing-List: linux-arm-msm@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20240809-topic-h_mp-v1-1-3c5f468566d8@quicinc.com> References: <20240809-topic-h_mp-v1-0-3c5f468566d8@quicinc.com> In-Reply-To: <20240809-topic-h_mp-v1-0-3c5f468566d8@quicinc.com> To: Greg Kroah-Hartman , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Wesley Cheng , Bjorn Andersson , Konrad Dybcio Cc: Marijn Suijten , linux-arm-msm@vger.kernel.org, linux-usb@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Krishna Kurapati , Konrad Dybcio X-Mailer: b4 0.14.1 X-Developer-Signature: v=1; a=ed25519-sha256; t=1723209509; l=1243; i=quic_kdybcio@quicinc.com; s=20230215; h=from:subject:message-id; bh=3Qrv0vcFFLIuxHpeKgszhwxTA2vXSBhWotVnTSN9RYo=; b=apC5GPSx9+eguK7SE0wjzsMWBd388+vnVhh/MeEcqnkIy+J52i0VK0mL3K34ETeIQ6Ua9uo8G Wr923c9fe8DBCKp6Go8DPhdo40vWAXsRd+UNqz8OJs/AIzc7W5CO8dD X-Developer-Key: i=quic_kdybcio@quicinc.com; a=ed25519; pk=iclgkYvtl2w05SSXO5EjjSYlhFKsJ+5OSZBjOkQuEms= From: Konrad Dybcio The X1E80100, just like its predecessors, has a Multiport controller. This time around, 2 HS (eUSB) and 2 SS PHYs are attached. Document it. Signed-off-by: Konrad Dybcio Reviewed-by: Krzysztof Kozlowski --- Documentation/devicetree/bindings/usb/qcom,dwc3.yaml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Documentation/devicetree/bindings/usb/qcom,dwc3.yaml b/Documentation/devicetree/bindings/usb/qcom,dwc3.yaml index e99c55bb4e9c..18758efb8d29 100644 --- a/Documentation/devicetree/bindings/usb/qcom,dwc3.yaml +++ b/Documentation/devicetree/bindings/usb/qcom,dwc3.yaml @@ -52,6 +52,7 @@ properties: - qcom,sm8550-dwc3 - qcom,sm8650-dwc3 - qcom,x1e80100-dwc3 + - qcom,x1e80100-dwc3-mp - const: qcom,dwc3 reg: @@ -289,6 +290,7 @@ allOf: - qcom,sc8280xp-dwc3 - qcom,sc8280xp-dwc3-mp - qcom,x1e80100-dwc3 + - qcom,x1e80100-dwc3-mp then: properties: clocks: @@ -501,6 +503,7 @@ allOf: contains: enum: - qcom,sc8180x-dwc3-mp + - qcom,x1e80100-dwc3-mp then: properties: interrupts: From patchwork Fri Aug 9 13:18:22 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Konrad Dybcio X-Patchwork-Id: 13758791 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 95705194C7A; Fri, 9 Aug 2024 13:18:42 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1723209522; cv=none; b=gBz3S44FTa8sKjukRVKro1bjSOLXJ1TBnKA6Js4pG5Zm+ijL+L53Z1l7zx42U4ItW+Ha/9RdxU2qJagr6M8FkskiFqqj+49MsbpCuX1nudMsGwxosSd6oiqKqiVQd1m0km/UwGBD9QUeJuc3lBibtULH3KN9YE2XOdy5TTIfjrs= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1723209522; c=relaxed/simple; bh=0gYAAUpeD7IVOB7psAkyGAyVO8jJGFsQpUhMUndedv0=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=E6dho9VqIiaNewExZfJV5BnK+GJkOb71uRkm688kiCQ0YVWJOCHTm4rWd3HYTwPwVWpZ+rXBdQbOw1/5rPLO1YuhT8kQw846RT3+vdkJV2L6x8vIjJlyHnVQ+F7nyBVu9Kl6ud0DYgXseVoy5em4sJVd+pb2tdFF7TroSe2ECsE= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=fWW5dEMd; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="fWW5dEMd" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 7D89EC32782; Fri, 9 Aug 2024 13:18:38 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1723209522; bh=0gYAAUpeD7IVOB7psAkyGAyVO8jJGFsQpUhMUndedv0=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=fWW5dEMdi7Wv6eSInxFEwggeLslkOJHrA18qZXljmtHBzF9jJTZzK6gppR83OOzZw 3T5G1KIS8SCyyG3USOZf3eRSDMjp+2e9NFQUTAq8+sPQZ4lfSmNDVKTYrj8R2KqMzn L0CqgWl6LIxAXX19EH7f+UvkUmbLxJEsdGy7BGcG16NjTJlkfVzBggjKbjwuVpVjq8 OuQl4Vhr1TG6EXHwoc+pjkpZpCuSnPbpWS5CyH1z2T9eqCVbaL226u5m/WwzgGKQu3 SDrwE8VpcKM51CepXeIwXL0gqQ8jFNsDekolU8kTC6xO8dm+r7V0GvJv6Zwns32Kr4 Wr6rc+FNU1Yyg== From: Konrad Dybcio Date: Fri, 09 Aug 2024 15:18:22 +0200 Subject: [PATCH 2/2] arm64: dts: qcom: x1e80100: Add USB Multiport controller Precedence: bulk X-Mailing-List: linux-arm-msm@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20240809-topic-h_mp-v1-2-3c5f468566d8@quicinc.com> References: <20240809-topic-h_mp-v1-0-3c5f468566d8@quicinc.com> In-Reply-To: <20240809-topic-h_mp-v1-0-3c5f468566d8@quicinc.com> To: Greg Kroah-Hartman , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Wesley Cheng , Bjorn Andersson , Konrad Dybcio Cc: Marijn Suijten , linux-arm-msm@vger.kernel.org, linux-usb@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Krishna Kurapati , Konrad Dybcio , Konrad Dybcio X-Mailer: b4 0.14.1 X-Developer-Signature: v=1; a=ed25519-sha256; t=1723209509; l=5806; i=quic_kdybcio@quicinc.com; s=20230215; h=from:subject:message-id; bh=0gYAAUpeD7IVOB7psAkyGAyVO8jJGFsQpUhMUndedv0=; b=fYgEJ6SXNZBtDiLNkxyUOhy53YHezNx5m1HKWj46dnOP4t2+qcmM3YUj5Q2rC/xMBU2DjToYj U6Xk+4/l1b/CGJ5GH00Jb7pF4ZqtowhHQNftbjNApIQFBcWPGeMvAbP X-Developer-Key: i=quic_kdybcio@quicinc.com; a=ed25519; pk=iclgkYvtl2w05SSXO5EjjSYlhFKsJ+5OSZBjOkQuEms= X1E80100 has a multiport controller with 2 HS (eUSB) and 2 SS PHYs attached to it. It's commonly used for USB-A ports and internally routed devices. Configure it to support such functionality. Signed-off-by: Konrad Dybcio --- arch/arm64/boot/dts/qcom/x1e80100.dtsi | 170 +++++++++++++++++++++++++++++++++ 1 file changed, 170 insertions(+) diff --git a/arch/arm64/boot/dts/qcom/x1e80100.dtsi b/arch/arm64/boot/dts/qcom/x1e80100.dtsi index 326283822aee..b6dd2f47341b 100644 --- a/arch/arm64/boot/dts/qcom/x1e80100.dtsi +++ b/arch/arm64/boot/dts/qcom/x1e80100.dtsi @@ -3842,6 +3842,90 @@ usb_2_hsphy: phy@88e0000 { status = "disabled"; }; + usb_mp_hsphy0: phy@88e1000 { + compatible = "qcom,x1e80100-snps-eusb2-phy", + "qcom,sm8550-snps-eusb2-phy"; + reg = <0 0x088e1000 0 0x154>; + #phy-cells = <0>; + + clocks = <&tcsr TCSR_USB3_MP0_CLKREF_EN>; + clock-names = "ref"; + + resets = <&gcc GCC_QUSB2PHY_HS0_MP_BCR>; + + status = "disabled"; + }; + + usb_mp_hsphy1: phy@88e2000 { + compatible = "qcom,x1e80100-snps-eusb2-phy", + "qcom,sm8550-snps-eusb2-phy"; + reg = <0 0x088e2000 0 0x154>; + #phy-cells = <0>; + + clocks = <&tcsr TCSR_USB3_MP1_CLKREF_EN>; + clock-names = "ref"; + + resets = <&gcc GCC_QUSB2PHY_HS1_MP_BCR>; + + status = "disabled"; + }; + + usb_mp_qmpphy0: phy@88e3000 { + compatible = "qcom,x1e80100-qmp-usb3-uni-phy"; + reg = <0 0x088e3000 0 0x2000>; + + clocks = <&gcc GCC_USB3_MP_PHY_AUX_CLK>, + <&rpmhcc RPMH_CXO_CLK>, + <&gcc GCC_USB3_MP_PHY_COM_AUX_CLK>, + <&gcc GCC_USB3_MP_PHY_PIPE_0_CLK>; + clock-names = "aux", + "ref", + "com_aux", + "pipe"; + + resets = <&gcc GCC_USB3_UNIPHY_MP0_BCR>, + <&gcc GCC_USB3UNIPHY_PHY_MP0_BCR>; + reset-names = "phy", + "phy_phy"; + + power-domains = <&gcc GCC_USB3_MP_SS0_PHY_GDSC>; + + #clock-cells = <0>; + clock-output-names = "usb_mp_phy0_pipe_clk"; + + #phy-cells = <0>; + + status = "disabled"; + }; + + usb_mp_qmpphy1: phy@88e5000 { + compatible = "qcom,x1e80100-qmp-usb3-uni-phy"; + reg = <0 0x088e5000 0 0x2000>; + + clocks = <&gcc GCC_USB3_MP_PHY_AUX_CLK>, + <&rpmhcc RPMH_CXO_CLK>, + <&gcc GCC_USB3_MP_PHY_COM_AUX_CLK>, + <&gcc GCC_USB3_MP_PHY_PIPE_1_CLK>; + clock-names = "aux", + "ref", + "com_aux", + "pipe"; + + resets = <&gcc GCC_USB3_UNIPHY_MP1_BCR>, + <&gcc GCC_USB3UNIPHY_PHY_MP1_BCR>; + reset-names = "phy", + "phy_phy"; + + power-domains = <&gcc GCC_USB3_MP_SS1_PHY_GDSC>; + + #clock-cells = <0>; + clock-output-names = "usb_mp_phy1_pipe_clk"; + + #phy-cells = <0>; + + status = "disabled"; + }; + usb_1_ss2: usb@a0f8800 { compatible = "qcom,x1e80100-dwc3", "qcom,dwc3"; reg = <0 0x0a0f8800 0 0x400>; @@ -4016,6 +4100,92 @@ usb_2_dwc3_hs: endpoint { }; }; + usb_mp: usb@a4f8800 { + compatible = "qcom,x1e80100-dwc3-mp", "qcom,dwc3"; + reg = <0 0x0a4f8800 0 0x400>; + + clocks = <&gcc GCC_CFG_NOC_USB3_MP_AXI_CLK>, + <&gcc GCC_USB30_MP_MASTER_CLK>, + <&gcc GCC_AGGRE_USB3_MP_AXI_CLK>, + <&gcc GCC_USB30_MP_SLEEP_CLK>, + <&gcc GCC_USB30_MP_MOCK_UTMI_CLK>, + <&gcc GCC_AGGRE_USB_NOC_AXI_CLK>, + <&gcc GCC_AGGRE_NOC_USB_NORTH_AXI_CLK>, + <&gcc GCC_AGGRE_NOC_USB_SOUTH_AXI_CLK>, + <&gcc GCC_SYS_NOC_USB_AXI_CLK>; + clock-names = "cfg_noc", + "core", + "iface", + "sleep", + "mock_utmi", + "noc_aggr", + "noc_aggr_north", + "noc_aggr_south", + "noc_sys"; + + assigned-clocks = <&gcc GCC_USB30_MP_MOCK_UTMI_CLK>, + <&gcc GCC_USB30_MP_MASTER_CLK>; + assigned-clock-rates = <19200000>, + <200000000>; + + interrupts-extended = <&intc GIC_SPI 313 IRQ_TYPE_LEVEL_HIGH>, + <&intc GIC_SPI 314 IRQ_TYPE_LEVEL_HIGH>, + <&intc GIC_SPI 309 IRQ_TYPE_LEVEL_HIGH>, + <&intc GIC_SPI 312 IRQ_TYPE_LEVEL_HIGH>, + <&pdc 52 IRQ_TYPE_EDGE_BOTH>, + <&pdc 51 IRQ_TYPE_EDGE_BOTH>, + <&pdc 54 IRQ_TYPE_EDGE_BOTH>, + <&pdc 53 IRQ_TYPE_EDGE_BOTH>, + <&pdc 55 IRQ_TYPE_LEVEL_HIGH>, + <&pdc 56 IRQ_TYPE_LEVEL_HIGH>; + interrupt-names = "pwr_event_1", "pwr_event_2", + "hs_phy_1", "hs_phy_2", + "dp_hs_phy_1", "dm_hs_phy_1", + "dp_hs_phy_2", "dm_hs_phy_2", + "ss_phy_1", "ss_phy_2"; + + power-domains = <&gcc GCC_USB30_MP_GDSC>; + required-opps = <&rpmhpd_opp_nom>; + + resets = <&gcc GCC_USB30_MP_BCR>; + + interconnects = <&usb_north_anoc MASTER_USB3_MP QCOM_ICC_TAG_ALWAYS + &mc_virt SLAVE_EBI1 QCOM_ICC_TAG_ALWAYS>, + <&gem_noc MASTER_APPSS_PROC QCOM_ICC_TAG_ALWAYS + &config_noc SLAVE_USB3_MP QCOM_ICC_TAG_ALWAYS>; + interconnect-names = "usb-ddr", + "apps-usb"; + + wakeup-source; + + #address-cells = <2>; + #size-cells = <2>; + ranges; + + status = "disabled"; + + usb_mp_dwc3: usb@a400000 { + compatible = "snps,dwc3"; + reg = <0 0x0a400000 0 0xcd00>; + + interrupts = ; + + iommus = <&apps_smmu 0x1400 0x0>; + + phys = <&usb_mp_hsphy0>, <&usb_mp_qmpphy0>, + <&usb_mp_hsphy1>, <&usb_mp_qmpphy1>; + phy-names = "usb2-0", "usb3-0", + "usb2-1", "usb3-1"; + dr_mode = "host"; + + snps,dis_u2_susphy_quirk; + snps,dis_enblslpm_quirk; + snps,usb3_lpm_capable; + + dma-coherent; + }; + }; + usb_1_ss0: usb@a6f8800 { compatible = "qcom,x1e80100-dwc3", "qcom,dwc3"; reg = <0 0x0a6f8800 0 0x400>;