[PATCH v4 3/3] arm64: dts: qcom: lemans-evk: Enable the tertiary USB controller

Swati Agarwal posted 3 patches 1 month, 1 week ago
There is a newer version of this series
[PATCH v4 3/3] arm64: dts: qcom: lemans-evk: Enable the tertiary USB controller
Posted by Swati Agarwal 1 month, 1 week ago
Enable the tertiary usb controller connected to micro usb port in OTG mode
on Lemans EVK platform.

Reviewed-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>
Signed-off-by: Swati Agarwal <swati.agarwal@oss.qualcomm.com>
---
 arch/arm64/boot/dts/qcom/lemans-evk.dts | 52 +++++++++++++++++++++++++
 1 file changed, 52 insertions(+)

diff --git a/arch/arm64/boot/dts/qcom/lemans-evk.dts b/arch/arm64/boot/dts/qcom/lemans-evk.dts
index 397052394930..2203967c7d51 100644
--- a/arch/arm64/boot/dts/qcom/lemans-evk.dts
+++ b/arch/arm64/boot/dts/qcom/lemans-evk.dts
@@ -68,6 +68,25 @@ usb0_con_ss_ep: endpoint {
 		};
 	};
 
+	connector-2 {
+		compatible = "gpio-usb-b-connector", "usb-b-connector";
+		label = "micro-USB";
+		type = "micro";
+
+		id-gpios = <&pmm8654au_2_gpios 11 GPIO_ACTIVE_HIGH>;
+		vbus-gpios = <&expander3 3 GPIO_ACTIVE_HIGH>;
+		vbus-supply = <&usb2_vbus>;
+
+		pinctrl-0 = <&usb2_id>;
+		pinctrl-names = "default";
+
+		port {
+			usb2_con_hs_ep: endpoint {
+				remote-endpoint = <&usb_2_dwc3_hs>;
+			};
+		};
+	};
+
 	edp0-connector {
 		compatible = "dp-connector";
 		label = "EDP0";
@@ -132,6 +151,15 @@ platform {
 		};
 	};
 
+	usb2_vbus: regulator-usb2-vbus {
+		compatible = "regulator-fixed";
+		regulator-name = "usb2_vbus";
+		gpio = <&pmm8654au_1_gpios 9 GPIO_ACTIVE_HIGH>;
+		regulator-min-microvolt = <5000000>;
+		regulator-max-microvolt = <5000000>;
+		enable-active-high;
+	};
+
 	vbus_supply_regulator_0: regulator-vbus-supply-0 {
 		compatible = "regulator-fixed";
 		regulator-name = "vbus_supply_0";
@@ -719,6 +747,14 @@ usb0_intr_state: usb0-intr-state {
 		bias-pull-up;
 		power-source = <0>;
 	};
+
+	usb2_id: usb2-id-state {
+		pins = "gpio11";
+		function = "normal";
+		input-enable;
+		bias-pull-up;
+		power-source = <0>;
+	};
 };
 
 &qup_i2c19_default {
@@ -966,6 +1002,22 @@ &usb_0_qmpphy {
 	status = "okay";
 };
 
+&usb_2 {
+	status = "okay";
+};
+
+&usb_2_dwc3_hs {
+	remote-endpoint = <&usb2_con_hs_ep>;
+};
+
+&usb_2_hsphy {
+	vdda-pll-supply = <&vreg_l7a>;
+	vdda18-supply = <&vreg_l6c>;
+	vdda33-supply = <&vreg_l9a>;
+
+	status = "okay";
+};
+
 &xo_board_clk {
 	clock-frequency = <38400000>;
 };
-- 
2.34.1
Re: [PATCH v4 3/3] arm64: dts: qcom: lemans-evk: Enable the tertiary USB controller
Posted by Dmitry Baryshkov 1 month, 1 week ago
On Thu, Feb 26, 2026 at 11:38:35AM +0530, Swati Agarwal wrote:
> Enable the tertiary usb controller connected to micro usb port in OTG mode
> on Lemans EVK platform.
> 
> Reviewed-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>
> Signed-off-by: Swati Agarwal <swati.agarwal@oss.qualcomm.com>
> ---
>  arch/arm64/boot/dts/qcom/lemans-evk.dts | 52 +++++++++++++++++++++++++
>  1 file changed, 52 insertions(+)
> 
> @@ -132,6 +151,15 @@ platform {
>  		};
>  	};
>  
> +	usb2_vbus: regulator-usb2-vbus {

What is the name (and the label) for the VBus regulator for the first
connector? It's visible just under your chunk. Why your chunk doesn't
use a similar name?

> +		compatible = "regulator-fixed";
> +		regulator-name = "usb2_vbus";
> +		gpio = <&pmm8654au_1_gpios 9 GPIO_ACTIVE_HIGH>;
> +		regulator-min-microvolt = <5000000>;
> +		regulator-max-microvolt = <5000000>;
> +		enable-active-high;
> +	};
> +
>  	vbus_supply_regulator_0: regulator-vbus-supply-0 {
>  		compatible = "regulator-fixed";
>  		regulator-name = "vbus_supply_0";

-- 
With best wishes
Dmitry
Re: [PATCH v4 3/3] arm64: dts: qcom: lemans-evk: Enable the tertiary USB controller
Posted by Swati Agarwal 1 month, 1 week ago
On Thu, Feb 26, 2026 at 12:36 PM Dmitry Baryshkov
<dmitry.baryshkov@oss.qualcomm.com> wrote:
>
> On Thu, Feb 26, 2026 at 11:38:35AM +0530, Swati Agarwal wrote:
> > Enable the tertiary usb controller connected to micro usb port in OTG mode
> > on Lemans EVK platform.
> >
> > Reviewed-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>
> > Signed-off-by: Swati Agarwal <swati.agarwal@oss.qualcomm.com>
> > ---
> >  arch/arm64/boot/dts/qcom/lemans-evk.dts | 52 +++++++++++++++++++++++++
> >  1 file changed, 52 insertions(+)
> >
> > @@ -132,6 +151,15 @@ platform {
> >               };
> >       };
> >
> > +     usb2_vbus: regulator-usb2-vbus {
>
> What is the name (and the label) for the VBus regulator for the first
> connector? It's visible just under your chunk. Why your chunk doesn't
> use a similar name?
Hi Dmitry,

As per Bjorn previous comment on v2 patch, "use supply name as per
schematics" so that's the reason I followed that and created a label
as per regulator name.
For eg:- if the regulator name is vmmc_sdc then label vmmc_sdc:
regulator-vmmc-sdc.
In my case the regulator name in schematics is usb2_vbus, then the
label I used is usb2_vbus: regulator-usb2-vbus .

Regards,
Swati
Re: [PATCH v4 3/3] arm64: dts: qcom: lemans-evk: Enable the tertiary USB controller
Posted by Dmitry Baryshkov 1 month, 1 week ago
On Fri, Feb 27, 2026 at 11:26:07AM +0530, Swati Agarwal wrote:
> On Thu, Feb 26, 2026 at 12:36 PM Dmitry Baryshkov
> <dmitry.baryshkov@oss.qualcomm.com> wrote:
> >
> > On Thu, Feb 26, 2026 at 11:38:35AM +0530, Swati Agarwal wrote:
> > > Enable the tertiary usb controller connected to micro usb port in OTG mode
> > > on Lemans EVK platform.
> > >
> > > Reviewed-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>
> > > Signed-off-by: Swati Agarwal <swati.agarwal@oss.qualcomm.com>
> > > ---
> > >  arch/arm64/boot/dts/qcom/lemans-evk.dts | 52 +++++++++++++++++++++++++
> > >  1 file changed, 52 insertions(+)
> > >
> > > @@ -132,6 +151,15 @@ platform {
> > >               };
> > >       };
> > >
> > > +     usb2_vbus: regulator-usb2-vbus {
> >
> > What is the name (and the label) for the VBus regulator for the first
> > connector? It's visible just under your chunk. Why your chunk doesn't
> > use a similar name?
> Hi Dmitry,
> 
> As per Bjorn previous comment on v2 patch, "use supply name as per
> schematics" so that's the reason I followed that and created a label
> as per regulator name.
> For eg:- if the regulator name is vmmc_sdc then label vmmc_sdc:
> regulator-vmmc-sdc.
> In my case the regulator name in schematics is usb2_vbus, then the
> label I used is usb2_vbus: regulator-usb2-vbus .

Then please add a commit, bringing the other VBUS supply into the shape.
It doesn't look correct to have two VBUS supplies, which are defined
differently.

> 
> Regards,
> Swati

-- 
With best wishes
Dmitry