Hello team, my customer needs to implement a I2C communication on slave mode on DRA718. Do we have an example or instruction for that? He is running Android 8.
Regards,
Raul Matos
This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
Hello team, my customer needs to implement a I2C communication on slave mode on DRA718. Do we have an example or instruction for that? He is running Android 8.
Regards,
Raul Matos
Hi,
By default, the i2c slave mode is not supported by the driver.
What is the use case for acting as i2c slave?
Regards,
Nikhil D
They have an MCU which must initiate I2C communication. Is there any instructions on how to modify the driver?
Hi all,
TI SDK does not support the i2c slave mode in Linux driver. [1]
However, the i2c framework in the kernel has support for slave drivers.
You need to write an i2c slave driver and implement the callbacks which wil be triggered upon messages sent for the emulated slave.
[2] shows an example of this.
Important part if is the controller driver supports slave mode or not. [3] is reference implementation for slave controller driver.
You will have to read through TRM to understand how to confifure the i2c controller in slave mode and how to interpret the different slave events.
After writitng so much, I found there was an attempt to implement this, you can find the implementation for TI controller at [5]
[1] https://www.kernel.org/doc/html/latest/i2c/slave-interface.html
[2] https://github.com/torvalds/linux/blob/master/drivers/i2c/i2c-slave-eeprom.c
[3] https://elixir.bootlin.com/linux/v4.6/source/drivers/i2c/busses/i2c-rcar.c#L569
[5] https://patchwork.kernel.org/patch/9135441/
Regards,
Nikhil D
Hello Nikhil thank you very much for your support. i'll read all the links and digest alongside with customer, but it seems to me ref 5 will work just fine.