From 64f8541e7a2c5e91498f297bce89a88ab9a34fd3 Mon Sep 17 00:00:00 2001 From: Manish Nagar Date: Mon, 10 Mar 2025 16:17:43 +0530 Subject: [PATCH] arm64: dts: qcom: qcs8300-ride: Enable second USB controller on QCS8300 Ride Enable secondary USB controller on QCS8300 Ride platform. Since it is a Type-A port, the dr_mode has been set to "host". The VBUS to connected peripherals is provided by TPS2559QWDRCTQ1 regulator connected to the port. The regulator has an enable pin controlled by PMM8650. Model it as fixed regulator and keep it Always-On at boot, since the regulator is GPIO controlled regulator. Co-developed-by: Krishna Kurapati Signed-off-by: Krishna Kurapati Signed-off-by: Manish Nagar Reviewed-by: Konrad Dybcio Link: https://lore.kernel.org/r/20250310104743.976265-1-quic_mnagar@quicinc.com Signed-off-by: Bjorn Andersson --- arch/arm64/boot/dts/qcom/qcs8300-ride.dts | 35 +++++++++++++++++++++++ 1 file changed, 35 insertions(+) diff --git a/arch/arm64/boot/dts/qcom/qcs8300-ride.dts b/arch/arm64/boot/dts/qcom/qcs8300-ride.dts index 2835b81d86ff6..3ff8f398cad31 100644 --- a/arch/arm64/boot/dts/qcom/qcs8300-ride.dts +++ b/arch/arm64/boot/dts/qcom/qcs8300-ride.dts @@ -22,6 +22,16 @@ chosen { stdout-path = "serial0:115200n8"; }; + + regulator-usb2-vbus { + compatible = "regulator-fixed"; + regulator-name = "USB2_VBUS"; + gpio = <&pmm8650au_1_gpios 7 GPIO_ACTIVE_HIGH>; + pinctrl-0 = <&usb2_en>; + pinctrl-names = "default"; + enable-active-high; + regulator-always-on; + }; }; &apps_rsc { @@ -285,6 +295,15 @@ }; }; +&pmm8650au_1_gpios { + usb2_en: usb2-en-state { + pins = "gpio7"; + function = "normal"; + output-enable; + power-source = <0>; + }; +}; + &qupv3_id_0 { status = "okay"; }; @@ -354,6 +373,14 @@ status = "okay"; }; +&usb_2_hsphy { + vdda-pll-supply = <&vreg_l7a>; + vdda18-supply = <&vreg_l7c>; + vdda33-supply = <&vreg_l9a>; + + status = "okay"; +}; + &usb_qmpphy { vdda-phy-supply = <&vreg_l7a>; vdda-pll-supply = <&vreg_l5a>; @@ -368,3 +395,11 @@ &usb_1_dwc3 { dr_mode = "peripheral"; }; + +&usb_2 { + status = "okay"; +}; + +&usb_2_dwc3 { + dr_mode = "host"; +}; -- 2.47.2