<marcan>
Hope it works with the keyboard. We aren't implementing any of the delays yet, but the spi core might take care of that? Turns out we can't use hardware CS anyway so...
<marcan>
I tested it with the NOR flash
<marcan>
oh, I didn't even notice, but the genpd stuff works fine too, it's clockgating it properly
<kettenis>
so one interesting thing is that all previous drivers explicitly control CS# through pinctrl
<kettenis>
whereas your driver controls it through the SPI controller itself isn't it?
<FireFox317>
marcan, apparantly the flash@0 node also dont need the #address-cells and #size-cells properties, but i guess we would also find that when we would upstream these bindings
<marcan>
kettenis: indeed
<marcan>
both should work ~identically
<marcan>
apple uses pinctrl
<marcan>
firefox317: that's probably for defining flash partitions, which we will want to later
<kettenis>
marcan: does that mean that pinctrl should configure the pin appropriately?
<marcan>
pinctrl needs to set the pin to peripheral 1 for the internal controller CS to work
<marcan>
which I do now in the DT
<marcan>
alternatively you can drive it as a GPIO
<marcan>
both work
aleasto has quit [Remote host closed the connection]
<kettenis>
so we could explicitly list the gpio in the DT and your driver would simply ignore that?
<marcan>
I'm not sure how the spi core handles that; I need to check to see if that needs to be explicitly implemented
<marcan>
but I imagine it's just a change to the probe function if so
<marcan>
since the spi core definitely has gpio CS handling code already
<FireFox317>
marcan, ah yep, you are correct. Indeed that can be used for defining partitions
<marcan>
you need to pick one since you need to do pinctrl anyway; either internal CS or gpio CS
<marcan>
kettenis: btw, since I ended up not looking at the openbsd driver... how does it compare with what you had? :)
<marcan>
(CS stuff aside)
<kettenis>
I can probably switch the OpenBSD driver to use the internal CS# control pretty quickly
<ar>
/42/42
<kettenis>
marcan: I think the fundamentals are quite close, but I don't bother with interrupts yet in the openbsd driver
<marcan>
ah, I see
<marcan>
I assume you don't have the 1~32 bit per word, cpha/cpol/bitreverse features though
<marcan>
did you find the FIFO reset bits?
<kettenis>
indeed, I don't have any of those features
<kettenis>
didn't find the FIFO reset bits (but didn't really need them)
<kettenis>
I obviously need to go in and replace some of the magic numbers now ;)
<marcan>
:-)
<kettenis>
I'll probably only implement the features that are really needed
<kettenis>
I like keeping my drivers minimal ;)
<marcan>
well, it was easy to implement that stuff :p
<kettenis>
yup, yours is nice and concise as well
<kettenis>
great work!
<marcan>
:)
<marcan>
thanks!
<marcan>
alright, time for dinner :)
<kettenis>
* Based on spi-apple.c, Copyright 2018 SiFive, Inc.
conected has joined #asahi-dev
<kettenis>
should have skipped that on the global search and replace ;)
<j_ey_>
marcan: use_gpio_descriptors will let the spi core know about the gpios-cs from the DT
<marcan>
kettenis: ahaha, thanks for catching that :)
<kettenis>
j_ey_ but you have to pick one or the other
<kettenis>
letting the controller control CS# is nicer, but if Apple ever decides to use an arbitrary GPIO to control CS# we'll have to use a gpio descriptor
<j_ey_>
marcan: Ill try it out later with the keyboard!
<povik>
pushed new version of the audio driver, on top of the asahi branch
<sven>
i think you want to get rid of the "retries++;"
<sven>
there's also devm_spi_alloc_master
<j_ey_>
also you might want a timeout. in the transfer_one. sifive didnt, but I saw some other drivers that did. and the core will set one up for you (if you structure the code differently)
j_ey_ is now known as j`ey
<sven>
and this doesn't matter here because the refclock is constant but i think you should use devm_add_action_or_reset to clk_disable_unprepare the clock.
<sven>
otherwise you could in theory disable the clock before the spi controller is removed
bps has quit [Ping timeout: 480 seconds]
<sven>
(guenter roeck pointed that out in my watchdog v1)
<marcan>
sven: yeah, someone emailed (!) me about retries++, lol
<sven>
hah :D
<j`ey>
leave the retries++ in. it's nice, ying and yang. equlibrium
<marcan>
lol
<sven>
it also looks like this nvme controller just doesn't support the abort command :/
yuyichao has joined #asahi-dev
akemin_dayo has quit [Ping timeout: 480 seconds]
yuyichao_ has quit [Ping timeout: 480 seconds]
<sven>
povik: i briefly looked at it and left some general comments. i don't know anything about those subsystems but it mostly already looks good to me
<sven>
(except for all those HACKs ofc ;))
<povik>
sven, firefox317: thanks for the comments! good there have been some eyes on it
<povik>
marcan: M1Pro laptop i do have, it's just that i prefer calling it M1X
<_jannau_>
the module has '-r' to retrieve and save the adt from the device
<j`ey>
thanks!
<j`ey>
I don't see any obvious dmesg errors, but keyboard doesn't work currently
<_jannau_>
j`ey: try to comment the delay hacks in applespi. I think those are only comaptible with the corellium spi driver
<j`ey>
think my mac just ran out of battery, woops, will charge for a bit and try later
Gaspare has joined #asahi-dev
Glanzmann has joined #asahi-dev
<Glanzmann>
j`ey: Do you use the macbook air as workstation under Linux? If so, how long does the battery last?
<j`ey>
Glanzmann: I dont use it yet
<j`ey>
just for testing patches
<Glanzmann>
I
<Glanzmann>
see.
<jannau>
I see "Command 1 timed out" with corellium's applespi on top of AsahiLinux/linux/asahi
<j`ey>
jannau: after removing the delays?
<j`ey>
or just as-is
roxfan has joined #asahi-dev
roxfan2 has quit [Ping timeout: 480 seconds]
<jannau>
j`ey: both, haven't looked into it beyond that
<j`ey>
jannau: ok, I'm not going to look tonight e9ther
Gaspare has quit [Ping timeout: 480 seconds]
<Glanzmann>
jannau: Tried your patchset on the mini, works great.
mipmeb has joined #asahi-dev
<mipmeb>
???? c / e r t a i n l y , z a m e r i c a n s n e e d e d s o m e t h i n g l i k e 9 / 11 t o J u s t i f y i n v a d i n g - i r - a q w h i c h h a s b e e n a l r e a d y p la n n e d a s a p a r t o f c r e a t i v e c -h a o s D i d u s a t r a i n & s u p p l y i s i s w i t h
<mipmeb>
w e a p o n s l i k e i t d i d w i t h a l - q a- e d a t o j u s t i f y c r e a t i n g w a r .s C R E - A T - I V E C H A - O S d i d c i a - d i d 9 / 11 o r i t j u s t l e t i t h a p p e n p l a n f o r m i d d l e -e a s t i f a l q a e d a d i d i t
<mipmeb>
W H Y t o k - i - l - l 9 m i l l i o n i r -a q i - s a b o u t 9 m i l l i o n i r a q i - d i -e d E i t h e r -b e c a u s e - o f d i r e c t a m e r ic a n v i o l e n c e a n d b e c a u s e o f s i e g e u s a m a d e a g a i n s t i r - a q t h a t p r e v e n t e d i -r a -q i f r o m e s s e n
<mipmeb>
t i a l l i v i n g m a t e r i a l s , f o o d , m e d i c i n e a n d e v e n p e n c i l s f o r z c h i l d e r n - i s i s a n d a l q- a e d a - o n l y a p p e a r e d i n i r - a q a f t e r u s a i n v a s i o n , D i d u s a p a v e t h e w a y for i s- i s t o i r a -q ? s a d -d -a m
<mipmeb>
h u s- s i n who l o s t m o s t of his p o -w e r in 1 st , 2 nd g u l f w a r s a n d d u r i n g 1 0 y e a r s of s i e g e , d i d n o t a l l o w i s ` i s or a l , q a , e d e a t o e n t e r i r -a q , e v e n t o ` h e l p h i m a g a i n st u s a
Ganneff has joined #asahi-dev
mipmeb has quit [Remote host closed the connection]