#asahi · 2021-06-05 23:23
sveni've only seen "panic(cpu 0 caller 0xfffffe0014c6f0f8): "ApplePMGR: virtual void ApplePMGR::initDriver(IOService *):1557 REQUIRE failed: id != kIDReserved" no matter what i do :(#asahi · 2021-06-05 22:18
sveni just can't figure what yet#asahi · 2021-06-05 22:18
svenyeah, i'm 99% sure this is me doing something incredibly dumb#asahi · 2021-06-05 22:17
sveni always hit "panic(cpu 0 caller 0xfffffe0014c6f0f8): "ApplePMGR: virtual void ApplePMGR::initDriver(IOService *):1557 REQUIRE failed: id != kIDReserved"#asahi · 2021-06-05 22:17
svenlet me know if you get it work#asahi · 2021-06-05 20:49
svenEmantor: thanks!#asahi · 2021-06-05 19:43
svensure, i believe marcan also has a pa semi datasheet he got by asking the guy who wrote the linux driver. but either way, to sniff i2c traffic all you should need are the two fifo registers#asahi · 2021-06-05 19:31
sveni doubt they matter to sniff the traffic though#asahi · 2021-06-05 19:30
sventhey might be related to interrupts#asahi · 2021-06-05 19:30
svenno, but there's a decent change you can ignore them#asahi · 2021-06-05 19:05
svenstrange. might make sense to write something that sniffs i2c traffic#asahi · 2021-06-05 19:00
svenand i think it's only those usb pd chips on i2c0#asahi · 2021-06-05 19:00
svenhuh, weird. i wouldn't expect much traffic to go through the i2c chip#asahi · 2021-06-05 18:55
sventhe other alternative i can think of would be to specify if the interrupt triggers on hi/low edge/level#asahi · 2021-06-05 18:51
sventhat should give away if it's using the USB PD chip#asahi · 2021-06-05 18:51
svenyou can sniff i2c traffic if you want#asahi · 2021-06-05 10:33
svenmaybe they just do a phy reinit everytime the usb-pd chips triggers an irq :/#asahi · 2021-06-05 10:33
svenpossibly, yes#asahi · 2021-06-05 10:32
svennotice how it just goes off to write to the phy regs after you connect again? it's probably some other interrupt#asahi · 2021-06-05 10:31
sventhanks!#asahi · 2021-06-05 10:20
svenjannau: could you do another trace where you also connect the device again in the end?#asahi · 2021-06-05 09:57
svenso i suspect they just rerouted some irq reasons to 858#asahi · 2021-06-05 09:57
svenand xhci and dwc3 support multiple irqs#asahi · 2021-06-05 09:57
svenlinux only uses 857 but the dwc3 datasheet i read mentioned something about irq mapping#asahi · 2021-06-05 09:56
svenhm... i think the xhci actually gets a usb disconnect event even in linux#asahi · 2021-06-05 09:55
svenand yeah, it only seems to use 857 and 858#asahi · 2021-06-05 09:54
svennice, thanks!#asahi · 2021-06-05 09:28
sveni can hack the reconnect to work already. just need to check read32(0x502a90008) & 0x0100000 and then do set32(0x502a90004, 3); clear32(0x502a90004, 3)#asahi · 2021-06-05 09:23
sventhe 816 is especially weird there ;)#asahi · 2021-06-05 09:23
sventhe interesting ones for the usb port would be 857,858,859,860 and 816#asahi · 2021-06-05 09:23
svenyeah, that's what i expected#asahi · 2021-06-05 09:06
sveni'll try to get my setup working in the meantime#asahi · 2021-06-05 09:06
svenjannau: ^-- wanna give that a try? :>#asahi · 2021-06-05 09:05
svenbut worth a try#asahi · 2021-06-05 09:04
svenhm. that might be slow though#asahi · 2021-06-05 09:04
svenduh#asahi · 2021-06-05 09:04
svenohhh#asahi · 2021-06-05 09:04
svendo all interrupts go through the hv right now?#asahi · 2021-06-05 09:03
sveni really need to fix my setup and get that thing working *sigh*#asahi · 2021-06-05 09:03
svenso... can we somehow virtualize AIC to also get all interrupts in the mmiotrace? :>#asahi · 2021-06-04 23:16
svenanyway, bedtime for me. 'night!#asahi · 2021-06-04 23:14
sveni bet those two bits are some kind of phy reset crap#asahi · 2021-06-04 23:14
svenso set 0b11 and then clear 0b11 in 0x502a90004 makes the dwc3 controller see a USBRst event#asahi · 2021-06-04 23:14
svenah, the read is actually not required#asahi · 2021-06-04 23:11
svennow we just need to find the irq that fires when something's disconnected#asahi · 2021-06-04 23:11
svenso that fixes it#asahi · 2021-06-04 23:11
sven>>> clear32(0x502a90004, 3)#asahi · 2021-06-04 23:11
sven>>> read32(0x502a9001c)#asahi · 2021-06-04 23:11
svenTTY> *usb-dwc3@502280000: device event: USBRst (0x01)#asahi · 2021-06-04 23:11
sven>>> set32(0x502a90004, 3)