mentor_i2c_plat.h 607 Bytes
Newer Older
Icenowy Zheng's avatar
Icenowy Zheng committed
1
2
3
4
5
6
7
8
/*
 * Copyright (C) 2018 Icenowy Zheng <icenowy@aosc.io>
 *
 * SPDX-License-Identifier:     BSD-3-Clause
 * https://spdx.org/licenses
 */
/* This driver provides I2C support for Allwinner sunXi SoCs */

9
10
#ifndef MENTOR_I2C_PLAT_H
#define MENTOR_I2C_PLAT_H
Icenowy Zheng's avatar
Icenowy Zheng committed
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27

#define CONFIG_SYS_TCLK			24000000
#define CONFIG_SYS_I2C_SPEED		100000
#define CONFIG_SYS_I2C_SLAVE		0

#define I2C_INTERRUPT_CLEAR_INVERTED

struct  mentor_i2c_regs {
	uint32_t slave_address;
	uint32_t xtnd_slave_addr;
	uint32_t data;
	uint32_t control;
	uint32_t status;
	uint32_t baudrate;
	uint32_t soft_reset;
};

28
#endif /* MENTOR_I2C_PLAT_H */