Skip to content

RFC drivers: i2c: FSI-attached I2C master algorithm

Eddie James openbmc 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 RFC Latest0 of 4 patches 4 repliesIn review

Patches in v1 No applies recorded yet

None of the 4 patches the cover letter announces are in this archive.

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

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

From: "Edward A. James" <[email protected]>

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 devices?

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
Signature · 1 line
1.8.3.1