i2c.h 785 B

123456789101112131415161718192021222324252627282930313233
  1. /*
  2. * Copyright 2014 - Hans de Goede <hdegoede@redhat.com>
  3. *
  4. * SPDX-License-Identifier: GPL-2.0+
  5. */
  6. #ifndef _SUNXI_I2C_H_
  7. #define _SUNXI_I2C_H_
  8. #include <asm/arch/cpu.h>
  9. #ifdef CONFIG_I2C0_ENABLE
  10. #define CONFIG_I2C_MVTWSI_BASE0 SUNXI_TWI0_BASE
  11. #endif
  12. #ifdef CONFIG_I2C1_ENABLE
  13. #define CONFIG_I2C_MVTWSI_BASE1 SUNXI_TWI1_BASE
  14. #endif
  15. #ifdef CONFIG_I2C2_ENABLE
  16. #define CONFIG_I2C_MVTWSI_BASE2 SUNXI_TWI2_BASE
  17. #endif
  18. #ifdef CONFIG_I2C3_ENABLE
  19. #define CONFIG_I2C_MVTWSI_BASE3 SUNXI_TWI3_BASE
  20. #endif
  21. #ifdef CONFIG_I2C4_ENABLE
  22. #define CONFIG_I2C_MVTWSI_BASE4 SUNXI_TWI4_BASE
  23. #endif
  24. #ifdef CONFIG_R_I2C_ENABLE
  25. #define CONFIG_I2C_MVTWSI_BASE5 SUNXI_R_TWI_BASE
  26. #endif
  27. /* This is abp0-clk on sun4i/5i/7i / abp1-clk on sun6i/sun8i which is 24MHz */
  28. #define CONFIG_SYS_TCLK 24000000
  29. #endif