[PATCH 3/3] arm64: dts: qcom: qru1000-idp: enable USB nodes

From: Komal Bajaj
Date: Tue Mar 19 2024 - 05:11:33 EST


Enable both USB controllers and associated hsphy and qmp phy
nodes on QRU1000 IDP. Add the usb type B port linked with the
DWC3 USB controller switched to OTG mode and tagged with
usb-role-switch.

Co-developed-by: Amrit Anand <quic_amrianan@xxxxxxxxxxx>
Signed-off-by: Amrit Anand <quic_amrianan@xxxxxxxxxxx>
Signed-off-by: Komal Bajaj <quic_kbajaj@xxxxxxxxxxx>
---
arch/arm64/boot/dts/qcom/qru1000-idp.dts | 65 ++++++++++++++++++++++++
1 file changed, 65 insertions(+)

diff --git a/arch/arm64/boot/dts/qcom/qru1000-idp.dts b/arch/arm64/boot/dts/qcom/qru1000-idp.dts
index 258483af065b..5c479c1e4773 100644
--- a/arch/arm64/boot/dts/qcom/qru1000-idp.dts
+++ b/arch/arm64/boot/dts/qcom/qru1000-idp.dts
@@ -46,6 +46,33 @@ ppvar_sys: ppvar-sys-regulator {
regulator-boot-on;
};

+ usb_conn_gpio: usb-conn-gpio {
+ compatible = "gpio-usb-b-connector";
+ vbus-gpio = <&pm8150_gpios 7 GPIO_ACTIVE_HIGH>;
+ id-gpio = <&tlmm 42 GPIO_ACTIVE_HIGH>;
+ vbus-supply = <&vbus_supply_regulator>;
+
+ pinctrl-0 = <&usb_vbus_det_default
+ &usb_id_det_default>;
+ pinctrl-names = "default";
+
+ port {
+ usb_port0_connector: endpoint {
+ remote-endpoint = <&usb_1_dwc3_hs>;
+ };
+ };
+ };
+
+ vbus_supply_regulator: vbus-supply-regulator {
+ compatible = "regulator-fixed";
+ regulator-name = "vbus_supply";
+
+ gpio = <&tlmm 43 GPIO_ACTIVE_HIGH>;
+ pinctrl-0 = <&usb_vbus_boost_default>;
+ pinctrl-names = "default";
+ enable-active-high;
+ };
+
vph_pwr: vph-pwr-regulator {
compatible = "regulator-fixed";
regulator-name = "vph_pwr";
@@ -239,6 +266,16 @@ vreg_l18a_1p2: ldo18 {
};
};

+&pm8150_gpios {
+ usb_vbus_det_default: usb-vbus-det-default {
+ pins = "gpio7";
+ function = "normal";
+ input-enable;
+ bias-pull-up;
+ power-source = <0>;
+ };
+};
+
&qup_i2c1_data_clk {
drive-strength = <2>;
bias-pull-up;
@@ -467,3 +504,31 @@ &tlmm {
&uart7 {
status = "okay";
};
+
+&usb_1 {
+ status = "okay";
+};
+
+&usb_1_dwc3 {
+ dr_mode = "otg";
+ usb-role-switch;
+};
+
+&usb_1_dwc3_hs {
+ remote-endpoint = <&usb_port0_connector>;
+};
+
+&usb_1_hsphy {
+ vdda-pll-supply = <&vreg_l8a_0p91>;
+ vdda18-supply = <&vreg_l14a_1p8>;
+ vdda33-supply = <&vreg_l2a_2p3>;
+
+ status = "okay";
+};
+
+&usb_1_qmpphy {
+ vdda-phy-supply = <&vreg_l8a_0p91>;
+ vdda-pll-supply = <&vreg_l3a_1p2>;
+
+ status = "okay";
+};
--
2.42.0