riker77 has quit [Quit: Quitting IRC - gone for good...]
<marcan>
jannau: I think that interpretation makes sense
<marcan>
the ADT timings are 20us for start/end CS though
<marcan>
seems they have inconsistent numbers in the ADT and in that config from the device :-)
<marcan>
jannau: 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
<marcan>
I need to dig back through intel mac props, if I can find them, to see if they've changed
<marcan>
but given Apple doesn't hardcode these, I'd be worried about hardcoding them in the driver as far as forwards compat
<landscape15[m]>
marcan: what basically are these delays in the SPI driver?
<jannau>
spi-peripheral-props.yaml has spi-rx-delay-us / spi-tx-delay-us which would best map onto 'Inter Stage Us'
<jannau>
it 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
<landscape15[m]>
jannau: thanks
aleasto has joined #asahi-dev
<kettenis>
marcan: I have a diff for the OpenBSD SPI controller driver such that it controls CS# directly instead of through a GPIO
<kettenis>
so we can just go ahead with using that config in the device trees
<marcan>
sounds good :)
<marcan>
make 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
<marcan>
if everything's compatible then that's no drama
<kettenis>
yup, that's what I did ;)
<kettenis>
how confident are you about the t8103 spi3 pin number assignments?
<marcan>
jannau: oh wow, that entire file isn't even in mainline yet
<j`ey>
pinmux them all to 0 and see if it breaks :P
<marcan>
I just noticed it only showed up in linux-next
riker77 has joined #asahi-dev
<marcan>
I'm not sure what spi-tx-delay-us and spi-rx-delay-us are supposed to represent though
<marcan>
SPI has no concept of "read" or "write" transactions
<marcan>
those things should be better documented or be per-device... :/
<marcan>
the CS stuff I want to add is a lot more general
<kettenis>
j'ey: the file was split out from spi-controller.yaml
<j`ey>
marcan: ^
<marcan>
ah, makes sense
<kettenis>
ok, confirmed
<kettenis>
if I set any one of 46, 47 or 48 to 0, it breaks the keyboard
<kettenis>
(we already know that 49 is CS#)
<kettenis>
marcan: isn't bpw "bits per word"?
<kettenis>
your driver seems to interpret it as "bytes per word"
<marcan>
I use it for bytes per word :-)
<marcan>
the spi core provides bits_per_word
<marcan>
bpw is that rounded up to 8/16/32, it's intended to mean the buffer word size in bytes
<marcan>
perhaps a different name would be in order
<marcan>
see unsigned int bpw = t->bits_per_word > 16 ? 4 : t->bits_per_word > 8 ? 2 : 1;
<kettenis>
yeah, I have seen bpw used in SPI context
<marcan>
maybe just wordsize
<marcan>
?
<kettenis>
with the meaning of bits_per_word
<kettenis>
renaming would probably be good
<marcan>
got any better ideas? outright bytes_per_word?
<kettenis>
bytes_per_word would be clearest
<j`ey>
maybe shorten that to bpw
<j`ey>
:D
<marcan>
just call it Bpw
<marcan>
:p
<j`ey>
bytes_per_word or word_size, either seems ok
<marcan>
word_size is still ambiguous so bytes_per_word it is
<kettenis>
other than that, the driver looks really good to me
* j`ey
just noticed somethin funny
<kettenis>
device tree bindings for this should be trivial to write
<marcan>
yeah, it's basically a no-op, just a standard spi controller
<kettenis>
jannau, my proposed DT compatible is currently "apple,spi-hid-transport"
<kettenis>
if we agree on that one, I'll change the OpenBSD driver accordingly
<marcan>
jannau: nice!
<marcan>
you've got spaces instead of tabs for the comment btw :)
<marcan>
also spi_decvice in the binding
<marcan>
but I'm not sure if bindings are supposed to refer to linux internals like that
<marcan>
also s/deassert/deasserted/
<marcan>
pushed the apple-spi fixups to asahi
* j`ey
should probably use that branch rather than just recherry-picking it ;_;
<marcan>
it's a bit messy due to all the rebasing and force pushes...
<marcan>
I 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
<marcan>
but I'm not sure how effective that is :p
<j`ey>
I think it's pretty effective
<j`ey>
marcan: nit: you have a few whitespace-at-end-of-line errors
<marcan>
thanks, fixed :)
<marcan>
I 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
<marcan>
sven: 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
<marcan>
(and arnd hasn't merged that yet, so it can go in a v2 PR that supersedes the first)
<sven>
huh, did i miss that?
<sven>
let me check
<sven>
yup, i missed that :D
riker77 has quit [Quit: Quitting IRC - gone for good...]
<jannau>
kettenis: "apple,spi-hid-transport" sounds good to me
riker77 has joined #asahi-dev
<kettenis>
jannau: cool, I'll change it on my end
aleasto has quit [Remote host closed the connection]
kgarrington has joined #asahi-dev
kgarrington has quit [Remote host closed the connection]
nabaiste^ has joined #asahi-dev
sproede[m] has joined #asahi-dev
aidenfoxivey has quit [Quit: aidenfoxivey]
aidenfoxivey has joined #asahi-dev
nico_32 has quit [Ping timeout: 480 seconds]
nico_32 has joined #asahi-dev
aidenfoxivey has quit [Read error: Connection reset by peer]
zimsneexh has quit [Read error: Connection reset by peer]
Graypup_ has quit [Quit: meow]
Graypup_ has joined #asahi-dev
bps2 has joined #asahi-dev
bps2 has quit [Ping timeout: 480 seconds]
riker77 has quit [Quit: Quitting IRC - gone for good...]