Tom Rini | 10e4779 | 2018-05-06 17:58:06 -0400 | [diff] [blame] | 1 | /* SPDX-License-Identifier: GPL-2.0+ */ |
Hans de Goede | 3352b22 | 2014-06-13 22:55:49 +0200 | [diff] [blame] | 2 | /* |
| 3 | * Copyright 2014 - Hans de Goede <hdegoede@redhat.com> |
Hans de Goede | 3352b22 | 2014-06-13 22:55:49 +0200 | [diff] [blame] | 4 | */ |
| 5 | #ifndef _SUNXI_I2C_H_ |
| 6 | #define _SUNXI_I2C_H_ |
| 7 | |
| 8 | #include <asm/arch/cpu.h> |
| 9 | |
Paul Kocialkowski | 0a3ec0a | 2015-04-10 23:09:52 +0200 | [diff] [blame] | 10 | #ifdef CONFIG_I2C0_ENABLE |
Tom Rini | c188ed4 | 2022-12-04 10:04:09 -0500 | [diff] [blame] | 11 | #define CFG_I2C_MVTWSI_BASE0 SUNXI_TWI0_BASE |
Paul Kocialkowski | 0a3ec0a | 2015-04-10 23:09:52 +0200 | [diff] [blame] | 12 | #endif |
| 13 | #ifdef CONFIG_I2C1_ENABLE |
Tom Rini | 34e4e86 | 2022-12-04 10:04:10 -0500 | [diff] [blame] | 14 | #define CFG_I2C_MVTWSI_BASE1 SUNXI_TWI1_BASE |
Paul Kocialkowski | 0a3ec0a | 2015-04-10 23:09:52 +0200 | [diff] [blame] | 15 | #endif |
Jelle van der Waa | 8d3d7c1 | 2016-01-14 14:06:26 +0100 | [diff] [blame] | 16 | #ifdef CONFIG_R_I2C_ENABLE |
Tom Rini | 364d002 | 2023-01-10 11:19:45 -0500 | [diff] [blame] | 17 | #define CFG_I2C_MVTWSI_BASE2 SUNXI_R_TWI_BASE |
Jelle van der Waa | 8d3d7c1 | 2016-01-14 14:06:26 +0100 | [diff] [blame] | 18 | #endif |
Paul Kocialkowski | 0a3ec0a | 2015-04-10 23:09:52 +0200 | [diff] [blame] | 19 | |
Hans de Goede | 3352b22 | 2014-06-13 22:55:49 +0200 | [diff] [blame] | 20 | /* This is abp0-clk on sun4i/5i/7i / abp1-clk on sun6i/sun8i which is 24MHz */ |
Tom Rini | 6a5dccc | 2022-11-16 13:10:41 -0500 | [diff] [blame] | 21 | #define CFG_SYS_TCLK 24000000 |
Hans de Goede | 3352b22 | 2014-06-13 22:55:49 +0200 | [diff] [blame] | 22 | |
| 23 | #endif |