From: Sascha Hauer <sha@pengutronix.de>
To: Ahmad Fatoum <ahmad@a3f.at>
Cc: barebox@lists.infradead.org, mgr@pengutronix.de
Subject: Re: [PATCH 1/2] fixup! usb: dwc2: Add support for optional usb phy
Date: Wed, 6 Jan 2021 11:05:43 +0100 [thread overview]
Message-ID: <20210106100543.GO19063@pengutronix.de> (raw)
In-Reply-To: <20201221003251.83042-2-ahmad@a3f.at>
On Mon, Dec 21, 2020 at 01:32:50AM +0100, Ahmad Fatoum wrote:
> Linux doesn't seem to enforce a fixed order between phy_init and
> phy_power_on. The Linux dwc2 driver does power_on and then phy_init,
> which is the inverse of what barebox is currently doing.
>
> The PHYs normally used with dwc2 are written with this in mind.
> For example, our stm32-usbphyc driver fails to disable:
>
> ERROR: stm32-usbphyc 5a006000.usbphyc@5a006000.of: PLL not reset
> ERROR: phy1: phy exit failed --> -5
>
> Because Linux does exit -> power_off, but barebox does power_off ->
> exit.
>
> Issue was raised upstream:
> https://lore.kernel.org/lkml/6cd01e79-fdc0-3bd4-32b5-a85142533f8a@pengutronix.de/T/#t
>
> Until this is settled, swap the order to follow what Linux does.
> This is suboptimal, because it means controller drivers have different
> order of the operations and that you can't combine arbitrary PHYs and
> controllers, but it seems unlikely we will support combinations that
> aren't supported by Linux in the first place anyway.
This is valuable information and I don't want it to be lost, so instead
of applying this as a fixup I rewrote the subject to:
usb: dwc2: swap order of phy_init and phy_power_on to what Linux does
and applied it as a separate patch.
Sascha
--
Pengutronix e.K. | |
Steuerwalder Str. 21 | http://www.pengutronix.de/ |
31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
next prev parent reply other threads:[~2021-01-06 10:05 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-12-21 0:32 [PATCH 0/2] usb: dwc2: gadget: fix stm32mp1 hang on barebox shutdown Ahmad Fatoum
2020-12-21 0:32 ` [PATCH 1/2] fixup! usb: dwc2: Add support for optional usb phy Ahmad Fatoum
2021-01-06 10:05 ` Sascha Hauer [this message]
2022-03-21 22:17 ` Michael Grzeschik
2022-03-22 5:35 ` Ahmad Fatoum
2022-03-22 8:19 ` Michael Grzeschik
2022-03-22 8:25 ` Ahmad Fatoum
2022-03-22 8:29 ` Michael Grzeschik
2022-03-22 9:23 ` Jules Maselbas
2020-12-21 0:32 ` [PATCH 2/2] regulator: stm32-pwr: don't propagate regulator turn-off to supply Ahmad Fatoum
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=20210106100543.GO19063@pengutronix.de \
--to=sha@pengutronix.de \
--cc=ahmad@a3f.at \
--cc=barebox@lists.infradead.org \
--cc=mgr@pengutronix.de \
/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