
On Fri, Apr 28, 2023 at 8:32 AM Adam Ford aford173@gmail.com wrote:
On Fri, Apr 28, 2023 at 10:27 AM Tim Harvey tharvey@gateworks.com wrote:
On Fri, Apr 28, 2023 at 4:57 AM Adam Ford aford173@gmail.com wrote:
On Thu, Apr 27, 2023 at 5:25 PM Tim Harvey tharvey@gateworks.com wrote:
On Thu, Apr 27, 2023 at 12:49 PM Fabio Estevam festevam@gmail.com wrote:
On Thu, Apr 27, 2023 at 4:44 PM Tim Harvey tharvey@gateworks.com wrote:
Fabio,
Sorry for the confusion.
This imx8mm dt sync patch will hang on imx8mm boards that use 'both' usbotg1 and usbotg2. You can reproduce this hang on your imx8mm-evk by enabling usbotg2 in the dt (the board has it but it is not enabled due to the gpio based usb 3.0 mux not being sorted out yet): +&usbotg2 {
dr_mode = "otg";
status = "okay";
+};
u-boot=> usb start && usb tree starting USB... Bus usb@32e40000: Bus usb@32e50000: ^^^ imx8mm-evk hangs
Yes, I can reproduce the hang, but it happens with or without the imx8mm dt sync.
Fabio,
I do 'not' see a hang on imx8mm-evk on 'usb start && usb tree' on master (my other issue was on a 'usb stop' but only with usb controllers in host mode).
This hang is a separate issue, not dt related, as far as I understand.
The imx8mm dts sync does solve the issue of running 'ums' after CTRL+C.
I don't agree. The hang 'is' related because all my imx8mm-venice-* boards which use 'both' USB controllers hang with this patch on a 'usb start' and don't hang without it. While a basic 'review' of the patch looks good but actual product testing shows issues. As a maintainer for ARM FREESCALE IMX you must have another imx8mm board which uses both usbotg devices to test against and verify you see what I see?
Until we know what other fix is needed to go along with this: Nacked-by: Tim Harvey tharvey@gateworks.com
What is the harm is sync'ing the device tree with the kernel? I seemed like you found a solution with the regulator patch. Did I misunderstand that?
adam
Adam,
No, the regulator patch did 'not' resolve the issue created by syncing the imx8mm dt (I caused confusion by responding to the wrong thread - the regulator patch resolved a different issue).
Ok.
Could you please verify my results on a board that uses both usbotg1 and usbotg2? What I see is on master + this imx8mm dt sync (specifically the changes from Linux commit 4585c79ff477f ("arm64: dts: imx8mm: correct usb power domains")) the board hangs on usb start when bringing up usbotg2.
Adam,
Sorry to hear that :(
I can, but I am about to board a plane to go visit some sick family, but I'll try to do it early next week. I have a board with both USB controllers enabled. My OTG2 is host-only, so I think it's similar to your setup.
Yes I think that is similar enough to test. In my experience simply enabling otg2 via dt on imx8mm-evk shows the issue I see here but Fabio says he sees a hang on 'usb start' even before this dt sync and I don't know why my results on an imx8mm-evk differ.
Should I apply the regulator patch when I test?
No, don't apply that as this exposes another issue: Error enabling VBUS supply (ret=-114)
I'm still looking into that. I'm assuming when the regulaor refcnt support gets merged it may expose a lot of issues from unbalanced regulator enable/disable calls. The regulator refcnt series resolved the hang I see on 'usb stop' for boards where otg2 is in host mode (internal usb_hub device powers down the power domain before ehci_shutdown tries to access the registers to disable the ports).
Tim