EOI in getting SPI going on the RPi5
19 Feb 2024 04:30 #293741
by cornholio
EOI in getting SPI going on the RPi5 was created by cornholio
Looking for the more advanced programmers interested in getting the RPi5 SPI driver going. And those with RPi5 and Mesa 7c80 7c81 hardware willing to test.
If needed I can supply 7c81 type spi firmware for Spartan6 dev boards or the colorlight RV901 for testing purposes (tho some hardware hacking maybe involved for the RV901).
If needed I can supply 7c81 type spi firmware for Spartan6 dev boards or the colorlight RV901 for testing purposes (tho some hardware hacking maybe involved for the RV901).
Please Log in or Create an account to join the conversation.
02 Mar 2024 10:27 #294892
by andypugh
Replied by andypugh on topic EOI in getting SPI going on the RPi5
I haven't been paying attention. Is the Pi5 SPI not covered by the existing drivers? Is this more than just the board-id being unknown?
Please Log in or Create an account to join the conversation.
02 Mar 2024 18:53 #294929
by cakeslob
Replied by cakeslob on topic EOI in getting SPI going on the RPi5
We need to mash this file into our drivers, as this is the new RPi5 spi driver
github.com/raspberrypi/linux/blob/rpi-6....rs/spi/spi-dw-mmio.c
RPi5 doesnt use the same broadcom IO stuff as previous models, they made a their own IO chip. instead of bcm2835 controlling the SPI, the new chip used this designware driver
github.com/raspberrypi/linux/blob/rpi-6....rs/spi/spi-dw-mmio.c
RPi5 doesnt use the same broadcom IO stuff as previous models, they made a their own IO chip. instead of bcm2835 controlling the SPI, the new chip used this designware driver
Please Log in or Create an account to join the conversation.
03 Mar 2024 05:51 #294980
by cornholio
Replied by cornholio on topic EOI in getting SPI going on the RPi5
I've mentioned this, probably like a broken record. Mentioned it on git, around late Nov early Dec when I got my RPi5 but no response.
The whole RP1 thing has been a headache for a lot of gpio libraries, and no warning prior to release. Tho I guess if they mentioned this sales may have tanked.
The whole RP1 thing has been a headache for a lot of gpio libraries, and no warning prior to release. Tho I guess if they mentioned this sales may have tanked.
The following user(s) said Thank You: rthorntn
Please Log in or Create an account to join the conversation.
10 Mar 2024 10:04 #295567
by pippin88
Replied by pippin88 on topic EOI in getting SPI going on the RPi5
Does the following help?
github.com/praktronics/rpi5-rp1-spi
"Write some data to, and read some data from a slave device using the registers, rather than spi-dev"
(I have very limited understanding of this stuff)
github.com/praktronics/rpi5-rp1-spi
"Write some data to, and read some data from a slave device using the registers, rather than spi-dev"
(I have very limited understanding of this stuff)
The following user(s) said Thank You: cornholio
Please Log in or Create an account to join the conversation.
10 Mar 2024 15:06 #295578
by acondit
Replied by acondit on topic EOI in getting SPI going on the RPi5
I have been working (playing) with Rpi5 and Bookworm with preempt_rt. I have preempt_rt running on RPi4 and RPi5 (separate compiles). The RPi4 uses bcm2711_defconfig while the RPi5 uses bcm2712_defconfig. I have kernel version 6.6.20-rt25-v8 (-4k+ on the RPi4) and (-16k+ on the RPI5).
In the last couple of weeks they have added support for spi CS for additional cs pins. I am currently running the kernel on Raspian Bookworm but I have previously used the same sources to compile kernels on straight debian. If anyone is interested, I will put my sources up on my GitHub.
For awhile I was having difficulty getting the kernels to load but now I seem to have the process down. I will try shortly loading the kernel on the linuxcnc image for RPi5 to verify that the same kernel will run on both debian and raspian bookworm.
In the last couple of weeks they have added support for spi CS for additional cs pins. I am currently running the kernel on Raspian Bookworm but I have previously used the same sources to compile kernels on straight debian. If anyone is interested, I will put my sources up on my GitHub.
For awhile I was having difficulty getting the kernels to load but now I seem to have the process down. I will try shortly loading the kernel on the linuxcnc image for RPi5 to verify that the same kernel will run on both debian and raspian bookworm.
Please Log in or Create an account to join the conversation.
10 Mar 2024 16:20 - 10 Mar 2024 23:29 #295581
by cornholio
Replied by cornholio on topic EOI in getting SPI going on the RPi5
Great find pip
Tho I did try
"Write some data to, and read some data from a slave device using the registers"
But couldn't get this line to compile
Tho I did try
"Write some data to, and read some data from a slave device using the registers"
But couldn't get this line to compile
Last edit: 10 Mar 2024 23:29 by cornholio.
Please Log in or Create an account to join the conversation.
10 Mar 2024 16:32 #295582
by cornholio
There is no issue with kernels or images that can run Linuxcnc on the RPi 5. That had been sorted wayback in Nov\Dec.
The issue is due to the RP1 the RPi4 driver is not compatible with RPi5. It doesn’t matter what changes are made to the kernel the current hm2-rpspi driver can’t be used with the RPi5. A new driver needs to be written to suit the new hardware.
The whole point of this thread was to try and generate some interest, which hasn’t really happened. So it would seem there are other priorities, so patience is the key.
Spidev is not the answer, I have tried and the speed in the context of a servo thread isn’t there.
Replied by cornholio on topic EOI in getting SPI going on the RPi5
I have been working (playing) with Rpi5 and Bookworm with preempt_rt. I have preempt_rt running on RPi4 and RPi5 (separate compiles). The RPi4 uses bcm2711_defconfig while the RPi5 uses bcm2712_defconfig. I have kernel version 6.6.20-rt25-v8 (-4k+ on the RPi4) and (-16k+ on the RPI5).
In the last couple of weeks they have added support for spi CS for additional cs pins. I am currently running the kernel on Raspian Bookworm but I have previously used the same sources to compile kernels on straight debian. If anyone is interested, I will put my sources up on my GitHub.
For awhile I was having difficulty getting the kernels to load but now I seem to have the process down. I will try shortly loading the kernel on the linuxcnc image for RPi5 to verify that the same kernel will run on both debian and raspian bookworm.
There is no issue with kernels or images that can run Linuxcnc on the RPi 5. That had been sorted wayback in Nov\Dec.
The issue is due to the RP1 the RPi4 driver is not compatible with RPi5. It doesn’t matter what changes are made to the kernel the current hm2-rpspi driver can’t be used with the RPi5. A new driver needs to be written to suit the new hardware.
The whole point of this thread was to try and generate some interest, which hasn’t really happened. So it would seem there are other priorities, so patience is the key.
Spidev is not the answer, I have tried and the speed in the context of a servo thread isn’t there.
Please Log in or Create an account to join the conversation.
10 Mar 2024 17:10 - 10 Mar 2024 17:11 #295590
by Calysto
Replied by Calysto on topic EOI in getting SPI going on the RPi5
Super!! I'm enthusiastic! I have a PI5 doing nothing and a 7C80 (now working with a PI4). The PI5 is sooooo much faster, so I would like to use my 5 with my SPI-interface-mesa-card.
I'm not a programmer, but I can test things on a real machine. I might give you acces to it, if that is helpful... (while keeping the motors off )
I'm not a programmer, but I can test things on a real machine. I might give you acces to it, if that is helpful... (while keeping the motors off )
Last edit: 10 Mar 2024 17:11 by Calysto.
Please Log in or Create an account to join the conversation.
13 Jun 2024 18:15 #302962
by bpaut
Replied by bpaut on topic EOI in getting SPI going on the RPi5
How do I use spi on the rpi5, spidev hasn't been updated since 2022, before the rpi5 came out. Ive used spidev and it works half the time, but also get threading errors.
Please Log in or Create an account to join the conversation.
Time to create page: 0.128 seconds