#
✕ nick:sven
#asahi-dev · 2022-11-06 20:19
svenI thought it just depended on 2 lane vs 4 lane but I guess I was just confused by the traces :/
#asahi-dev · 2022-11-06 20:18
sventhat’s set long before DCP even figure out the link rate
#asahi-dev · 2022-11-06 20:18
svenI wonder where it comes from then
#asahi-dev · 2022-11-06 20:16
svenhuh, interesting
#asahi-dev · 2022-11-06 16:49
svenhuh, that never happened to me
#asahi-dev · 2022-11-06 16:43
svenI’ve abused mine a lot and the worst I had to do was a reboot
#asahi-dev · 2022-11-06 16:43
sventhat’s possible?!
#asahi-dev · 2022-11-06 16:18
svenand yet the device comes up at high speed :/
#asahi-dev · 2022-11-06 16:18
svenfirst atcphy is initialized and then dwc3 comes up and eventually switches the pipehandler thing to the SS PHY
#asahi-dev · 2022-11-06 16:18
svenhrm, so something's clearly weird. at first boot it looks like everything happens in the right order in the tracer
#asahi-dev · 2022-11-06 16:14
sveni.e. no usb3/dp hub?
#asahi-dev · 2022-11-06 16:14
sventhis is with a usb3 device directly connected to the port?
#asahi-dev · 2022-11-06 16:13
svenhrm, i can't reproduce that one at all
#asahi-dev · 2022-11-06 16:08
svenhrm, just managed to reproduce the "first connect is high-speed only" again :/
#asahi-dev · 2022-11-06 16:04
sven*and
#asahi-dev · 2022-11-06 16:04
svenweird. unless i'm missing something it should defer initializing dwc3 until it gets the first role-switch notification. and at that point the SS PHY should be up an running
#asahi-dev · 2022-11-06 16:01
svenseemed to be reliable here
#asahi-dev · 2022-11-06 16:01
svenhuh :/
#asahi-dev · 2022-11-06 15:42
svenjannau: just pushed something that fixes the "no usb3 on first connection after boot" for me
#asahi-dev · 2022-11-06 15:11
svenit sometimes uses pclk2 there
#asahi-dev · 2022-11-06 15:10
svenI know that the crossbar is also different on t6k iirc
#asahi-dev · 2022-11-06 15:10
svenpretty much everything that doesn’t have a #define is something hardcoded that has to be tracked down
#asahi-dev · 2022-11-06 15:09
svenI hardcoded the values I saw in my traces for now
#asahi-dev · 2022-11-06 15:09
svennot sure :(
#asahi-dev · 2022-11-06 13:22
svenneeds a fix in the role switch reset quirk code to just not bring dwc3 up initially
#asahi-dev · 2022-11-06 13:22
svenI think the issue is that dwc3 is already up and then atcphy goes behind its back and brings up the SS PHY
#asahi-dev · 2022-11-06 13:21
svenoh, i think I actually know about that one
#asahi-dev · 2022-11-06 13:18
svendid I also break the orientation switching code? :D
#asahi-dev · 2022-11-06 13:17
svenuh oh
#asahi-dev · 2022-11-06 13:16
svenI think that's guaranteed with the current code though
#asahi-dev · 2022-11-06 13:16
svenessentially all that matters is that first the mux_set code does its stuff and only then dwc3 comes up and switches pipehandler over to usb3
#asahi-dev · 2022-11-06 13:15
sven:/
#asahi-dev · 2022-11-06 13:09
sventhat graph connection also needs to go the actual connector and not to the root display-subsystem
#asahi-dev · 2022-11-06 13:09
svenyeah, i didn't touch atcphy0 at all because so far i've always been running under the hv
#asahi-dev · 2022-11-06 13:07
svendid you add the lpdptx reg to the phy node?
#asahi-dev · 2022-11-06 13:00
sven*following two lines actually
#asahi-dev · 2022-11-06 13:00
svenmaybe try removing writel(0x10000cef, atcphy->regs.core + 0x8); and the following three lines. they're just copied from a hv trace and might not be required at all
#asahi-dev · 2022-11-06 12:59
svenbut maybe I broke it on t6001 while adding DP support
#asahi-dev · 2022-11-06 12:58
svenhm... iirc USB3 used to work
#asahi-dev · 2022-11-06 12:52
svenmaybe yet another race somewhere
#asahi-dev · 2022-11-06 12:52
sveni was quite surprised as well, but somehow it made a difference
#asahi-dev · 2022-11-06 12:47
sven(without any mode)
#asahi-dev · 2022-11-06 12:47
svenmy slightly-less-cursed dell display sometimes just needs a modetest -M apple
#asahi-dev · 2022-11-06 12:46
sveni later matched it up with xnu debug prints and the first one was BOTH_PMA and the second one SINGLE_PMA iirc
#asahi-dev · 2022-11-06 12:46
svenmacos does two writes to it though iirc
#asahi-dev · 2022-11-06 12:46
svenyeah, that comes from when I was confused
#asahi-dev · 2022-11-06 12:44
svenlet me actually check that entire SINGLE_PMA/BOTH_PMA again. i remember being confused by that when tracing macos
#asahi-dev · 2022-11-06 12:42
sven:D
#asahi-dev · 2022-11-06 12:42
sven12:07:25 <sven> Also wouldn’t surprise me if this is just some [bit] somewhere I got wrong
#asahi-dev · 2022-11-06 12:41
svenyup, ACIOPHY_CROSSBAR_DP_BOTH_PMA should be BIT(17)

plus ›