
This driver has been tested on HiFive Unleashed with a PMOD based RTCC sensor connected to I2C pins J1 header of the board.
This series is available here [1] for testing [1] https://github.com/pragnesh26992/u-boot/tree/i2c
Tested-by: Sagar Shrikant Kadam sagar.kadam@sifive.com
U-Boot Logs for reference:
Hit any key to stop autoboot: 0 => i2c dev 0 Setting bus to 0 => i2c probe Valid chip addresses: 57 6F => i2c md 0x57 0x0 1 0000: ff => i2c mw 0x57 0x0 0xa5 1 => i2c md 0x57 0x0 1 0000: a5 => i2c md 0x6f 0x0 1 0000: 00 => i2c md 0x6f 0x1 1 0001: 00 => i2c md 0x6f 0x2 1 0002: 00 => i2c md 0x6f 0x20 1 0020: 98 => i2c md 0x6f 0x5f 1 005f: 55 => i2c mw 0x6f 0x0 0x12 1 => i2c mw 0x6f 0x1 0x34 1 => i2c mw 0x6f 0x2 0x56 1 => i2c md 0x6f 0x0 1 0000: 12 => i2c md 0x6f 0x1 1 0001: 34 => i2c md 0x6f 0x2 1 0002: 56 => i2c mw 0x6f 0x20 0x78 1 => i2c md 0x6f 0x20 1 0020: 78 => i2c mw 0x6f 0x5f 0x5a 1 => i2c md 0x6f 0x5f 1 005f: 5a => i2c mw 0x6f 0x5f 0xa5 1 => i2c md 0x6f 0x5f 1 005f: a5
Pragnesh Patel (2): i2c: ocores: add i2c driver for OpenCores I2C controller riscv: sifive/fu540: kconfig: Enable support for Opencores I2C controller
arch/riscv/cpu/fu540/Kconfig | 2 + board/sifive/fu540/Kconfig | 1 + drivers/i2c/Kconfig | 7 + drivers/i2c/Makefile | 1 + drivers/i2c/ocores_i2c.c | 638 +++++++++++++++++++++++++++++++++++ 5 files changed, 649 insertions(+) create mode 100644 drivers/i2c/ocores_i2c.c