#asahi-dev · 2022-11-12 20:54
svener. wait.#asahi-dev · 2022-11-12 20:54
svenhuh, looks like I messed that one up then#asahi-dev · 2022-11-12 20:51
sveniirc the lane orientation for usb4 is configured somewhere inside ACIO or NHI#asahi-dev · 2022-11-12 20:49
svenhah!#asahi-dev · 2022-11-12 20:41
svenso maybe that UNK008 vs. UNK100 in that mode decides the orientation#asahi-dev · 2022-11-12 20:41
svenI don't think there's anything in atcphy that does that because for the four lane mode swap_lanes was always set to false#asahi-dev · 2022-11-12 20:40
svenokay#asahi-dev · 2022-11-12 20:40
svendoesn't the host then have to decide if it needs to route the lane to s0 or s3 depending on the orientation?#asahi-dev · 2022-11-12 20:36
svenChaosPrincess: uh, maybe I'm confused but how can usb-c be symmetric when it's in the DP altmode that uses all four lanes?#asahi-dev · 2022-11-12 20:33
svenand it's the only thing I can think of#asahi-dev · 2022-11-12 20:33
svenI don't think I paid close attention to trying both orientation when I was taking the original traces but I do remember being very confused there#asahi-dev · 2022-11-12 20:29
svenI assume you don't have serial output?#asahi-dev · 2022-11-12 20:28
svenuh oh :D#asahi-dev · 2022-11-12 20:27
svenjannau: so I wonder if UNK008 vs. UNK100 actually also changes if the plug orientation changes. i'll try to get some traces for that tomorrow#asahi-dev · 2022-11-12 20:26
svenfor that branch the only interesting parts are if the display comes up at all and if superspeed works reliably#asahi-dev · 2022-11-12 20:26
svenyeah, I think jannau has some patches somewhere to fix that iirc#asahi-dev · 2022-11-12 20:22
sven*UNK008#asahi-dev · 2022-11-12 20:22
svenI'll probably have to reverse engineer the kext to figure out what decides UNK100 vs. UNK009#asahi-dev · 2022-11-12 20:21
svendoesn't really matter, I put the value I got from traces from my mac mini but apparently they change depending on something else#asahi-dev · 2022-11-12 20:20
svennice!#asahi-dev · 2022-11-12 20:12
svenit has to be known long before it negotiates a link rate and outside of dcp #asahi-dev · 2022-11-12 20:11
svenah, right, I still need to figure out where exactly that thing comes from #asahi-dev · 2022-11-12 20:11
svendmesg should mention something about “new SuperSpeed device” and not “new high speed device”#asahi-dev · 2022-11-12 20:09
sventhe other interesting test is to see if usb3 works#asahi-dev · 2022-11-12 20:09
sventhis is still in the very early “if it breaks you get to keep the parts” stage ;)#asahi-dev · 2022-11-12 20:08
svenjannau’s branch also has some more fixes iirc#asahi-dev · 2022-11-12 20:08
svenI never tried anything in that branch outside of a tty fwiw#asahi-dev · 2022-11-12 20:01
svenuh, does it also show anything on the display?#asahi-dev · 2022-11-12 14:37
svenlooks like there isn’t a difference between how it handles tbt4 vs tbt3#asahi-dev · 2022-11-12 14:31
sven*matches #asahi-dev · 2022-11-12 14:31
svenexcept for the irq regs which are just completely different #asahi-dev · 2022-11-12 14:31
svenusually the start at least marches up #asahi-dev · 2022-11-12 14:24
sventhanks!#asahi-dev · 2022-11-12 13:52
svenfwiw, i'm essentially trying to get both the dwc3 role switch and the tipd changes ready to be sent upstream since they are useful on their own#asahi-dev · 2022-11-12 13:50
sveni know that there's e.g. a caldigit dock that has usb4 / thunderbolt 4#asahi-dev · 2022-11-12 13:49
sventhunderbolt 4 might be good enough, can you dump TPS_REG_STATUS (0x1a), TPS_REG_POWER_STATUS (0x3f), TPS_REG_INTEL_VID (0x59) and TPS_REG_DATA_STATUS (0x5f) of that tps chip after connecting it? #asahi-dev · 2022-11-12 13:07
svenmarcan: do you happen to have any USB4 device? (i.e. something that actually uses Enter_USB instead of Enter_Mode)#asahi-dev · 2022-11-12 11:27
svenah.. but not in this branch where i'm trying to split the tipd commit. nvm.#asahi-dev · 2022-11-12 11:26
svener, wait, i actually already fixed the interrupt thing. huh.#asahi-dev · 2022-11-12 11:25
svenand I guess running this under the HV with sync tracing makes everything even slower :D#asahi-dev · 2022-11-12 11:24
svendoesn't help that this all also happens over i2c I guess#asahi-dev · 2022-11-12 11:24
svenwhat happens is that the tipd irq handler (which also calls into atcphy's mux_set and dwc3's role switch) first does all its handling and only at the very end acks the interrupts#asahi-dev · 2022-11-12 11:23
svenlike, very fast. my adapter is very cheap and just putting a bit pressure on it can cause a very quick unplug/plug#asahi-dev · 2022-11-12 11:15
svenjannau: ugh. another race I just found: if you unplug/plug the type-c connector quickly enough the tps code essentially misses that it was changed at all. so please don't switch connectors too quickly when you test this :D#asahi-dev · 2022-11-12 11:09
svenlol#asahi-dev · 2022-11-12 10:45
svenhalf of the MMIO works and the other half doesn't. maybe I also need to actually boot this ACIO thing first to make e.g. pciec come up#asahi-dev · 2022-11-12 10:44
svenI'm not sure. I also need to poke some random register inside pmgr to make it even come up#asahi-dev · 2022-11-12 10:19
svenand ofc I still can't access the thunderbolt MMIO. I kinda hoped I would've fixed that by accident as well :(#asahi-dev · 2022-11-12 09:05
svensure, I’ll see if I manage to rebase on your branch later