I'm getting started on getting the SPI bus on my Omega working using Rust.
I ported a SPI library (rppal) from the RasPi to Omega2 (In case anybody else is struggling with this: ioctl's are defined/composed differently on MIPS(el) than on other architectures!).
After getting my ioctl's sorted, everything seems to work fine using the stock firmware, both using the hardware spidev
as well as when using the spi-gpio-custom
driver.
On my own firmware build however (based on https://github.com/OnionIoT/source head), the spidev
stops working. The device node is present /dev/spidev32766.1
, ioctls work and my scope registers digital signals going over the bus... All data read on the bus however is the same byte, either using my own tool or the bundled spi-tool
(not all ones or zeroes but the same byte each time). Tying the MISO
to GND
or VCC
doe not change the data read.
Iv'e compared modules of my firmware and the stock, with these results:
Modules in stock fw, but not in mine:
dma_shared_buffer, mt76x8, ralink_eeprom_api, snd_pcm_dmaengine, snd_soc_core, snd_soc_ralink_i2s, snd_soc_simple_card, snd_soc_wm8960, snd_usb_audio, snd_usbmidi_lib, uvcvideo, v4l2_common, videobuf2_core, videobuf2_memops, videobuf2_v4l2, videobuf2_vmalloc, videodev
and vice versa: modules in my build, but not in stock:
ip6_udp_tunnel, mt_wifi, spi_bitbang, spi_gpio, tun, udp_tunnel, wireguard
What am I missing here? Any ideas on what could be wrong?