i2c-mlxcpld.rst 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. ==================
  2. Driver i2c-mlxcpld
  3. ==================
  4. Author: Michael Shych <[email protected]>
  5. This is the Mellanox I2C controller logic, implemented in Lattice CPLD
  6. device.
  7. Device supports:
  8. - Master mode.
  9. - One physical bus.
  10. - Polling mode.
  11. This controller is equipped within the next Mellanox systems:
  12. "msx6710", "msx6720", "msb7700", "msn2700", "msx1410", "msn2410", "msb7800",
  13. "msn2740", "msn2100".
  14. The next transaction types are supported:
  15. - Receive Byte/Block.
  16. - Send Byte/Block.
  17. - Read Byte/Block.
  18. - Write Byte/Block.
  19. Registers:
  20. =============== === =======================================================================
  21. CPBLTY 0x0 - capability reg.
  22. Bits [6:5] - transaction length. b01 - 72B is supported,
  23. 36B in other case.
  24. Bit 7 - SMBus block read support.
  25. CTRL 0x1 - control reg.
  26. Resets all the registers.
  27. HALF_CYC 0x4 - cycle reg.
  28. Configure the width of I2C SCL half clock cycle (in 4 LPC_CLK
  29. units).
  30. I2C_HOLD 0x5 - hold reg.
  31. OE (output enable) is delayed by value set to this register
  32. (in LPC_CLK units)
  33. CMD 0x6 - command reg.
  34. Bit 0, 0 = write, 1 = read.
  35. Bits [7:1] - the 7bit Address of the I2C device.
  36. It should be written last as it triggers an I2C transaction.
  37. NUM_DATA 0x7 - data size reg.
  38. Number of data bytes to write in read transaction
  39. NUM_ADDR 0x8 - address reg.
  40. Number of address bytes to write in read transaction.
  41. STATUS 0x9 - status reg.
  42. Bit 0 - transaction is completed.
  43. Bit 4 - ACK/NACK.
  44. DATAx 0xa - 0x54 - 68 bytes data buffer regs.
  45. For write transaction address is specified in four first bytes
  46. (DATA1 - DATA4), data starting from DATA4.
  47. For read transactions address is sent in a separate transaction and
  48. specified in the four first bytes (DATA0 - DATA3). Data is read
  49. starting from DATA0.
  50. =============== === =======================================================================