#
…

2021-12-11

00:54kgarrington has joined #asahi-dev
00:54kgarrington has quit [Remote host closed the connection]
01:01aleasto has quit [Quit: Konversation terminated!]
01:22aidenfoxivey has quit [Quit: aidenfoxivey]
01:22aidenfoxivey has joined #asahi-dev
02:20Emantor has quit [Quit: ZNC - http://znc.in]
02:20Emantor has joined #asahi-dev
02:28aidenfoxivey has quit [Ping timeout: 480 seconds]
03:11PhilippvK has joined #asahi-dev
03:15phiologe has quit [Ping timeout: 480 seconds]
03:23aidenfoxivey has joined #asahi-dev
03:56marcanj`ey: for the capslock thing, I guess setting cs_inactive would fix that too
04:29slicey has quit [Quit: zzz]
05:53boardwalk has quit [Quit: Ping timeout (120 seconds)]
05:54boardwalk has joined #asahi-dev
06:20Jamie[m]1 has joined #asahi-dev
06:27slicey has joined #asahi-dev
06:40amw has quit [Server closed connection]
06:40amw has joined #asahi-dev
06:54slicey has quit [Quit: zzz]
07:49jannaumarcan: yes, https://github.com/jannau/linux/commit/6701d2c38df72ea0693c49afd93555c366ffa90b fixes it as well. not sure my interpretation of 'Inter Transaction' and 'Inter Stage' delays are accurate though
09:00slicey has joined #asahi-dev
09:10riker77 has quit [Quit: Quitting IRC - gone for good...]
09:52marcanjannau: I think that interpretation makes sense
09:53marcanthe ADT timings are 20us for start/end CS though
09:54marcanseems they have inconsistent numbers in the ADT and in that config from the device :-)
09:54marcanjannau: so what I was thinking is that we might want to add these delays as standard spi-peripheral props and make the SPI core understand them, instead of doing a driver one-off
09:55marcanI need to dig back through intel mac props, if I can find them, to see if they've changed
09:55marcanbut given Apple doesn't hardcode these, I'd be worried about hardcoding them in the driver as far as forwards compat
10:08landscape15[m]marcan: what basically are these delays in the SPI driver?
10:09jannauspi-peripheral-props.yaml has spi-rx-delay-us / spi-tx-delay-us which would best map onto 'Inter Stage Us'
10:14jannauit would make sense to add properties for cs_setup/cs_hold/cs_inactive to spi-peripheral-props.yaml now that they are available in spi core
10:17landscape15[m]jannau: thanks
10:20aleasto has joined #asahi-dev
10:20kettenismarcan: I have a diff for the OpenBSD SPI controller driver such that it controls CS# directly instead of through a GPIO
10:21kettenisso we can just go ahead with using that config in the device trees
10:27marcansounds good :)
10:27marcanmake sure it still works with gpio mode though, ideally we want to keep that option open if we ever find a good reason to switch
10:27marcanif everything's compatible then that's no drama
10:28kettenisyup, that's what I did ;)
10:29kettenishow confident are you about the t8103 spi3 pin number assignments?
10:29marcanjannau: oh wow, that entire file isn't even in mainline yet
10:29j`eypinmux them all to 0 and see if it breaks :P
10:29marcanI just noticed it only showed up in linux-next
10:29riker77 has joined #asahi-dev
10:29marcanI'm not sure what spi-tx-delay-us and spi-rx-delay-us are supposed to represent though
10:30marcanSPI has no concept of "read" or "write" transactions
10:30marcanthose things should be better documented or be per-device... :/
10:30marcanthe CS stuff I want to add is a lot more general
10:31kettenisj'ey: the file was split out from spi-controller.yaml
10:32j`eymarcan: ^
10:32marcanah, makes sense
10:36kettenisok, confirmed
10:36kettenisif I set any one of 46, 47 or 48 to 0, it breaks the keyboard
10:36kettenis(we already know that 49 is CS#)
10:39kettenismarcan: isn't bpw "bits per word"?
10:40kettenisyour driver seems to interpret it as "bytes per word"
10:40marcanI use it for bytes per word :-)
10:41marcanthe spi core provides bits_per_word
10:41marcanbpw is that rounded up to 8/16/32, it's intended to mean the buffer word size in bytes
10:41marcanperhaps a different name would be in order
10:42marcansee unsigned int bpw = t->bits_per_word > 16 ? 4 : t->bits_per_word > 8 ? 2 : 1;
10:42kettenisyeah, I have seen bpw used in SPI context
10:42marcanmaybe just wordsize
10:42ketteniswith the meaning of bits_per_word
10:42kettenisrenaming would probably be good
10:43marcangot any better ideas? outright bytes_per_word?
10:43kettenisbytes_per_word would be clearest
10:43j`eymaybe shorten that to bpw
10:43marcanjust call it Bpw
10:44j`eybytes_per_word or word_size, either seems ok
10:45marcanword_size is still ambiguous so bytes_per_word it is
10:49kettenisother than that, the driver looks really good to me
10:51* j`eyjust noticed somethin funny
10:51kettenisdevice tree bindings for this should be trivial to write
10:52marcanyeah, it's basically a no-op, just a standard spi controller
10:52marcanj`ey: ha!
10:52marcanand yet it still works because C
10:54jnan extreme end of such creative use of syntax is Duff's Device
10:54marcanI was going to mention I accidentally stepped in that direction :-)
11:11riker77 has quit [Quit: Quitting IRC - gone for good...]
11:22riker77 has joined #asahi-dev
11:29jannaucs setup/hold/inactive added to the DT and parsed by spi core: https://github.com/jannau/linux/tree/exp/spi-keyboard
11:31j`eyjannau: clean!
11:34jannauand now to spi-hid-apple
11:35j`eyjannau: hals und beinbruch
11:37slicey has quit [Quit: zzz]
11:44kettenisjannau, my proposed DT compatible is currently "apple,spi-hid-transport"
11:44kettenisif we agree on that one, I'll change the OpenBSD driver accordingly
12:05marcanjannau: nice!
12:05marcanyou've got spaces instead of tabs for the comment btw :)
12:05marcanalso spi_decvice in the binding
12:05marcanbut I'm not sure if bindings are supposed to refer to linux internals like that
12:05marcanalso s/deassert/deasserted/
12:07marcanpushed the apple-spi fixups to asahi
12:08* j`eyshould probably use that branch rather than just recherry-picking it ;_;
12:08marcanit's a bit messy due to all the rebasing and force pushes...
12:09marcanI do try to sort the commits so earlier = closer to upstream, so people can pick something in between and hopefully it'll change less often if they don't need the latest changes
12:09marcanbut I'm not sure how effective that is :p
12:10j`eyI think it's pretty effective
12:14j`eymarcan: nit: you have a few whitespace-at-end-of-line errors
12:17marcanthanks, fixed :)
12:18marcanI guess this just needs a binding and it's pretty much submittable too, I'll do that tomorrow or maybe even today if I don't fall asleep too early
12:21marcansven: can you review the DT changes (patch 3) for the PMGR fixup? I think with that and the fix for your comment / commit descriptions I can push it to asahi-soc
12:22marcan(and arnd hasn't merged that yet, so it can go in a v2 PR that supersedes the first)
12:22svenhuh, did i miss that?
12:22svenlet me check
12:25svenyup, i missed that :D
12:39riker77 has quit [Quit: Quitting IRC - gone for good...]
12:40jannaukettenis: "apple,spi-hid-transport" sounds good to me
12:50riker77 has joined #asahi-dev
13:11kettenisjannau: cool, I'll change it on my end
14:10aleasto has quit [Remote host closed the connection]
20:00kgarrington has joined #asahi-dev
20:01kgarrington has quit [Remote host closed the connection]
20:03nabaiste^ has joined #asahi-dev
20:14sproede[m] has joined #asahi-dev
20:19aidenfoxivey has quit [Quit: aidenfoxivey]
20:19aidenfoxivey has joined #asahi-dev
20:22nico_32 has quit [Ping timeout: 480 seconds]
20:38nico_32 has joined #asahi-dev
21:02aidenfoxivey has quit [Read error: Connection reset by peer]
21:03zimsneexh has quit [Read error: Connection reset by peer]
21:09Graypup_ has quit [Quit: meow]
21:11Graypup_ has joined #asahi-dev
22:16bps2 has joined #asahi-dev
23:16bps2 has quit [Ping timeout: 480 seconds]
23:58riker77 has quit [Quit: Quitting IRC - gone for good...]
…