Avatar

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

mzakharo

About

Username
mzakharo
Joined
Visits
7
Last Active
Roles
Member
Points
5
Badges
0
  • SPI communication on the LOGI-Bone

    Hello,
    Thank you for posting your success with SPI and logibone.  I also have managed to get SPI working on the logibone R1. Since SPI1 on beaglebone is used for both programming and communicating with FPGA, I had to add  a bone-pinmux-helper overlay to the DTS. Please see my DTS file attached.
    I had to modify logi_loader script to add the multiplexor when programming:

    #!/bin/sh
    OCP="$(ls /sys/devices/ | grep ocp)"
    MUX="$(ls /sys/devices/$OCP | grep spi_pinmux_helper)"
    sh -c "echo cfg > /sys/devices/"${OCP}"/"${MUX}"/state"
    dd if=$1 of=/dev/logibone bs=4M
    sh -c "echo spi > /sys/devices/"${OCP}"/"${MUX}"/state"

    On HW side, I started with logibone-wishbone project for beaglebone, and replaced gpmc_wishbone_wrapper with spi_wishbone_wrapper instance.
    I then also had to modify  https://github.com/fpga-logi/logi-projects/blob/master/logi-wishbone/sw/logipi/wishbone_wrapper.c  and change spi0.0 to spi1.0.

    I was then able to read/write registers on logibone using the supplied read/write_wishbone utilities from logipi

    Hope this helps anyone who wishes to work with logibone over SPI with beaglebone black and would like to work with existing HDL from logibone github.
    mjones