(05-21-2017, 05:13 AM)ealbers Wrote: How many bps can SPI do on the pine? What clock rate is a SPI channel clocked at??? The processor frequency or the external oscillator freq?
I can't answer your question simply as I haven't played with the SPI stuff on the pine64 much, but @martinayotte may be able to.
However, what I can say is that if you look on p110 of the A64 user manual it appears that SPI can be clocked from one of three different sources, and then you've got the pre-divide ratio and clock divider ratio to deal with. And there is no functional difference between the registers for the SPI0 or SPI1 clock. Since this stuff is set by the registers, the device tree should hold the magic numbers. Fast forward to ln 2034 of the pine64 DTS, and you get the SPI register settings... and I think lines 2041 and 2042 are the ones of interest. I'll leave that up to you to work out out now, or someone else to explain... time for me to go back to the law textbooks and read up on commercial trusts and defeasible transactions...