Yes I have the file:
root@orangepi5-plus:/boot/dtb/rockchip/overlay# ls -l rk3588-spi4-m0-cs1-spidev.dtbo
-rwxr-xr-x 1 root root 598 Dec 1 14:04 rk3588-spi4-m0-cs1-spidev.dtbo
After reboot, I have the device:
root@orangepi5-plus:~# ls -l /dev/spidev4.1
crw------- 1 root root 153, 0 Dec 4 22:39 /dev/spidev4.1
So I'm using this code
` ` `
import spidev
import time
spi = spidev.SpiDev(4,1)
spi.max_speed_hz= 120000
while True:
print(spi.readbytes(1))
time.sleep(0.1)
` ` `
And the only thing I have is 255, like nothing is read from the chip.
more info:
errors in the dmesg:
[ 5.219022] rockchip-pinctrl pinctrl: pin gpio1-17 already requested by fecb0000.spi; cannot claim for feab0000.i2c
[ 5.219027] rockchip-pinctrl pinctrl: pin-49 (feab0000.i2c) status -22
[ 5.219031] rockchip-pinctrl pinctrl: could not request pin 49 (gpio1-17) from group i2c3m0-xfer on device rockchip-pinctrl
[ 5.219034] rk3x-i2c feab0000.i2c: Error applying setting, reverse things back
[ 5.466121] arm-scmi firmware:scmi: Failed. SCMI protocol 17 not active.
[ 5.480350] rockchip-pinctrl pinctrl: pin gpio1-18 already requested by fecb0000.spi; cannot claim for 7-0011
[ 5.480358] rockchip-pinctrl pinctrl: pin-50 (7-0011) status -22
[ 5.480365] rockchip-pinctrl pinctrl: could not request pin 50 (gpio1-18) from group i2s0-mclk on device rockchip-pinctrl
[ 5.480371] ES8323 7-0011: Error applying setting, reverse things back
[ 5.535846] rockchip-pinctrl pinctrl: pin gpio1-17 already requested by fecb0000.spi; cannot claim for feab0000.i2c
[ 5.535856] rockchip-pinctrl pinctrl: pin-49 (feab0000.i2c) status -22
[ 5.535866] rockchip-pinctrl pinctrl: could not request pin 49 (gpio1-17) from group i2c3m0-xfer on device rockchip-pinctrl
[ 5.535873] rk3x-i2c feab0000.i2c: Error applying setting, reverse things back
I don't know if it's important but I'm booting from the MTD device.
I tried with the wiringOP librairy, I have the same result (it's reading value of 255).
The gpio readall command returns an error too:
wiringPiSetup: mmap (PWM) failed: Operation not permitted
root@orangepi5-plus:~/wiringOP/examples# ./spidev_test -v -D /dev/spidev4.1
spi mode: 0x0
bits per word: 8
max speed: 500000 Hz (500 KHz)
TX | FF FF FF FF FF FF 40 00 00 00 00 95 FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF F0 0D |......@.........................|
RX | FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF |................................|