Programmable Devices
CPLDs, FPGAs, SoC FPGAs, Configuration, and Transceivers
20703 Discussions

Looking for I2C drivers info for the Arrow SoCkit.

Altera_Forum
Honored Contributor II
958 Views

Hi all, 

 

Yes, this is my first project working with the SoCkit, and my first time with Linux as well so I’ve got a lot to learn. I’ve gone through the HW and SW labs, and can boot Linux and attach and run the DS-5 debugger etc. But I haven’t been able to find documentation on how to communicate with the I2c drivers built into the kernel. I don’t want to have to write my own drivers (nor do I think I have to). I’ve looked all over rocketboards.org, Yocto project and Altera’s HWLIB documentation (and many many more Google dead ends). I know there must be a gold mine of information somewhere, or nobody would ever get anything done, but I’m digging in the wrong places. Or maybe I’m looking right at the answer’s but I’m just not seeing them.  

 

I’m using the Poky 8.0 (Yocto Project 1.3 Reference Distro) 1.3 socfpga_cyclone5 kernel. 

 

I did manage to talk to the G-Sensor on the board using straight I2C ioctl/read/write functions:  

 

1) ioctl(file, I2C_SLAVE, chipAddr) // open file 

2) write(file, buf, 1) // send read command/address 

3) read(file, buf, byteCount) // read data 

 

But this sequences sends a stop-bit between the steps, and the part I’m trying to talk to (an LTC2977 device through the LTC connector) uses the PMBus protocol which is very close to I2C (and SMbus) protocol, but when reading a register I can’t issue a stop-bit after sending the read command or the part won’t respond. 

 

I know the kernel I'm using already has what is needed to talk to this bus, because if I use the i2cdump on the command line, it reads the part fine.  

 

Questions are, where is the source code for i2cdump and how can my user space application access the same driver, and most importantly, where can I find that documentation gold mine so I don’t have to ask the same question when I move on to the SPI bus next. 

 

Thanks!
0 Kudos
0 Replies
Reply