-
Notifications
You must be signed in to change notification settings - Fork 5.2k
SPI: switch to spi-bcm2835 - what would it require? #864
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Moving to upstream drivers is desired. Obviously the "not breaking things" is the tricky part, as it's hard to be sure exactly what people are doing with the spi-bcm2708 driver. SPI is not something I use, so I'll have to listen to advice from the devs who use it. If we make a change and lots of users complain that things are broken, we'll have to revert or help the users get working again. If you are willing to help resolve issues, then that will make the switch more likely to happen. So, if we did this, what would you expect spi users to experience after the update? What would break? ping @pelwell for opinion. |
I suggest the following:
If someone starts having trouble, it's quite easy to hack together an overlay that switches to spi-bcm2708 instead. Or just provide a fallback overlay upfront. |
Why not compile both (each one has a separate .compatible string)?
That could mean a transition with fallback for those complaining and giving us a window to fix issues... Martin |
I would prefer adding an overlay to enable it for the first release, then we can allow the advanced users some time to try it out. This would be a good occasion to use the Release Note/Warning on Update feature, if we had one. |
Jinx. |
Note the overlay could look like this (also enabling SPI when loading it):
|
It looks like you've got this figured out. Are you up to creating a pull request? (Note that I'm assuming the drivers behave the same with respect to their DT nodes.) |
Yes - fortunately they use the same layout (even though the GPIO portion is not really necessary as the "2708" version explicitly sets ALT4 on the GPIOs regardless of what DeviceTree does (but that is probably still there for systems without DeviceTree) I can look into that - only thing is: I am not sure where to find those overlays in the source-code... |
ok - found that portion: arch/arm/boot/dts/ |
Created pull-request |
It shouldn't matter to most users which SPI driver is being used, and this way we get to control what driver they are actually using. BTW, you don't need to include the "-overlay" when using them - that is assumed. |
merged |
Hi!
Quick question with regards to the spi drivers:
What is the reason for not switching from the spi-bcm2708 to the upstream spi-bcm2835 driver?
I wonder because I have a few improvements that I want to push upstream which might be quite helpful for a few people who are using the SPI sub-system (especially around latencies). Also I have been talking with notro to get DMA incorporated into never versions(as well as upstream) so that the TFT displays that you are starting to support do not put such a huge interrupt burden on the RPI leaving more CPU to do actual work.
The only difference I see is the LoSSI support in spi-bcm2708, which - as far as I can tell - is basically broken because there is no correct support for those 24bit/32bit reads in the first place (depending on the command sent). Actually notro (the author of the LoSSI patch for the spi-bcm2708) told me that even he is not using it with the tft drivers, because it is not really working as he assumed it would and went back to do 9x8 bit transfers instead 8x 9bit transfers.
Also from the state of the implementation I doubt that the LoSSI patches would EVER get incorporated into the upstream Linux kernel.
For things that I have lined up with the spi-bcm2835 driver please look at the wiki: https://github.com/msperl/spi-bcm2835/wiki and the corresponding open and closed issues.
These still need to get upstream, but I am starting to work on that.
Thanks, Martin
The text was updated successfully, but these errors were encountered: