Elektrine lite

← Feed

@sven@social.treehouse.systems

2026-01-07 17:16 UTC

Debugging some #asahilinux USB issues with @janne and right now it looks like ATCPHY is even more cursed than we thought: At boot time, macOS powers up the usb2 PHY once, switches it to host mode and immediately shuts it down again even when no device is connected. I missed this so far but it looks like we actually need this if we want usb2 devices plugged in during boot to work reliably 🙃

Replies (5)

  • And the (likely) real fixes: https://lore.kernel.org/asahi/20260108-atcphy-coldboot-fix-v1-1-01c41c6e84f2@kernel.org/T/#u and https://lore.kernel.org/asahi/20260108-dwc3-apple-usb2phy-fix-v1-1-5dd7bc642040@kernel.org/T/#u macOS briefly bringing up dwc3 and tearing it down again with no device connected was just a red herring, no idea why that happens.

    Open ##1548893

  • @bakkus@bitbang.social 2026-01-07 17:21

    @sven @janne whu... why? what's gained by such a sequence? If anything?

    Open ##1548896

  • @sven @janne USB2 is kind of a massive thorn in the side of Type-C handling tbf >_< On Qualcomm SoCs we have a fun issue: the USB2 PHY derives its clock from the USB3 PIPE clock, and the QMPPHY driver currently turns PIPE off when you go into 4-lane alt mode, so using 4-lane DP breaks USB2 on that port until full reboot :D (and just Not Turning it Off only fixes hotplugged devices, I'm gonna try modeling the clk relationship properly) But hey, at least that's literally our only issue and we don't ever have to reset anything :P

    Open ##1548898

  • @gameshack_@infosec.exchange 2026-01-07 18:06

    @sven @janne i'd love to ask whoever came up with this... why.

    Open ##1548899

  • @sven still wondering why it even helps if we might just chasing the “ghost” of initializing the usb controllers in device mode in our m1n1 test setup. that needs of work as well

    Open ##1548901