blob: 491fca944da52645c59c815c1208cd6b4e74e18e [file] [log] [blame]
Tom Rini10e47792018-05-06 17:58:06 -04001/* SPDX-License-Identifier: GPL-2.0+ */
Patil, Rachna5f70c512012-01-22 23:47:01 +00002/*
3 * (C) Copyright 2012
4 * Texas Instruments, <www.ti.com>
Patil, Rachna5f70c512012-01-22 23:47:01 +00005 */
Heiko Schocherf53f2b82013-10-22 11:03:18 +02006#ifndef _I2C_AM33XX_H_
7#define _I2C_AM33XX_H_
Patil, Rachna5f70c512012-01-22 23:47:01 +00008
9#define I2C_BASE1 0x44E0B000
10#define I2C_BASE2 0x4802A000
11#define I2C_BASE3 0x4819C000
Patil, Rachna5f70c512012-01-22 23:47:01 +000012
13#define I2C_DEFAULT_BASE I2C_BASE1
14
15struct i2c {
16 unsigned short revnb_lo; /* 0x00 */
17 unsigned short res1;
18 unsigned short revnb_hi; /* 0x04 */
Tom Rini0a5f44b2012-05-21 06:46:30 +000019 unsigned short res2[5];
20 unsigned short sysc; /* 0x10 */
21 unsigned short res3[9];
Patil, Rachna5f70c512012-01-22 23:47:01 +000022 unsigned short irqstatus_raw; /* 0x24 */
23 unsigned short res4;
24 unsigned short stat; /* 0x28 */
25 unsigned short res5;
26 unsigned short ie; /* 0x2C */
27 unsigned short res6;
28 unsigned short irqenable_clr; /* 0x30 */
29 unsigned short res7;
30 unsigned short iv; /* 0x34 */
31 unsigned short res8[45];
32 unsigned short syss; /* 0x90 */
33 unsigned short res9;
34 unsigned short buf; /* 0x94 */
35 unsigned short res10;
36 unsigned short cnt; /* 0x98 */
37 unsigned short res11;
38 unsigned short data; /* 0x9C */
39 unsigned short res13;
40 unsigned short res14; /* 0xA0 */
41 unsigned short res15;
42 unsigned short con; /* 0xA4 */
43 unsigned short res16;
44 unsigned short oa; /* 0xA8 */
45 unsigned short res17;
46 unsigned short sa; /* 0xAC */
47 unsigned short res18;
48 unsigned short psc; /* 0xB0 */
49 unsigned short res19;
50 unsigned short scll; /* 0xB4 */
51 unsigned short res20;
52 unsigned short sclh; /* 0xB8 */
53 unsigned short res21;
54 unsigned short systest; /* 0xBC */
55 unsigned short res22;
56 unsigned short bufstat; /* 0xC0 */
57 unsigned short res23;
58};
59
60#define I2C_IP_CLK 48000000
Tom Rini74349c62012-05-21 06:46:32 +000061#define I2C_INTERNAL_SAMPLING_CLK 12000000
Patil, Rachna5f70c512012-01-22 23:47:01 +000062
Heiko Schocherf53f2b82013-10-22 11:03:18 +020063#endif /* _I2C_AM33XX_H_ */