Open ozzyrob opened 10 months ago
Few changes to src/hal/drivers/mesa-hostmot2/spi_common_rpspi.h
*/
Yielded this result alcmd: loadrt hm2_rpspi spi_probe=2 spi_debug=4 hm2_rpspi: Platform: Raspberry Pi 5 Model B Rev 1.0 hm2_rpspi: Base address 7c000000 size 04000000 hm2_rpspi: Mapped peripherals from 0x7c000000 (size 0x04000000) to gpio:0x0x7fff894d8500, spi:0x0x7fff88fd4000, aux:0x0x7fff894d4100 hm2_rpspi: No VPU clock at '/sys/kernel/debug/clk/vpu/clk_rate' (errno=2), trying core clock as alternative. hm2_rpspi: SPI0/CE1 clock rate: 31250000/31250000 Hz, VPU clock rate: 50000000 Hz hm2_rpspi: SPI0/CE1 write clock rate calculated: 25000000 Hz (clkdiv=2) hm2_rpspi: SPI0/CE1 read clock rate calculated: 25000000 Hz (clkdiv=2) hm2_rpspi: SPI0/CE1 Invalid cookie, read: 00000000 00000000 00000000, expected: 55aacafe 54534f48 32544f4d hm2_rpspi: SPI0/CE1 No drive seen on MISO line (kept at pull-down level). No board connected or bad connection? hm2_rpspi: rtapi_app_main: No such device (-19)
Looks like I'm barking up the wrong tree. So the above was just a hopeful "lets see if it's that simple".
Anyone one have any ideas ?
Some initial info here: https://forum.linuxcnc.org/18-computer/50697-rpi5-spi-woes#285681
First thing of note in the driver the second 32 bit value of the RPi5 /proc/device-tree/soc/ranges is 0x10 compared to 0x00 for the RPi4. Hexdump: 7c 00 00 00 00 00 00 10 7c 00 00 00 04 00 00 00
RPi5 with a 7i90 (hostmot firmware running on a Spartan 6 dev board, works fine with my RP-400)
Linuxcnc 2.9 recent pull from git hub Initial play with the code was as such from RIP
got a result as such: rmmod: ERROR: Module spi_bcm2835 is not currently loaded hm2_rpspi: ERROR: Failed to execute '/sbin/rmmod spi_bcm2835' hm2_rpspi: Platform: Raspberry Pi 5 Model B Rev 1.0 hm2_rpspi: Base address 7c000000 size 04000000 hm2_rpspi: Mapped peripherals from 0x7c000000 (size 0x04000000) to gpio:0x0x7fff1c1d0000, spi:0x0x7fff1c1d4000, aux:0x0x7fff1c1e5000 hm2_rpspi: No VPU clock at '/sys/kernel/debug/clk/vpu/clk_rate' (errno=2), trying core clock as alternative. hm2_rpspi: SPI0/CE1 clock rate: 31250000/31250000 Hz, VPU clock rate: 50000000 Hz hm2_rpspi: SPI0/CE1 write clock rate calculated: 25000000 Hz (clkdiv=2) hm2_rpspi: SPI0/CE1 read clock rate calculated: 25000000 Hz (clkdiv=2) Then just waiting for component to become ready.
With the unmodified driver from recent deb package.
hm2_rpspi: Platform: Raspberry Pi 5 Model B Rev 1.0 hm2_rpspi: Base address 0x00000010 size 0x7c000000 hm2_rpspi: Can't map peripherals hm2_rpspi: cannot map peripheral memory. hm2_rpspi: rtapi_app_main: Invalid argument (-22)