mentor_i2c_plat.h 607 B

12345678910111213141516171819202122232425262728
  1. /*
  2. * Copyright (C) 2018 Icenowy Zheng <icenowy@aosc.io>
  3. *
  4. * SPDX-License-Identifier: BSD-3-Clause
  5. * https://spdx.org/licenses
  6. */
  7. /* This driver provides I2C support for Allwinner sunXi SoCs */
  8. #ifndef MENTOR_I2C_PLAT_H
  9. #define MENTOR_I2C_PLAT_H
  10. #define CONFIG_SYS_TCLK 24000000
  11. #define CONFIG_SYS_I2C_SPEED 100000
  12. #define CONFIG_SYS_I2C_SLAVE 0
  13. #define I2C_INTERRUPT_CLEAR_INVERTED
  14. struct mentor_i2c_regs {
  15. uint32_t slave_address;
  16. uint32_t xtnd_slave_addr;
  17. uint32_t data;
  18. uint32_t control;
  19. uint32_t status;
  20. uint32_t baudrate;
  21. uint32_t soft_reset;
  22. };
  23. #endif /* MENTOR_I2C_PLAT_H */