#
✕ nick:marcan
#asahi-dev · 2021-12-10 08:47
marcancorellium code, buggy?
#asahi-dev · 2021-12-10 08:46
marcanso probably all t8103 devices use 120
#asahi-dev · 2021-12-10 08:46
marcanand apparently m1mbp does too
#asahi-dev · 2021-12-10 08:46
marcanm1air uses 120
#asahi-dev · 2021-12-10 08:45
marcanI found a pile of debugs about that in the driver
#asahi-dev · 2021-12-10 08:45
marcantrying to figure out where
#asahi-dev · 2021-12-10 08:45
marcanall the gory details of the SPI timings aren't in the ADT but they're *somewhere*
#asahi-dev · 2021-12-10 08:39
marcanhold on, I found a thing
#asahi-dev · 2021-12-10 08:25
marcanyeah, I was going to suggest that
#asahi-dev · 2021-12-10 08:22
marcanyeah, but that sounds like there must be a better way
#asahi-dev · 2021-12-10 08:21
marcanthat looks wrong, surely there's some way of knowing when a command is complete
#asahi-dev · 2021-12-10 08:21
marcanah, I see delays between command and status?
#asahi-dev · 2021-12-10 08:20
marcanthose make sense
#asahi-dev · 2021-12-10 08:20
marcanand reset
#asahi-dev · 2021-12-10 08:20
marcanother than the CS stuff?
#asahi-dev · 2021-12-10 08:18
marcanor something like that
#asahi-dev · 2021-12-10 08:18
marcanif both drivers are enabled the SPI/HID transport thing knows to switch modes and delegate to bcm5974 for that part
#asahi-dev · 2021-12-10 08:17
marcanand then we add a SPI transport
#asahi-dev · 2021-12-10 08:17
marcanthe existing code would be the USB transport
#asahi-dev · 2021-12-10 08:17
marcanthen break up the bcm5974 driver into a core that sets up the input device and parses reports, and a transport layer
#asahi-dev · 2021-12-10 08:17
marcanfirst write a HID transport that can do the keyboard/mouse bits via the standard HID framework
#asahi-dev · 2021-12-10 08:16
marcanI guess the right way to do this would be something like
#asahi-dev · 2021-12-10 08:15
marcanwhat a mess...
#asahi-dev · 2021-12-10 08:14
marcanheh, that sounds like more refactoring that needs to happen to share that code...
#asahi-dev · 2021-12-10 08:10
marcanah, so the "proper" touchpad mode isn't real HID?
#asahi-dev · 2021-12-10 08:08
marcanthis is on j314s but I imagine it'd apply to the m1 devices too
#asahi-dev · 2021-12-10 08:07
marcanso let's go with 6000000?
#asahi-dev · 2021-12-10 08:07
marcanbut 3 would be 8, so apple definitely don't do 10
#asahi-dev · 2021-12-10 08:07
marcanI wouldn't be surprised if 10MHz works if 6MHz is officially kosher
#asahi-dev · 2021-12-10 08:07
marcanso 24/4 = 6
#asahi-dev · 2021-12-10 08:07
marcan# [SPITracer@/arm-io/spi3] MMIO: W.4 CLKDIV = 0x3 ()
#asahi-dev · 2021-12-10 08:06
marcanlet me see what apple does
#asahi-dev · 2021-12-10 08:06
marcanI mean it was broken due to the CS anyway
#asahi-dev · 2021-12-10 08:06
marcandoes that work?
#asahi-dev · 2021-12-10 08:03
marcanI'll go back to t6k since that's where I have a root partition for X, but hopefully those DT changes were the only difference that matters on t8103
#asahi-dev · 2021-12-10 08:03
marcanack
#asahi-dev · 2021-12-10 08:01
marcanjannau: were you testing on t6k or t8103?
#asahi-dev · 2021-12-10 07:56
marcanwhich is why none of this was working a minute ago, CS wasn't changing
#asahi-dev · 2021-12-10 07:55
marcanbut then you need the pinconfig; without that it tries to use software CS control while the hardware is the one actually owning the pin
#asahi-dev · 2021-12-10 07:55
marcancorrect, but what I'm saying is software CS control should work too
#asahi-dev · 2021-12-10 07:54
marcansince it defaults to 1 on these machines
#asahi-dev · 2021-12-10 07:54
marcancs-gpios should work, but then you need to pinconfig it to 0 instead
#asahi-dev · 2021-12-10 07:53
marcanjannau: https://mrcn.st/p/Zbc3DSDb
#asahi-dev · 2021-12-10 07:52
marcannot sure about X, I need to figure out why that breaks the touchpad, but I get the feeling that's an applespi problem, not a SPI problem
#asahi-dev · 2021-12-10 07:52
marcankeyboard/touchpad works on j313 now
#asahi-dev · 2021-12-10 07:50
marcanI think those are the spi3 pins for t8103 (miso unconfirmed)
#asahi-dev · 2021-12-10 07:49
marcanpins={"clk": 46, "mosi": 47, "miso": 48, "cs": 49},
#asahi-dev · 2021-12-10 07:49
marcanno, that's linux
#asahi-dev · 2021-12-10 07:44
marcanthis is wrong, it's setting the CS pin to hardware control but then the spi node is being told to use software CS
#asahi-dev · 2021-12-10 07:44
marcan[GPIOTracer@/arm-io/gpio] Pin-49 W 0x876220 (GROUP=7, CFG_DONE=1, PERIPH=1, CONFIG=0, VALUE=0)

plus ›