Linux as an SPI Slave
Adding SPI slave support to Linux
- Track: Hardware Enablement devroom
- Room: K.4.401
- Day: Sunday
- Start: 13:00
- End: 13:40
The SPI bus connects a master with one or more slave devices. So far, Linux always assumed the master role. In v4.13, Linux finally gained slave support. In this presentation, Geert will talk about adding SPI slave mode support to the existing SPI subsystem, and using a Linux system as an SPI slave. He will show what makes SPI special, and cover possible use cases and limitations of Linux-based SPI slave mode. Finally he will demonstrate how he modified Linux to add support for SPI slave mode.
The SPI (Serial Peripheral Interface) bus is ubiquitous in many (embedded) systems. Devices connected to an SPI bus have master and slave roles. Traditionally, the Linux kernel always assumed the SPI master role. In v3.19, Linux received i2c slave support. This sparked the question if Linux could ever become an SPI slave, controlled by an external SPI master, too. In v4.13, that question was finally answered with a "yes"; but not wholeheartedly. In this presentation, Geert will talk about adding SPI slave mode support to the existing SPI subsystem, and using a Linux system as an SPI slave. This can increase the roles and functionalities Linux can perform in embedded systems. Attendees can expect an overview of the SPI bus and the differences between SPI master and slave roles, and a comparison with other simple buses. They will understand the challenges of using Linux as an SPI slave, and can consider the implications when designing SPI protocols for use with Linux systems acting as an SPI slave. They will learn how to write SPI slave handlers for Linux, implementing the slave-side of an SPI protocol.
Speakers
Geert Uytterhoeven |