Re: [PATCH 2/2] arm64: dts: qcom: monaco-evk: Enable the tertiary USB controller

From: Loic Poulain

Date: Wed Mar 04 2026 - 05:48:15 EST


Hi Dmitry,

On Wed, Mar 4, 2026 at 3:22 AM Dmitry Baryshkov
<dmitry.baryshkov@xxxxxxxxxxxxxxxx> wrote:
>
> On Tue, Mar 03, 2026 at 08:32:36PM +0100, Loic Poulain wrote:
> > On Tue, Mar 3, 2026 at 9:25 AM Swati Agarwal
> > <swati.agarwal@xxxxxxxxxxxxxxxx> wrote:
> > >
> > > On Fri, Feb 13, 2026 at 4:15 PM Loic Poulain
> > > <loic.poulain@xxxxxxxxxxxxxxxx> wrote:
> > > >
> > > > Hi Swati,
> > > >
> > > > On Tue, Feb 10, 2026 at 4:54 PM Swati Agarwal
> > > > <swati.agarwal@xxxxxxxxxxxxxxxx> wrote:
> > > > >
> > > > > Enable the tertiary usb controller connected to micro usb port in OTG mode
> > > > > on Monaco EVK platform.
> > > > >
> > > > > Signed-off-by: Swati Agarwal <swati.agarwal@xxxxxxxxxxxxxxxx>
> > > > > ---
> > > > > arch/arm64/boot/dts/qcom/monaco-evk.dts | 53 +++++++++++++++++++++++++
> > > > > arch/arm64/boot/dts/qcom/monaco.dtsi | 7 ++++
> > > > > 2 files changed, 60 insertions(+)
> > > > >
> > > > > diff --git a/arch/arm64/boot/dts/qcom/monaco-evk.dts b/arch/arm64/boot/dts/qcom/monaco-evk.dts
> > > > > index 03af9bbcacc9..e6fc6f6a52e1 100644
> > > > > --- a/arch/arm64/boot/dts/qcom/monaco-evk.dts
> > > > > +++ b/arch/arm64/boot/dts/qcom/monaco-evk.dts
> > > > > @@ -27,6 +27,25 @@ chosen {
> > > > > stdout-path = "serial0:115200n8";
> > > > > };
> > > > >
> > > > > + connector-2 {
> > > > > + compatible = "gpio-usb-b-connector", "usb-b-connector";
> > > > > + label = "micro-USB";
> > > > > + type = "micro";
> > > > > +
> > > > > + id-gpios = <&pmm8620au_0_gpios 9 GPIO_ACTIVE_HIGH>;
> > > > > + vbus-gpios = <&expander6 7 GPIO_ACTIVE_HIGH>;
> > > > > + vbus-supply = <&vbus_supply_regulator_2>;
> > > > > +
> > > > > + pinctrl-names = "default";
> > > > > + pinctrl-0 = <&usb2_id>;
> > > > > +
> > > > > + port {
> > > > > + usb2_con_hs_ep: endpoint {
> > > > > + remote-endpoint = <&usb_2_dwc3_hs>;
> > > > > + };
> > > > > + };
> > > > > + };
> > > > > +
> > > > > dmic: audio-codec-0 {
> > > > > compatible = "dmic-codec";
> > > > > #sound-dai-cells = <0>;
> > > > > @@ -77,6 +96,15 @@ platform {
> > > > > };
> > > > > };
> > > > > };
> > > > > +
> > > > > + vbus_supply_regulator_2: vbus-supply-regulator-2 {
> > > > > + compatible = "regulator-fixed";
> > > > > + regulator-name = "vbus_supply_2";
> > > > > + gpio = <&pmm8650au_1_gpios 7 GPIO_ACTIVE_HIGH>;
> > > > > + regulator-min-microvolt = <5000000>;
> > > > > + regulator-max-microvolt = <5000000>;
> > > > > + enable-active-high;
> > > > > + };
> > > > > };
> > > > >
> > > > > &apps_rsc {
> > > > > @@ -484,6 +512,16 @@ &pcieport1 {
> > > > > wake-gpios = <&tlmm 21 GPIO_ACTIVE_HIGH>;
> > > > > };
> > > > >
> > > > > +&pmm8620au_0_gpios {
> > > > > + usb2_id: usb2-id-state {
> > > > > + pins = "gpio9";
> > > > > + function = "normal";
> > > > > + input-enable;
> > > > > + bias-pull-up;
> > > > > + power-source = <0>;
> > > > > + };
> > > > > +};
> > > > > +
> > > > > &qupv3_id_0 {
> > > > > firmware-name = "qcom/qcs8300/qupv3fw.elf";
> > > > > status = "okay";
> > > > > @@ -690,3 +728,18 @@ &usb_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_l7c>;
> > > > > + vdda33-supply = <&vreg_l9a>;
> > > > > + status = "okay";
> > > > > +};
> > > >
> > > > I noticed that usb_2/hs doesn’t work properly unless refgen is
> > > > supplied. It may appear to work on your setup if another PHY or
> > > > subsystem enables refgen, either explicitly in software (e.g. DSI) or
> > > > indirectly, such as through DP, which might be voting for it behind
> > > > the scenes.
> > >
> > > Hi Loic,
> > >
> > > Are you facing issues with this patch set? or your patch set that was
> > > raised as below?
> >
> > Both. I'm basically running Debian with kernel mainline and your
> > series, booting from eMMC.
> > Usb seems to enumerate a boot time but is then unusable.
> >
> > # lsusb
> > Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
> > Bus 001 Device 002: ID 0781:5580 SanDisk Corp. SDCZ80 Flash Drive
> > # dd if=/dev/zero of=/dev/sda bs=1MB count=10
> > [ 225.248307] xhci-hcd xhci-hcd.0.auto: xHCI host not responding to
> > stop endpoint command
> > [ 225.290186] xhci-hcd xhci-hcd.0.auto: xHCI host controller not
> > responding, assume dead
> > [ 225.298385] xhci-hcd xhci-hcd.0.auto: HC died; cleaning up
> > [ 225.307748] usb 1-1: USB disconnect, device number 2
> >
> > It starts to work if I add the following in the monaco-evk devicetree:
> > &refgen{
> > regulator-always-on;
> > };
>
> Interesting. Could you please verify that PHY is not being reset or
> powered down at any point? Unlike the DSI, USB should be voting directly
> on the refgen.

I don't observe any reset being triggered, and the PHY registers
appear to be in a sane state.
While debugging the REFGEN registers, I can clearly see that manually
forcing the SW vote makes USB work immediately.
devmem2 0x891C080 w 0x1

I do not see any other votes asserted in the REFGEN registers, except
when connecting a DP sink. In that case, USB also starts working, and
I can see a corresponding vote appearing in register 0x891C064.

This suggests that either our assumption that the USB2 PHY is voting
is incorrect, or the driver is not putting the PHY into a state that
triggers the expected vote.


>
> >
> > # dd if=/dev/zero of=/dev/sda bs=1MB count=10
> > 10+0 records in
> > 10+0 records out
> > 10000000 bytes (10 MB, 9.5 MiB) copied, 0.7521 s, 13.3 MB/s
> > # No more USB errors...
> >
> > Regards,
> > Loic
>
> --
> With best wishes
> Dmitry