[RFC linux dev-4.7 0/4] drivers: i2c: FSI-attached I2C master algorithm

Eddie James eajames at linux.vnet.ibm.com
Sat Mar 11 08:48:21 AEDT 2017

From: "Edward A. James" <eajames at us.ibm.com>

This patch series adds an I2C bus algorithm to drive the I2C master located on
POWER CPUs. The master is accessed over FSI bus from the service processor.

The driver is functional for some basic read/write ops. There are a couple of
details regarding the device tree and chardev entries that need working out.

Mainly, do we want a char device for each port? There are 15 ports off one P9
master, so that'll be a lot of /dev/i2c-<x> entries. One issue is that
i2c_add_adapter always names it's device i2c-%d, regardless of adapter name.
Furthermore, you can specify the number to label it with
i2c_add_numbered_adapter, but how to prevent collisions with regular i2c

The driver will currently set up one chardev for each master (each proc).
The port is then specified by hacking the addr field of i2c_msg. It works,
but not a clean solution.

FSI clocking details are not defined in the device tree, so FSI clock is
hardcoded for now.

Edward A. James (4):
  drivers: fsi: Add function to get FSI clock rate
  drivers: i2c: Add FSI-attached I2C master algorithm
  drivers: i2c: Add transfer implementation for FSI algorithm
  drivers: i2c: Add bus recovery for FSI algorithm

 drivers/Makefile             |   2 +-
 drivers/fsi/fsi-core.c       |   7 +
 drivers/i2c/busses/Kconfig   |  11 +
 drivers/i2c/busses/Makefile  |   1 +
 drivers/i2c/busses/i2c-fsi.c | 608 +++++++++++++++++++++++++++++++++++++++++++
 include/linux/fsi.h          |   1 +
 6 files changed, 629 insertions(+), 1 deletion(-)
 create mode 100644 drivers/i2c/busses/i2c-fsi.c


More information about the openbmc mailing list