From: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
To: Bjorn Andersson <andersson@kernel.org>,
Konrad Dybcio <konrad.dybcio@linaro.org>,
Liam Girdwood <lgirdwood@gmail.com>,
Mark Brown <broonie@kernel.org>,
Rob Herring <robh+dt@kernel.org>,
Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>,
Conor Dooley <conor+dt@kernel.org>,
Wesley Cheng <quic_wcheng@quicinc.com>,
Bryan O'Donoghue <bryan.odonoghue@linaro.org>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Vinod Koul <vkoul@kernel.org>,
Kishon Vijay Abraham I <kishon@kernel.org>,
Guenter Roeck <linux@roeck-us.net>,
Heikki Krogerus <heikki.krogerus@linux.intel.com>,
Philipp Zabel <p.zabel@pengutronix.de>,
Bhupesh Sharma <bhupesh.sharma@linaro.org>
Cc: linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org,
linux-usb@vger.kernel.org, linux-phy@lists.infradead.org
Subject: [PATCH 13/13] arm64: dts: qcom: qrb4210-rb2: enable USB-C port handling
Date: Sat, 13 Jan 2024 07:42:50 +0200 [thread overview]
Message-ID: <20240113-pmi632-typec-v1-13-de7dfd459353@linaro.org> (raw)
In-Reply-To: <20240113-pmi632-typec-v1-0-de7dfd459353@linaro.org>
Plug in USB-C related bits and pieces to enable USB role switching and
USB-C orientation handling for the Qualcomm RB2 board.
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
---
arch/arm64/boot/dts/qcom/qrb4210-rb2.dts | 62 ++++++++++++++++++++++++++++++++
arch/arm64/boot/dts/qcom/sm6115.dtsi | 38 ++++++++++++++++++++
2 files changed, 100 insertions(+)
diff --git a/arch/arm64/boot/dts/qcom/qrb4210-rb2.dts b/arch/arm64/boot/dts/qcom/qrb4210-rb2.dts
index 52f31f3166c2..a96e3afb65bc 100644
--- a/arch/arm64/boot/dts/qcom/qrb4210-rb2.dts
+++ b/arch/arm64/boot/dts/qcom/qrb4210-rb2.dts
@@ -6,8 +6,10 @@
/dts-v1/;
#include <dt-bindings/leds/common.h>
+#include <dt-bindings/usb/pd.h>
#include "sm4250.dtsi"
#include "pm6125.dtsi"
+#include "pmi632.dtsi"
/ {
model = "Qualcomm Technologies, Inc. QRB4210 RB2";
@@ -256,6 +258,53 @@ kypd_vol_up_n: kypd-vol-up-n-state {
};
};
+&pmi632_typec {
+ status = "okay";
+
+ connector {
+ compatible = "usb-c-connector";
+
+ power-role = "dual";
+ data-role = "dual";
+ self-powered;
+
+ source-pdos = <PDO_FIXED(5000, 3000,
+ PDO_FIXED_DUAL_ROLE |
+ PDO_FIXED_USB_COMM |
+ PDO_FIXED_DATA_SWAP)>;
+ sink-pdos = <PDO_FIXED(5000, 500,
+ PDO_FIXED_DUAL_ROLE |
+ PDO_FIXED_USB_COMM |
+ PDO_FIXED_DATA_SWAP)>;
+ op-sink-microwatt = <10000000>;
+
+ ports {
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ port@0 {
+ reg = <0>;
+ pmi632_hs_in: endpoint {
+ remote-endpoint = <&usb_dwc3_hs>;
+ };
+ };
+
+ port@1 {
+ reg = <1>;
+ pmi632_ss_in: endpoint {
+ remote-endpoint = <&usb_qmpphy_out>;
+ };
+ };
+ };
+ };
+};
+
+&pmi632_vbus {
+ regulator-min-microamp = <500000>;
+ regulator-max-microamp = <3000000>;
+ status = "okay";
+};
+
&pon_pwrkey {
status = "okay";
};
@@ -607,6 +656,14 @@ &usb {
status = "okay";
};
+&usb_dwc3 {
+ usb-role-switch;
+};
+
+&usb_dwc3_hs {
+ remote-endpoint = <&pmi632_hs_in>;
+};
+
&usb_hsphy {
vdd-supply = <&vreg_l4a_0p9>;
vdda-pll-supply = <&vreg_l12a_1p8>;
@@ -618,10 +675,15 @@ &usb_hsphy {
&usb_qmpphy {
vdda-phy-supply = <&vreg_l4a_0p9>;
vdda-pll-supply = <&vreg_l12a_1p8>;
+ orientation-switch;
status = "okay";
};
+&usb_qmpphy_out {
+ remote-endpoint = <&pmi632_ss_in>;
+};
+
&wifi {
vdd-0.8-cx-mx-supply = <&vreg_l8a_0p664>;
vdd-1.8-xo-supply = <&vreg_l16a_1p3>;
diff --git a/arch/arm64/boot/dts/qcom/sm6115.dtsi b/arch/arm64/boot/dts/qcom/sm6115.dtsi
index 76c429e8ebab..252074219bed 100644
--- a/arch/arm64/boot/dts/qcom/sm6115.dtsi
+++ b/arch/arm64/boot/dts/qcom/sm6115.dtsi
@@ -880,6 +880,25 @@ usb_qmpphy: phy@1615000 {
#phy-cells = <0>;
status = "disabled";
+
+ ports {
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ port@0 {
+ reg = <0>;
+
+ usb_qmpphy_out: endpoint {
+ };
+ };
+
+ port@1 {
+ reg = <1>;
+
+ usb_qmpphy_usb_ss_in: endpoint {
+ };
+ };
+ };
};
system_noc: interconnect@1880000 {
@@ -1614,6 +1633,25 @@ usb_dwc3: usb@4e00000 {
snps,has-lpm-erratum;
snps,hird-threshold = /bits/ 8 <0x10>;
snps,usb3_lpm_capable;
+
+ ports {
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ port@0 {
+ reg = <0>;
+
+ usb_dwc3_hs: endpoint {
+ };
+ };
+
+ port@1 {
+ reg = <1>;
+
+ usb_dwc3_ss: endpoint {
+ };
+ };
+ };
};
};
--
2.39.2
next prev parent reply other threads:[~2024-01-13 5:42 UTC|newest]
Thread overview: 35+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-01-13 5:42 [PATCH 00/13] usb: typec: qcom-pmic-typec: enable support for PMI632 PMIC Dmitry Baryshkov
2024-01-13 5:42 ` [PATCH 01/13] dt-bindings: regulator: qcom,usb-vbus-regulator: add support for PMI632 Dmitry Baryshkov
2024-01-13 5:42 ` [PATCH 02/13] dt-bindings: usb: qcom,pmic-typec: add support for the PMI632 block Dmitry Baryshkov
2024-01-13 5:42 ` [PATCH 03/13] dt-bindings: phy: qcom,msm8998-qmp-usb3-phy: split from sc8280xp PHY schema Dmitry Baryshkov
2024-01-13 5:42 ` [PATCH 04/13] dt-bindings: phy: qcom,msm8998-qmp-usb3-phy: support USB-C data Dmitry Baryshkov
2024-01-13 12:09 ` Bryan O'Donoghue
2024-01-13 5:42 ` [PATCH 05/13] usb: typec: qcom-pmic-typec: allow different implementations for the PD PHY Dmitry Baryshkov
2024-01-13 10:32 ` Konrad Dybcio
2024-01-13 13:43 ` Bryan O'Donoghue
2024-01-13 14:24 ` Dmitry Baryshkov
2024-01-13 5:42 ` [PATCH 06/13] usb: typec: qcom-pmic-typec: add support for PMI632 PMIC Dmitry Baryshkov
2024-01-13 10:33 ` Konrad Dybcio
2024-01-13 13:58 ` Bryan O'Donoghue
2024-01-13 13:40 ` Bryan O'Donoghue
2024-01-13 5:42 ` [PATCH 07/13] phy: qcom: qmp-usb: split USB-C PHY driver Dmitry Baryshkov
2024-01-13 10:42 ` Konrad Dybcio
2024-01-13 14:15 ` Dmitry Baryshkov
2024-01-13 14:48 ` Konrad Dybcio
2024-01-13 5:42 ` [PATCH 08/13] phy: qcom: qmp-usb: drop dual-lane handling Dmitry Baryshkov
2024-01-13 10:46 ` Konrad Dybcio
2024-01-17 0:04 ` Jeff Johnson
2024-01-13 5:42 ` [PATCH 09/13] phy: qcom: qmp-usbc: drop single lane handling Dmitry Baryshkov
2024-01-13 10:46 ` Konrad Dybcio
2024-01-13 14:16 ` Dmitry Baryshkov
2024-01-13 5:42 ` [PATCH 10/13] phy: qcom: qmp-usbc: add support for the Type-C handling Dmitry Baryshkov
2024-01-13 10:48 ` Konrad Dybcio
2024-01-13 14:17 ` Dmitry Baryshkov
2024-01-13 5:42 ` [PATCH 11/13] arm64: dts: qcom: pmi632: define USB-C related blocks Dmitry Baryshkov
2024-01-13 10:48 ` Konrad Dybcio
2024-01-13 12:18 ` Bryan O'Donoghue
2024-01-13 5:42 ` [PATCH 12/13] arm64: dts: qcom: sm6115: drop pipe clock selection Dmitry Baryshkov
2024-01-13 10:49 ` Konrad Dybcio
2024-01-13 5:42 ` Dmitry Baryshkov [this message]
2024-01-13 10:52 ` [PATCH 13/13] arm64: dts: qcom: qrb4210-rb2: enable USB-C port handling Konrad Dybcio
2024-01-13 14:20 ` Dmitry Baryshkov
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20240113-pmi632-typec-v1-13-de7dfd459353@linaro.org \
--to=dmitry.baryshkov@linaro.org \
--cc=andersson@kernel.org \
--cc=bhupesh.sharma@linaro.org \
--cc=broonie@kernel.org \
--cc=bryan.odonoghue@linaro.org \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=gregkh@linuxfoundation.org \
--cc=heikki.krogerus@linux.intel.com \
--cc=kishon@kernel.org \
--cc=konrad.dybcio@linaro.org \
--cc=krzysztof.kozlowski+dt@linaro.org \
--cc=lgirdwood@gmail.com \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-phy@lists.infradead.org \
--cc=linux-usb@vger.kernel.org \
--cc=linux@roeck-us.net \
--cc=p.zabel@pengutronix.de \
--cc=quic_wcheng@quicinc.com \
--cc=robh+dt@kernel.org \
--cc=vkoul@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).