FPGA, SoC, And CPLD Boards And Kits
FPGA Evaluation and Development Kits
5930 Discussions

Can I use the ARM i2c as a slave, using the normal driver?

SBrow5
Beginner
2,655 Views

I have an SOC Cyclone V FPGA, and I use i2c as a master, but I would like to use it as a slave so that I can use a different device to connect to multiple SOC chips and ask for data from them using i2c. Any help with DTS or drivers would be greatly appreciated.

Many thanks,

Simon

0 Kudos
4 Replies
Ahmed_H_Intel1
Employee
594 Views

Hello,

The I2C normally used to read data from a slave such as sensors. The ARM processor has no reading data to share with another host. Can you explain to me what you are looking for?

0 Kudos
SBrow5
Beginner
594 Views

Consider then, that the ARM is being used to process some data and is acting as a sensor for another device that is collating it. The Cyclone V Handbook, HPS Technical Reference Manual, section 20 describes the I2C port. It says "Each I2C controller must be programmed to operate in either master or slave mode only". The implication is I can use it as a slave, but I was wondering if the default driver that came with it under Linux supports slave mode, or is there an alternative driver that can be targetted using a different DTS/B?

0 Kudos
Ahmed_H_Intel1
Employee
594 Views

Why you are targeting only I2C? Is there a certain reason, you already have bridges between HPS and FPGA you can use to transfer data.

0 Kudos
Ahmed_H_Intel1
Employee
594 Views

Hi,

I see you want to use different device to pick the data, sorry for misunderstanding. Yes you can use the ARM as I2C slave to collect data from it. Or you can use it as a master and ask the ARM to send the required data once you trigger this.

Please check the following APP note AN706, which describes the steps required to route an HPS peripheral through the FPGA interface using Platform Designer (Standard) and Intel® Quartus® Prime Standard Edition software. A simple design example is included to demonstrate exporting HPS EMAC0 and I2C0 peripheral signals to the FPGA interface using a Cyclone V SoC Development Kit. 

https://www.intel.com/content/dam/www/programmable/us/en/pdfs/literature/an/an706.pdf

 

0 Kudos
Reply