Icenowy Zheng | 3098d9a | 2018-07-22 21:29:02 +0800 | [diff] [blame] | 1 | /* |
| 2 | * Copyright (C) 2018 Icenowy Zheng <icenowy@aosc.io> |
| 3 | * |
| 4 | * SPDX-License-Identifier: BSD-3-Clause |
| 5 | * https://spdx.org/licenses |
| 6 | */ |
Icenowy Zheng | 3098d9a | 2018-07-22 21:29:02 +0800 | [diff] [blame] | 7 | /* This driver provides I2C support for Allwinner sunXi SoCs */ |
| 8 | |
Andre Przywara | eeeba25 | 2018-09-09 01:39:57 +0100 | [diff] [blame^] | 9 | #ifndef SUNXI_I2C_H |
| 10 | #define SUNXI_I2C_H |
Icenowy Zheng | 3098d9a | 2018-07-22 21:29:02 +0800 | [diff] [blame] | 11 | |
| 12 | #define CONFIG_SYS_TCLK 24000000 |
| 13 | #define CONFIG_SYS_I2C_SPEED 100000 |
| 14 | #define CONFIG_SYS_I2C_SLAVE 0 |
| 15 | |
| 16 | #define I2C_INTERRUPT_CLEAR_INVERTED |
| 17 | |
| 18 | struct mentor_i2c_regs { |
| 19 | uint32_t slave_address; |
| 20 | uint32_t xtnd_slave_addr; |
| 21 | uint32_t data; |
| 22 | uint32_t control; |
| 23 | uint32_t status; |
| 24 | uint32_t baudrate; |
| 25 | uint32_t soft_reset; |
| 26 | }; |
| 27 | |
Andre Przywara | eeeba25 | 2018-09-09 01:39:57 +0100 | [diff] [blame^] | 28 | #endif |