Hi, everybody. I was just registered.
I use DietPi 6.9 on Orange Pi Zero.
I need to connect SPI with the external device (with the automobile radio tape recorder instead of changer) as slave. That is synchronizing impulses on CLOCK are given by the automobile head.
It’s only test configuration:
I have tried to collect information on this question:
- The kernel has to be configured with support of SPI Slave - it is present:
zcat /proc/config.gz | grep -e SPIDEV -e SPI_SLAVE CONFIG_SPI_SPIDEV=m CONFIG_SPI_SLAVE=y # CONFIG_SPI_SLAVE_TIME is not set # CONFIG_SPI_SLAVE_SYSTEM_CONTROL is not set
ls /sys/class/spi* /sys/class/spidev: spidev1.0 /sys/class/spi_master: spi1 /sys/class/spi_slave:
(here it is empty)
It is already good — means the necessary modules are present. Otherwise it should rebuild a kernel.
2. Slave the mode has to be supported from the driver of the hardware SPI controller which is built in SOC. As it has become clear, at the moment support is realized for on Renesas chips: https://elinux.org/Tests:MSIOF-SPI-Slave
On it meanwhile collected information at me has ended.
Questions on which it would be desirable to receive the answer:
- Whether it is possible on my device, using the DietPi operating system, to transfer the SPI controller to the slave mode? If isn’t present, then why sys/class/spi_slave is necessary?
- If it is impossible now whether then it is planned in the near future? I know what in 99% of cases of SoC acts as Master. But here it has so turned out that other mode was required.
I will be grateful for any positive information.