rk3288: Add software I2C support

Hardware / Coreboot - Julius Werner [chromium.org] - 17 April 2015 02:59 UTC

This patch adds the necessary platform glue to allow the use of software-driven I2C bit banging on the RK3288. This is just a debugging feature that can be used to reproduce certain I2C failure cases.

Also fix Makefile verstage linking for the feature and add some new rk3288 IOMUX macros as needed.

BRANCH=None BUG=None TEST=Added "CONFIG_SOFTWARE_I2C=y" to configs/config.veyron_jerry, wrapped Jerry's bootblock and verstage in software_i2c_attach/detach() calls, confirmed that both PMIC and TPM could be driven correctly with software I2C driver. Tried out different combinations of software_i2c_wedge_ack() and software_i2c_wedge_read() on the PMIC and observed transfer results with the hardware controller after reboot... the worst that would happen is that the first register read-modify-write (DCDC_ILMAX) would fail to read, but all later transfers would be fine. Since that register is written twice (due to current BUCK1 ramp implementation) and is not terribily important anyway, I think we don't need to worry about wedging problems.

Change-Id: Iba801ee61d30fb1fd3aef8300612c67fa50c441b

7f70ad6 rk3288: Add software I2C support
src/device/Makefile.inc | 1 +
src/soc/rockchip/rk3288/Makefile.inc | 4 +
src/soc/rockchip/rk3288/include/soc/grf.h | 7 +-
src/soc/rockchip/rk3288/include/soc/i2c.h | 2 +
src/soc/rockchip/rk3288/software_i2c.c | 137 +++++++++++++++++++++++++++++
5 files changed, 150 insertions(+), 1 deletion(-)

Upstream: review.coreboot.org


  • Share