Looking for I2C slave driver example with Cyclone V SoC I2C controller


My customer wants to use the I2C controller as the I2C slave mode.
Is there any driver example?
Thanks a lot.


Hello @Manda,
You can get information about writing driver for I2C controller with slave mode ability at Linux Kernel source: https://elixir.bootlin.com/linux/latest/source/Documentation/i2c/slave-interface.
Moreover, if You need to use I2C controller at HPS of Cyclone V/Arria V (and may others SoCs too), its driver is already ready to use it in slave mode: https://elixir.bootlin.com/linux/latest/source/drivers/i2c/busses/i2c-designware-slave.c.
Hope it will help You a little.
Best wishes.
Yours Jan Konečný.

Hi Jan Konecny,

Thanks a lot for your help!
It is very useful.


1 Like