#asahi-dev · 2021-12-10 07:34
marcanstill broken though#asahi-dev · 2021-12-10 07:33
marcanlooks like it's 120 on all the m1 devices then#asahi-dev · 2021-12-10 07:33
marcanindeed, it's 120 on the m1 air too#asahi-dev · 2021-12-10 07:33
marcan User: /device-tree/arm-io/spi3.clk[0]#asahi-dev · 2021-12-10 07:33
marcan#123: 120000000 2 0xa0/0x23b040100: regval: 0x85100000#asahi-dev · 2021-12-10 07:29
marcanyou could also just trace, like, all pins in groups of 32 (the analyzer supports up to 32)#asahi-dev · 2021-12-10 07:28
marcanthat found me the two disjointed pins#asahi-dev · 2021-12-10 07:28
marcanthe CS pin is specified in the ADT, I guessed it was nearby pins. that worked for spi3 but not spi1, for spi1 I spammed the RegMonitor during a SPI transaction until I saw something change#asahi-dev · 2021-12-10 07:28
marcanlet's look at pmgr#asahi-dev · 2021-12-10 07:28
marcanok, at least it's badly broken on the m1air, much more than the pro#asahi-dev · 2021-12-10 07:25
marcan(some call it RLE)#asahi-dev · 2021-12-10 07:25
marcanit's a real logic analyzer with proper delta compression ;)#asahi-dev · 2021-12-10 07:24
marcanjust capture it and eyeball it in gtkwave by selecting a range of cycles#asahi-dev · 2021-12-10 07:24
marcansure, it's timed#asahi-dev · 2021-12-10 07:21
marcanlet me try the m1 air...#asahi-dev · 2021-12-10 07:21
marcanwhich is bound to cause some issues :-)#asahi-dev · 2021-12-10 07:21
marcanyes, and if your clock provider is claiming the controller is clocked at 24 when it's actually at 120, then you're driving the device at 10MHz instead of 2MHz#asahi-dev · 2021-12-10 07:20
marcanyes#asahi-dev · 2021-12-10 07:20
marcanbut the clock being 5x faster by accident on j293 would explain why it's breaking for people#asahi-dev · 2021-12-10 07:19
marcanthe base clock comes from the clock provider#asahi-dev · 2021-12-10 07:19
marcanthat's a max, not the base clock#asahi-dev · 2021-12-10 07:19
marcanspi-max-frequency is something else, isn't it?#asahi-dev · 2021-12-10 07:19
marcannow the question is is it 120 on the air too...#asahi-dev · 2021-12-10 07:19
marcanbut my point is the spi driver should be computing its divider based on this information#asahi-dev · 2021-12-10 07:19
marcanfor spi3 we have either 24 or 120 apparently?#asahi-dev · 2021-12-10 07:18
marcan200MHz is only used for spi1 as far as I can tell#asahi-dev · 2021-12-10 07:14
marcanmaybe they actually forgot to initialize that clock in iBoot (but it works anyway because the spi driver does the right thing wrt divider)#asahi-dev · 2021-12-10 07:12
marcanalso it feels really weird that #5 is 120 for spi2/3/4 but not spi1#asahi-dev · 2021-12-10 07:12
marcanI wonder if this is actually an oversight...#asahi-dev · 2021-12-10 07:12
marcanso the *unused* spis on the mac mini get set to 120MHz, heh#asahi-dev · 2021-12-10 07:12
marcan#124: 120000000 2 0xa0/0x23b040104: regval: 0x85100000#asahi-dev · 2021-12-10 07:12
marcan#123: 120000000 2 0xa0/0x23b040100: regval: 0x85100000#asahi-dev · 2021-12-10 07:12
marcan#122: 120000000 2 0xa0/0x23b0400fc: regval: 0x85100000#asahi-dev · 2021-12-10 07:12
marcan User: /device-tree/arm-io/spi1.clk[0]#asahi-dev · 2021-12-10 07:12
marcan#121: 200000000 2 0xa0/0x23b0400f8: regval: 0x85100000#asahi-dev · 2021-12-10 07:12
marcanoh wait#asahi-dev · 2021-12-10 07:11
marcaninteresting, so clock #5 is not the same frequency for those SPIs#asahi-dev · 2021-12-10 07:10
marcanwhat does spi1 say on that machine?#asahi-dev · 2021-12-10 07:09
marcanspi3 is 24MHz on pro/max, and is unused on mini of course#asahi-dev · 2021-12-10 07:09
marcanthat's interesting, I wonder why that is#asahi-dev · 2021-12-10 07:09
marcanspi1 is 200MHz for spi1 on at least the mini and pro/max#asahi-dev · 2021-12-10 07:08
marcankettenis: can you paste that pmgr dump somewhere?#asahi-dev · 2021-12-10 07:07
marcanI don't have a pmgr dump for j293 handy#asahi-dev · 2021-12-10 07:07
marcanI see 24MHz on pro/max models#asahi-dev · 2021-12-10 07:06
marcanhuh, really?#asahi-dev · 2021-12-10 07:06
marcankettenis: no, 200MHz is for spinor#asahi-dev · 2021-12-10 06:55
marcankettenis: ADT tells us (see dump_pmgr.py)#asahi-dev · 2021-12-10 06:44
marcanbut even tracing spi after the error happens doesn't fix it#asahi-dev · 2021-12-10 06:42
marcanwhich is weird, being the same device...#asahi-dev · 2021-12-10 06:42
marcankeyboard does work though