diff mbox series

[v9,7/7] arm64: dts: qcom: qrb5165-rb5: Switch on TCPM orientation-switch for usb_1_qmpphy

Message ID 20230816115151.501736-8-bryan.odonoghue@linaro.org (mailing list archive)
State Changes Requested
Headers show
Series Add Qualcomm PMIC TPCM support | expand

Commit Message

Bryan O'Donoghue Aug. 16, 2023, 11:51 a.m. UTC
Switch on USB orientation-switching for usb_1_qmp via TCPM. Detecting the
orientation switch is required to get the PHY to reset and bring-up the PHY
with the CC lines set to the appropriate lane.

Signed-off-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org>
---
 arch/arm64/boot/dts/qcom/qrb5165-rb5.dts | 12 ++++++++++++
 arch/arm64/boot/dts/qcom/sm8250.dtsi     |  1 +
 2 files changed, 13 insertions(+)

Comments

Konrad Dybcio Aug. 26, 2023, 10:56 a.m. UTC | #1
On 16.08.2023 13:51, Bryan O'Donoghue wrote:
> Switch on USB orientation-switching for usb_1_qmp via TCPM. Detecting the
> orientation switch is required to get the PHY to reset and bring-up the PHY
> with the CC lines set to the appropriate lane.
> 
> Signed-off-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org>
> ---
>  arch/arm64/boot/dts/qcom/qrb5165-rb5.dts | 12 ++++++++++++
>  arch/arm64/boot/dts/qcom/sm8250.dtsi     |  1 +
>  2 files changed, 13 insertions(+)
> 
> diff --git a/arch/arm64/boot/dts/qcom/qrb5165-rb5.dts b/arch/arm64/boot/dts/qcom/qrb5165-rb5.dts
> index 3e34f4e2af14a..b878d765f8c42 100644
> --- a/arch/arm64/boot/dts/qcom/qrb5165-rb5.dts
> +++ b/arch/arm64/boot/dts/qcom/qrb5165-rb5.dts
> @@ -1290,6 +1290,11 @@ &usb_1_qmpphy {
>  
>  	vdda-phy-supply = <&vreg_l9a_1p2>;
>  	vdda-pll-supply = <&vreg_l18a_0p92>;
> +	orientation-switch;
> +};
> +
> +&usb_1_qmpphy_out {
> +	remote-endpoint = <&pm8150b_typec_mux_in>;
>  };
>  
>  &usb_2 {
> @@ -1374,6 +1379,13 @@ pm8150b_role_switch_in: endpoint {
>  					remote-endpoint = <&usb_1_role_switch_out>;
>  				};
>  			};
> +
> +			port@1 {
> +				reg = <1>;
> +				pm8150b_typec_mux_in: endpoint {
should also go to pmic dt

Konrad
diff mbox series

Patch

diff --git a/arch/arm64/boot/dts/qcom/qrb5165-rb5.dts b/arch/arm64/boot/dts/qcom/qrb5165-rb5.dts
index 3e34f4e2af14a..b878d765f8c42 100644
--- a/arch/arm64/boot/dts/qcom/qrb5165-rb5.dts
+++ b/arch/arm64/boot/dts/qcom/qrb5165-rb5.dts
@@ -1290,6 +1290,11 @@  &usb_1_qmpphy {
 
 	vdda-phy-supply = <&vreg_l9a_1p2>;
 	vdda-pll-supply = <&vreg_l18a_0p92>;
+	orientation-switch;
+};
+
+&usb_1_qmpphy_out {
+	remote-endpoint = <&pm8150b_typec_mux_in>;
 };
 
 &usb_2 {
@@ -1374,6 +1379,13 @@  pm8150b_role_switch_in: endpoint {
 					remote-endpoint = <&usb_1_role_switch_out>;
 				};
 			};
+
+			port@1 {
+				reg = <1>;
+				pm8150b_typec_mux_in: endpoint {
+					remote-endpoint = <&usb_1_qmpphy_out>;
+				};
+			};
 		};
 	};
 };
diff --git a/arch/arm64/boot/dts/qcom/sm8250.dtsi b/arch/arm64/boot/dts/qcom/sm8250.dtsi
index 733de2fd5e753..fe29b3da90c19 100644
--- a/arch/arm64/boot/dts/qcom/sm8250.dtsi
+++ b/arch/arm64/boot/dts/qcom/sm8250.dtsi
@@ -3620,6 +3620,7 @@  ports {
 
 				port@0 {
 					reg = <0>;
+					usb_1_qmpphy_out: endpoint {};
 				};
 
 				port@1 {