16620377eSHans de Goede /* 26620377eSHans de Goede * Copyright 2014 - Hans de Goede <hdegoede@redhat.com> 36620377eSHans de Goede * 46620377eSHans de Goede * SPDX-License-Identifier: GPL-2.0+ 56620377eSHans de Goede */ 66620377eSHans de Goede #ifndef _SUNXI_I2C_H_ 76620377eSHans de Goede #define _SUNXI_I2C_H_ 86620377eSHans de Goede 96620377eSHans de Goede #include <asm/arch/cpu.h> 106620377eSHans de Goede 116c739c5dSPaul Kocialkowski #ifdef CONFIG_I2C0_ENABLE 12dd82242bSPaul Kocialkowski #define CONFIG_I2C_MVTWSI_BASE0 SUNXI_TWI0_BASE 136c739c5dSPaul Kocialkowski #endif 146c739c5dSPaul Kocialkowski #ifdef CONFIG_I2C1_ENABLE 156c739c5dSPaul Kocialkowski #define CONFIG_I2C_MVTWSI_BASE1 SUNXI_TWI1_BASE 166c739c5dSPaul Kocialkowski #endif 176c739c5dSPaul Kocialkowski #ifdef CONFIG_I2C2_ENABLE 186c739c5dSPaul Kocialkowski #define CONFIG_I2C_MVTWSI_BASE2 SUNXI_TWI2_BASE 196c739c5dSPaul Kocialkowski #endif 206c739c5dSPaul Kocialkowski #ifdef CONFIG_I2C3_ENABLE 216c739c5dSPaul Kocialkowski #define CONFIG_I2C_MVTWSI_BASE3 SUNXI_TWI3_BASE 226c739c5dSPaul Kocialkowski #endif 236c739c5dSPaul Kocialkowski #ifdef CONFIG_I2C4_ENABLE 246c739c5dSPaul Kocialkowski #define CONFIG_I2C_MVTWSI_BASE4 SUNXI_TWI4_BASE 256c739c5dSPaul Kocialkowski #endif 26*9d082687SJelle van der Waa #ifdef CONFIG_R_I2C_ENABLE 27*9d082687SJelle van der Waa #define CONFIG_I2C_MVTWSI_BASE5 SUNXI_R_TWI_BASE 28*9d082687SJelle van der Waa #endif 296c739c5dSPaul Kocialkowski 306620377eSHans de Goede /* This is abp0-clk on sun4i/5i/7i / abp1-clk on sun6i/sun8i which is 24MHz */ 316620377eSHans de Goede #define CONFIG_SYS_TCLK 24000000 326620377eSHans de Goede 336620377eSHans de Goede #endif 34