mbox series

[v3,0/2] Add OpenCores I2C controller driver

Message ID 20201114091235.11933-1-pragnesh.patel@sifive.com
Headers show
Series Add OpenCores I2C controller driver | expand

Message

Pragnesh Patel Nov. 14, 2020, 9:12 a.m. UTC
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>

Changes in v3:
- Rebase to master and add missing #include <dm/device_compat.h>

Changes in v2:
- Remove TYPE_SIFIVE_REV0 flag
- Update the Opencores I2C Controller Link

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: a5    .
=> i2c mw 0x57 0x0 0x5a 1
=> i2c md 0x57 0x0 1
0000: 5a    Z
=> i2c md 0x57 0x2 1
0002: 99    .
=> i2c mw 0x57 0x2 0xa9 1
=> i2c md 0x57 0x2 1
0002: a9    .
=> i2c md 0x6f 0x20 1
0020: 5a    Z
=> i2c md 0x6f 0x5f 1
005f: a5    .
=> i2c mw 0x6f 0x20 0xa9 1
=> i2c mw 0x6f 0x5f 0xa9 1
=> i2c md 0x6f 0x20 1
0020: a9    .
=> i2c md 0x6f 0x5f 1
005f: a9    .
=>

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     | 637 +++++++++++++++++++++++++++++++++++
 5 files changed, 648 insertions(+)
 create mode 100644 drivers/i2c/ocores_i2c.c

Comments

Heiko Schocher Nov. 28, 2020, 3:15 p.m. UTC | #1
Hello Pragnesh,

Am 14.11.20 um 10:12 schrieb Pragnesh Patel:
> 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>
> 
> Changes in v3:
> - Rebase to master and add missing #include <dm/device_compat.h>
> 
> Changes in v2:
> - Remove TYPE_SIFIVE_REV0 flag
> - Update the Opencores I2C Controller Link
> 
> 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: a5    .
> => i2c mw 0x57 0x0 0x5a 1
> => i2c md 0x57 0x0 1
> 0000: 5a    Z
> => i2c md 0x57 0x2 1
> 0002: 99    .
> => i2c mw 0x57 0x2 0xa9 1
> => i2c md 0x57 0x2 1
> 0002: a9    .
> => i2c md 0x6f 0x20 1
> 0020: 5a    Z
> => i2c md 0x6f 0x5f 1
> 005f: a5    .
> => i2c mw 0x6f 0x20 0xa9 1
> => i2c mw 0x6f 0x5f 0xa9 1
> => i2c md 0x6f 0x20 1
> 0020: a9    .
> => i2c md 0x6f 0x5f 1
> 005f: a9    .
> =>
> 
> 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     | 637 +++++++++++++++++++++++++++++++++++
>  5 files changed, 648 insertions(+)
>  create mode 100644 drivers/i2c/ocores_i2c.c

Series applied to u-boot-i2c

Thanks!

bye,
Heiko