#
✕ nick:marcan
#asahi-dev · 2021-12-10 14:15
marcanok, confirmed with spi.py, the CLKDIV is not -1 and the minimum is 2
#asahi-dev · 2021-12-10 14:08
marcanbut if that works then I guess it can handle 30MHz lol?
#asahi-dev · 2021-12-10 14:08
marcanI was talking about t6000
#asahi-dev · 2021-12-10 14:07
marcanj`ey: why going back to 24?
#asahi-dev · 2021-12-10 12:42
marcanwonder if I can get the gpiotracer accurate enough to test that... probably measuring the entire transfer with auto-cs
#asahi-dev · 2021-12-10 12:41
marcanit sets it to 3, which for 24MHz would be 8MHz under that interpretation (I had it as divisor - 1 instead which would give 6MHz)
#asahi-dev · 2021-12-10 12:40
marcanI think the CLKDIV must be off by one, assuming apple's driver isn't wrong
#asahi-dev · 2021-12-10 10:28
marcanthe four flag bytes I think are clock_polarity, flags (I think only bit 0 does something), some other bool, and bits per word
#asahi-dev · 2021-12-10 10:26
marcanI think
#asahi-dev · 2021-12-10 10:26
marcanso this means 20us after cs assert and before cs deassert
#asahi-dev · 2021-12-10 10:26
marcanlooks like the preamble/postamble ones are cs to data and data to cs, and take effect if cs_delay is zero
#asahi-dev · 2021-12-10 10:20
marcanalso the controller driver is called AppleSamsungSPI so I was right that it's somehow a relative of Samsung stuff
#asahi-dev · 2021-12-10 10:19
marcanseriously, people need to give us credit, the stuff we come up with is way cleaner than macOS :p
#asahi-dev · 2021-12-10 10:18
marcanso not only are they tying their SPI device abstraction to ARM platforms only, they define it in the kitchen sink driver
#asahi-dev · 2021-12-10 10:18
marcanoh, and where is AppleARMSPIDevice defined? in AppleARMPlatform of course
#asahi-dev · 2021-12-10 10:15
marcanthis claims the clock is 8MHz (assuming that's nsec) and the cs_delay 20us
#asahi-dev · 2021-12-10 10:15
marcanu32 unk, clock_period, flags, word_delay, cs_delay, cs_preamble_delay, cs_postamble_delay
#asahi-dev · 2021-12-10 10:14
marcan*facepalm*
#asahi-dev · 2021-12-10 10:14
marcangoddammit I think it is
#asahi-dev · 2021-12-10 10:11
marcanthis is the kind of horrible hack apple would do...
#asahi-dev · 2021-12-10 10:11
marcanthe "reg" of the spi device might be the timings, now that I think about it...
#asahi-dev · 2021-12-10 10:11
marcan reg = 000000007d0000000000010800000000204e0000000000000000000000000000
#asahi-dev · 2021-12-10 10:11
marcanyou know...
#asahi-dev · 2021-12-10 09:43
marcanbut there's supposed to be more stuff that I'm not finding...
#asahi-dev · 2021-12-10 09:31
marcanbut anyway, you have all the timings at the end
#asahi-dev · 2021-12-10 09:31
marcanthat stupid IDREF compression is annoying
#asahi-dev · 2021-12-10 09:30
marcanhttps://mrcn.st/p/ue4byz9Y this is for J314C with the firmware blobs snipped
#asahi-dev · 2021-12-10 09:27
marcanI mean stuff like SPI config
#asahi-dev · 2021-12-10 09:23
marcan/System/Library/AssetsV2/com_apple_MobileAsset_SFRSoftwareUpdate/e1e322bee87acc15973794a58f6e551734c82adf.asset/AssetData/boot/Firmware/J293_Multitouch.im4p for one... but surely it doesn't get it from there
#asahi-dev · 2021-12-10 09:22
marcan... so where is this stored?
#asahi-dev · 2021-12-10 09:21
marcanwhat
#asahi-dev · 2021-12-10 09:21
marcanand it includes the actual firmware and more stuff inside
#asahi-dev · 2021-12-10 09:21
marcanthis "firmware" *is* the plist
#asahi-dev · 2021-12-10 09:21
marcanwait no
#asahi-dev · 2021-12-10 09:21
marcanjust running `strings` in the firmware yields a giant plist
#asahi-dev · 2021-12-10 09:20
marcanso I guess the device reports its own properties
#asahi-dev · 2021-12-10 09:20
marcanoh derp it's in the firmware
#asahi-dev · 2021-12-10 08:59
marcanbut now that things are starting to come together I do want to test stuff on all of them and fix whatever's broken :)
#asahi-dev · 2021-12-10 08:59
marcanyeah, because a lot is shared
#asahi-dev · 2021-12-10 08:58
marcanI mean I want all the machines to work :-)
#asahi-dev · 2021-12-10 08:57
marcanthis is from m1air
#asahi-dev · 2021-12-10 08:57
marcanhttps://hub.marcan.st/t/ioreg_spi3.txt
#asahi-dev · 2021-12-10 08:54
marcanthere is also apparently an accelerometer in here?
#asahi-dev · 2021-12-10 08:54
marcan(e.g. 3 is apparently the actuator, i.e. the force feedback thing)
#asahi-dev · 2021-12-10 08:53
marcanand it tells you what the interface numbers are etc
#asahi-dev · 2021-12-10 08:52
marcanbtw, the ioreg on macos has lots of info, like the HID descriptors
#asahi-dev · 2021-12-10 08:50
marcanheh, I remember that lyric :-)
#asahi-dev · 2021-12-10 08:47
marcan(running a 6MHz device at 10MHz is relatively likely to work)
#asahi-dev · 2021-12-10 08:47
marcan(but also, they set the max-freq to 2MHz when in fact it's at least 6MHz)
#asahi-dev · 2021-12-10 08:47
marcannever!

plus ›