From: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
To: "Macpaul Lin" <macpaul.lin@mediatek.com>,
"Nícolas F. R. A. Prado" <nfraprado@collabora.com>,
"Chunfeng Yun" <chunfeng.yun@mediatek.com>
Cc: Matthias Brugger <matthias.bgg@gmail.com>,
devicetree@vger.kernel.org, linux-kernel@vger.kernel.org,
linux-arm-kernel@lists.infradead.org,
linux-mediatek@lists.infradead.org, kernel@collabora.com,
Chen-Yu Tsai <wenst@chromium.org>,
Bear Wang <bear.wang@mediatek.com>,
Pablo Sun <pablo.sun@mediatek.com>
Subject: Re: Probe failure of usb controller @11290000 on MT8195 after next-20231221
Date: Thu, 11 Jul 2024 11:21:14 +0200 [thread overview]
Message-ID: <2dba1638-f155-463b-8f87-421101b8f4f2@collabora.com> (raw)
In-Reply-To: <da27d957-866f-f055-9e83-cdc362d98dc7@mediatek.com>
Il 11/07/24 06:13, Macpaul Lin ha scritto:
>
>
> On 7/11/24 03:15, Nícolas F. R. A. Prado wrote:
>> On Fri, Jan 19, 2024 at 10:12:07AM +0100, AngeloGioacchino Del Regno wrote:
>>> Il 18/01/24 19:36, Nícolas F. R. A. Prado ha scritto:
>>>> Hi,
>>>>
>>>> KernelCI has identified a failure in the probe of one of the USB controllers on
>>>> the MT8195-Tomato Chromebook [1]:
>>>>
>>>> [ 16.336840] xhci-mtk 11290000.usb: uwk - reg:0x400, version:104
>>>> [ 16.337081] xhci-mtk 11290000.usb: xHCI Host Controller
>>>> [ 16.337093] xhci-mtk 11290000.usb: new USB bus registered, assigned bus
>>>> number 5
>>>> [ 16.357114] xhci-mtk 11290000.usb: clocks are not stable (0x1003d0f)
>>>> [ 16.357119] xhci-mtk 11290000.usb: can't setup: -110
>>>> [ 16.357128] xhci-mtk 11290000.usb: USB bus 5 deregistered
>>>> [ 16.359484] xhci-mtk: probe of 11290000.usb failed with error -110
>>>>
>>>> A previous message [2] suggests that a force-mode phy property that has been
>>>> merged might help with addressing the issue, however it's not clear to me how,
>>>> given that the controller at 1129000 uses a USB2 phy and the phy driver patch
>>>> only looks for the property on USB3 phys.
>>>>
>>>> Worth noting that the issue doesn't always happen. For instance the test did
>>>> pass for next-20240110 and then failed again on today's next [3]. But it does
>>>> seem that the issue was introduced, or at least became much more likely, between
>>>> next-20231221 and next-20240103, given that it never happened out of 10 runs
>>>> before, and after that has happened 5 out of 7 times.
>>>>
>>>> Note: On the Tomato Chromebook specifically this USB controller is not connected
>>>> to anything.
>>>>
>>>> [1]
>>>> https://urldefense.com/v3/__https://linux.kernelci.org/test/case/id/659ce3506673076a8c52a428/__;!!CTRNKA9wMg0ARbw!jtg5drII8WUPwTiL4sWZiSRPXN-EBN8ctTGI85sirqvkmaUbA5z-wrLqPPfxlZZkQ7NItOWDT97OSdENT5oGHKY$
>>>> [2] https://lore.kernel.org/all/239def9b-437b-9211-7844-af4332651df0@mediatek.com/
>>>> [3]
>>>> https://urldefense.com/v3/__https://linux.kernelci.org/test/case/id/65a8c66ee89acb56ac52a405/__;!!CTRNKA9wMg0ARbw!jtg5drII8WUPwTiL4sWZiSRPXN-EBN8ctTGI85sirqvkmaUbA5z-wrLqPPfxlZZkQ7NItOWDT97OSdENi-d0sVc$
>>>>
>>>> Thanks,
>>>> Nícolas
>>>
>>> Hey Nícolas,
>>>
>>> I wonder if this is happening because of async probe... I have seen those happening
>>> once in a (long) while on MT8186 as well with the same kind of flakiness and I am
>>> not even able to reproduce anymore.
>>>
>>> For MT8195 Tomato, I guess we can simply disable that controller without any side
>>> effects but, at the same time, I'm not sure that this would be the right thing to
>>> do in this case.
>>>
>>> Besides, the controller at 11290000 is the only one that doesn't live behind MTU3,
>>> but I don't know if that can ring any bell....
>>
>> An update on this issue: it looks like it only happens if "xhci-mtk
>> 11290000.usb" probes before "mtk-pcie-gen3 112f8000.pcie". What they have in
>> common is that both of those nodes use phys that share the same t-phy block:
>> pcie uses the usb3 phy while xhci uses the usb2 phy. So it seems that some of
>> the initialization done by the pcie controller might be implicitly needed by the
>> usb controller.
>>
>> This should help to narrow down the issue and find a proper fix for it.
>>
>> Thanks,
>> Nícolas
>
> 'force-mode' should only applied to the boards which require XHCI function instead
> of a PCIE port.
>
> For example, mt8395-genio-1200-evk.dts requires property 'force-mode' to fix probe
> issue for USBC @11290000.
>
> https://git.kernel.org/pub/scm/linux/kernel/git/mediatek/linux.git/commit/?h=v6.10-next/dts64&id=666e6f39faff05fe12bfc64c64aa9015135ce783
>
> 'force-mode' should be no need for tomato boards and the behavior should be the
> same as before.
>
> Another possibility is the firmware change on tomato boards. I'm not sure if there
> is any changes on tomato's recent firmware for tphy of this port, which could also
> be a reason causes this kind of failure.
> I don't have tomato boards on hand.
>
Hello Macpaul,
it's just about the usb node missing a power domain: as the PCIE_MAC_P1 domain
seems to be shared between USB and PCIe, adding it to the USB node fixes the
setup phase.
I'll send a devicetree fix soon.
Cheers,
Angelo
> Thanks
> Macpaul Lin
next prev parent reply other threads:[~2024-07-11 9:21 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-01-18 18:36 Probe failure of usb controller @11290000 on MT8195 after next-20231221 Nícolas F. R. A. Prado
2024-01-19 9:12 ` AngeloGioacchino Del Regno
2024-07-10 19:15 ` Nícolas F. R. A. Prado
2024-07-11 4:13 ` Macpaul Lin
2024-07-11 9:21 ` AngeloGioacchino Del Regno [this message]
2024-07-11 16:33 ` Nícolas F. R. A. Prado
2024-07-12 8:12 ` AngeloGioacchino Del Regno
2024-07-12 15:58 ` Nícolas F. R. A. Prado
2024-07-15 12:04 ` AngeloGioacchino Del Regno
2024-07-15 14:00 ` Nícolas F. R. A. Prado
2024-07-22 14:53 ` Nícolas F. R. A. Prado
2024-07-11 9:14 ` AngeloGioacchino Del Regno
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=2dba1638-f155-463b-8f87-421101b8f4f2@collabora.com \
--to=angelogioacchino.delregno@collabora.com \
--cc=bear.wang@mediatek.com \
--cc=chunfeng.yun@mediatek.com \
--cc=devicetree@vger.kernel.org \
--cc=kernel@collabora.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mediatek@lists.infradead.org \
--cc=macpaul.lin@mediatek.com \
--cc=matthias.bgg@gmail.com \
--cc=nfraprado@collabora.com \
--cc=pablo.sun@mediatek.com \
--cc=wenst@chromium.org \
/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