Hi,
I am having some troubles getting SPI and i2c buses working on WP77.
Some background on the specs I am working with:
- mangOH Red board
- WP77 module with firmware SWI9X06Y_02.13.02.00
- Legato 17.11
- Toolchain for WP76
I am trying to get the built-in i2c sensors on the board working (gyro, accelerometer, pressure, temperature) but it cannot find any i2c devices under /sys/devices. I am using the same code for a WP8548 module that works fine.
These is what is in my required: file:
/sys/devices/i2c-0/0-0068/iio:device0/in_accel_x_raw /sys/devices/i2c-0/0-0068/iio:device0/
/sys/devices/i2c-0/0-0068/iio:device0/in_accel_y_raw /sys/devices/i2c-0/0-0068/iio:device0/
/sys/devices/i2c-0/0-0068/iio:device0/in_accel_z_raw /sys/devices/i2c-0/0-0068/iio:device0/
/sys/devices/i2c-0/0-0068/iio:device0/in_accel_scale /sys/devices/i2c-0/0-0068/iio:device0/
/sys/devices/i2c-0/0-0068/iio:device0/in_anglvel_x_raw /sys/devices/i2c-0/0-0068/iio:device0/
/sys/devices/i2c-0/0-0068/iio:device0/in_anglvel_y_raw /sys/devices/i2c-0/0-0068/iio:device0/
/sys/devices/i2c-0/0-0068/iio:device0/in_anglvel_z_raw /sys/devices/i2c-0/0-0068/iio:device0/
/sys/devices/i2c-0/0-0068/iio:device0/in_anglvel_scale /sys/devices/i2c-0/0-0068/iio:device0/
/sys/devices/i2c-0/0-0076/iio:device1/in_temp_input /sys/devices/i2c-0/0-0076/iio:device1/
/sys/devices/i2c-0/0-0076/iio:device1/in_pressure_input /sys/devices/i2c-0/0-0076/iio:device1/
And when running the program I get error:
Jan 31 06:49:51 | supervisor[643]/supervisor T=main | app.c CreateFileLink() 1485 | Could not stat file at ‘/sys/devices/i2c-0/0-0068/iio:device0/in_accel_scale’. No such file or directory
For SPI when trying to run code working on WP8548 this is what I get:
Jan 31 07:03:30 | supervisor[7972]/supervisor T=main | app.c GetDevID() 644 | Could not get file info for ‘/dev/spidev0.0’. No such file or directory.
Jan 31 07:03:30 | supervisor[7972]/supervisor T=main | app.c SetCfgDevicePermissions() 754 | Failed to set permissions (rw) for app ‘spiService’ on device ‘/dev/spidev0.0’.
So, I went through everything multiple times. Installed spisvc kernel etc. Checked lsmod which gives:
root@swi-mdm9x28:~# lsmod
Tainted: G
spisvc 1069 0 - Live 0xbf000000 (O)
Tried modprobe:
root@swi-mdm9x28:~# modprobe spidev
modprobe: module spidev not found in modules.dep
The only spidev device found (which is not found on WP8548) is:
root@swi-mdm9x28:~# ls /dev/spi
/dev/spidev1.0
Sidenote:
I also had some issues with OpenSSL that I solved with a workaround, and somehow leads me to believe there might be a issue with the firmware, please correct me if I am wrong. I could not find most files needed installed on the board (despite OpenSSL library should be in the toolchain), so I manually copied them to /home/root on the device and pointed the program to that instead.
I understand WP77 is still WIP, but I understood you have atleast gotten i2c working so maybe I am missing something. Thank you very much, and please let me know if something is unclear.