mentor_i2c_plat.h 732 B

123456789101112131415161718192021222324252627282930313233
  1. /*
  2. * Copyright (C) 2018 Marvell International Ltd.
  3. *
  4. * SPDX-License-Identifier: BSD-3-Clause
  5. * https://spdx.org/licenses
  6. */
  7. /* This driver provides I2C support for Marvell A8K and compatible SoCs */
  8. #ifndef MENTOR_I2C_PLAT_H
  9. #define MENTOR_I2C_PLAT_H
  10. #define CONFIG_SYS_TCLK 250000000
  11. #define CONFIG_SYS_I2C_SPEED 100000
  12. #define CONFIG_SYS_I2C_SLAVE 0x0
  13. #define I2C_CAN_UNSTUCK
  14. struct mentor_i2c_regs {
  15. uint32_t slave_address;
  16. uint32_t data;
  17. uint32_t control;
  18. union {
  19. uint32_t status; /* when reading */
  20. uint32_t baudrate; /* when writing */
  21. };
  22. uint32_t xtnd_slave_addr;
  23. uint32_t reserved[2];
  24. uint32_t soft_reset;
  25. uint8_t reserved2[0xa0 - 0x20];
  26. uint32_t unstuck;
  27. };
  28. #endif /* MENTOR_I2C_PLAT_H */