RE: [PATCH v2 2/3] usb: chipidea: imx: support disabling runtime-pm

Jun Li
2023-05-06T09:03:23Z

> -----Original Message-----
> From: Francesco Dolcini <francesco@dolcini.it>
> Sent: Friday, May 5, 2023 7:00 PM
> To: Luca Ceresoli <luca.ceresoli@bootlin.com>; Jun Li <jun.li@nxp.com>
> Cc: Francesco Dolcini <francesco@dolcini.it>; devicetree@vger.kernel.org;
> festevam@gmail.com; gregkh@linuxfoundation.org; kernel@pengutronix.de;
> linux-arm-kernel@lists.infradead.org; dl-linux-imx <linux-imx@nxp.com>;
> linux-kernel@vger.kernel.org; linux-usb@vger.kernel.org;
> peter.chen@nxp.com; robh+dt@kernel.org; s.hauer@pengutronix.de;
> shawnguo@kernel.org; Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>;
> Francesco Dolcini <francesco.dolcini@toradex.com>
> Subject: Re: [PATCH v2 2/3] usb: chipidea: imx: support disabling runtime-pm
>
> On Fri, May 05, 2023 at 12:06:18PM +0200, Luca Ceresoli wrote:
> > On Fri, 5 May 2023 09:49:16 +0000
> > Jun Li <jun.li@nxp.com> wrote:
> > > Is your board design similar like Francesco's as below?
> >
> > Possibly, but I'm afraid I can't say: I am using the Toradex Colibri
> > i.MX6ULL SoM, whose schematics are not public.
>
> I can confirm that it's the same.

Thanks Francesco for the confirmation, had a check with design team,
there is no status bit which can be used to judge the VDD_USB_CAP is
powered or not, so we have to add a board level dts property to tell
this usb phy driver to bypass MXS_PHY_DISCONNECT_LINE_WITHOUT_VBUS.

Before send a formal patch, I want to confirm this should work for your
HW design, like below simple hack:

diff --git a/drivers/usb/phy/phy-mxs-usb.c b/drivers/usb/phy/phy-mxs-usb.c
index e1a2b2ea098b..ec5ee790455e 100644
--- a/drivers/usb/phy/phy-mxs-usb.c
+++ b/drivers/usb/phy/phy-mxs-usb.c
@@ -178,7 +178,6 @@ static const struct mxs_phy_data imx6sx_phy_data = {
};

static const struct mxs_phy_data imx6ul_phy_data = {
- .flags = MXS_PHY_DISCONNECT_LINE_WITHOUT_VBUS,
};

static const struct mxs_phy_data imx7ulp_phy_data = {

Thanks
Li Jun

>
> Francesco