1 /* SPDX-License-Identifier: GPL-2.0+ */
2 /*
3  * (C) Copyright 2012
4  * Texas Instruments, <www.ti.com>
5  */
6 #ifndef _I2C_AM33XX_H_
7 #define _I2C_AM33XX_H_
8 
9 #define  I2C_BASE1		0x44E0B000
10 #define  I2C_BASE2		0x4802A000
11 #define  I2C_BASE3		0x4819C000
12 
13 #define I2C_DEFAULT_BASE		I2C_BASE1
14 
15 struct i2c {
16 	unsigned short revnb_lo;        /* 0x00 */
17 	unsigned short res1;
18 	unsigned short revnb_hi;        /* 0x04 */
19 	unsigned short res2[5];
20 	unsigned short sysc;		/* 0x10 */
21 	unsigned short res3[9];
22 	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
61 #define I2C_INTERNAL_SAMPLING_CLK	12000000
62 
63 #endif /* _I2C_AM33XX_H_ */
64