linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Francesco Dolcini <francesco@dolcini.it>
To: Jun Li <jun.li@nxp.com>
Cc: Francesco Dolcini <francesco@dolcini.it>,
	Luca Ceresoli <luca.ceresoli@bootlin.com>,
	"devicetree@vger.kernel.org" <devicetree@vger.kernel.org>,
	"festevam@gmail.com" <festevam@gmail.com>,
	"gregkh@linuxfoundation.org" <gregkh@linuxfoundation.org>,
	"kernel@pengutronix.de" <kernel@pengutronix.de>,
	"linux-arm-kernel@lists.infradead.org" 
	<linux-arm-kernel@lists.infradead.org>,
	dl-linux-imx <linux-imx@nxp.com>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"linux-usb@vger.kernel.org" <linux-usb@vger.kernel.org>,
	"robh+dt@kernel.org" <robh+dt@kernel.org>,
	"s.hauer@pengutronix.de" <s.hauer@pengutronix.de>,
	"shawnguo@kernel.org" <shawnguo@kernel.org>,
	Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>,
	Francesco Dolcini <francesco.dolcini@toradex.com>,
	Xu Yang <xu.yang_2@nxp.com>
Subject: Re: [PATCH v2 2/3] usb: chipidea: imx: support disabling runtime-pm
Date: Mon, 8 May 2023 13:17:11 +0200	[thread overview]
Message-ID: <ZFjaNzY32x8o2XG7@francesco-nb.int.toradex.com> (raw)
In-Reply-To: <PA4PR04MB96405EE2468555EA900B340189739@PA4PR04MB9640.eurprd04.prod.outlook.com>

On Sat, May 06, 2023 at 09:02:39AM +0000, Jun Li wrote:
> > -----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:

Thanks Li Jun, I tested it with v6.3.1 kernel and it's all good.
I would be happy to test the patch as soon as you send it.


With that said I had another issue that I assume is unrelated.
In addition to the USB Host port, we have an additional OTG one. This
interface has the same circuit WRT to the VBUS, however in this case
it's possible to read the VBUS using extcon, e.g. a standard GPIO input.

With that setup, while doing a role switch, I had a couple of time this
error:

[  187.310421] ci_hdrc ci_hdrc.0: USB bus 2 deregistered
[  192.351452] ci_hdrc ci_hdrc.0: timeout waiting for 00000800 in OTGSC

that was recovered only doing an additional transition.

More complete logs here:

[  184.997619] usb 2-1: USB disconnect, device number 9
[  185.019620] ci_hdrc ci_hdrc.0: remove, state 1
[  185.024271] usb usb2: USB disconnect, device number 1
[  185.334975] ci_hdrc ci_hdrc.0: USB bus 2 deregistered
[  185.353857] ci_hdrc ci_hdrc.0: EHCI Host Controller
[  185.389670] ci_hdrc ci_hdrc.0: new USB bus registered, assigned bus number 2
[  185.470170] ci_hdrc ci_hdrc.0: USB 2.0 started, EHCI 1.00
[  185.476097] usb usb2: New USB device found, idVendor=1d6b, idProduct=0002, bcdDevice= 6.01
[  185.484527] usb usb2: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[  185.491811] usb usb2: Product: EHCI Host Controller
[  185.496704] usb usb2: Manufacturer: Linux 6.1.22-6.2.0+git.3b29299e5f60 ehci_hcd
[  185.504148] usb usb2: SerialNumber: ci_hdrc.0
[  185.531121] hub 2-0:1.0: USB hub found
[  185.542636] hub 2-0:1.0: 1 port detected
[  185.556586] mxs_phy 20c9000.usbphy: vbus is not valid
[  187.271684] ci_hdrc ci_hdrc.0: remove, state 4
[  187.276281] usb usb2: USB disconnect, device number 1
[  187.310421] ci_hdrc ci_hdrc.0: USB bus 2 deregistered
[  192.351452] ci_hdrc ci_hdrc.0: timeout waiting for 00000800 in OTGSC


> 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 = {

Francesco


  reply	other threads:[~2023-05-08 11:17 UTC|newest]

Thread overview: 37+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-07-14 15:18 [PATCH v2 1/3] dt-bindings: usb: ci-hdrc-usb2: add property disable-runtime-pm Philippe Schenker
2020-07-14 15:18 ` [PATCH v2 2/3] usb: chipidea: imx: support disabling runtime-pm Philippe Schenker
2020-07-15  0:51   ` Peter Chen
2020-07-15 10:23     ` Philippe Schenker
2020-07-20  3:44       ` Peter Chen
2020-07-20  7:51         ` Philippe Schenker
2020-07-20  8:06           ` Peter Chen
2020-07-20 10:10             ` Philippe Schenker
2023-05-04 16:23               ` Luca Ceresoli
2023-05-04 16:50                 ` Francesco Dolcini
2023-05-05  9:23                   ` Luca Ceresoli
2023-05-05 10:58                     ` Francesco Dolcini
2023-05-05  9:49                   ` Jun Li
2023-05-05 10:06                     ` Luca Ceresoli
2023-05-05 11:00                       ` Francesco Dolcini
2023-05-06  9:02                         ` Jun Li
2023-05-08 11:17                           ` Francesco Dolcini [this message]
2023-05-08 11:53                             ` Jun Li
2023-05-08 14:35                               ` Francesco Dolcini
2023-05-08 13:17                             ` Luca Ceresoli
2023-05-29 10:18                               ` Luca Ceresoli
2023-05-30 11:22                                 ` Jun Li
2023-07-06 10:23                                   ` Francesco Dolcini
2023-07-17 16:45                                     ` Luca Ceresoli
2023-07-18  8:14                                       ` Francesco Dolcini
2023-07-18  8:31                                       ` [EXT] " Xu Yang
2023-07-18 12:25                                         ` Luca Ceresoli
2023-07-19 11:23                                           ` Xu Yang
2023-07-19 16:48                                             ` Luca Ceresoli
2023-07-20 10:13                                               ` Xu Yang
2023-07-20 12:49                                                 ` Luca Ceresoli
2023-07-21  2:06                                                   ` Xu Yang
     [not found]                                                     ` <20230721232750.0aea6e0f@booty>
     [not found]                                                       ` <DB7PR04MB450517AD9F25F47320835A5B8C03A@DB7PR04MB4505.eurprd04.prod.outlook.com>
     [not found]                                                         ` <20230929153748.63620770@booty>
2023-10-10 10:52                                                           ` Xu Yang
2020-07-14 15:18 ` [PATCH v2 3/3] ARM: dts: colibri-imx6ull: disable runtime pm Philippe Schenker
2020-07-16 19:24 ` [PATCH v2 1/3] dt-bindings: usb: ci-hdrc-usb2: add property disable-runtime-pm Rob Herring
2020-07-17  2:31   ` Peter Chen
2020-07-17 14:14     ` Rob Herring

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=ZFjaNzY32x8o2XG7@francesco-nb.int.toradex.com \
    --to=francesco@dolcini.it \
    --cc=devicetree@vger.kernel.org \
    --cc=festevam@gmail.com \
    --cc=francesco.dolcini@toradex.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=jun.li@nxp.com \
    --cc=kernel@pengutronix.de \
    --cc=krzysztof.kozlowski@linaro.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-imx@nxp.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=luca.ceresoli@bootlin.com \
    --cc=robh+dt@kernel.org \
    --cc=s.hauer@pengutronix.de \
    --cc=shawnguo@kernel.org \
    --cc=xu.yang_2@nxp.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).