1
2
3
4
5
6
7#ifndef _I2C_AM33XX_H_
8#define _I2C_AM33XX_H_
9
10#define I2C_BASE1 0x44E0B000
11#define I2C_BASE2 0x4802A000
12#define I2C_BASE3 0x4819C000
13
14#define I2C_DEFAULT_BASE I2C_BASE1
15
16struct i2c {
17 unsigned short revnb_lo;
18 unsigned short res1;
19 unsigned short revnb_hi;
20 unsigned short res2[5];
21 unsigned short sysc;
22 unsigned short res3[9];
23 unsigned short irqstatus_raw;
24 unsigned short res4;
25 unsigned short stat;
26 unsigned short res5;
27 unsigned short ie;
28 unsigned short res6;
29 unsigned short irqenable_clr;
30 unsigned short res7;
31 unsigned short iv;
32 unsigned short res8[45];
33 unsigned short syss;
34 unsigned short res9;
35 unsigned short buf;
36 unsigned short res10;
37 unsigned short cnt;
38 unsigned short res11;
39 unsigned short data;
40 unsigned short res13;
41 unsigned short res14;
42 unsigned short res15;
43 unsigned short con;
44 unsigned short res16;
45 unsigned short oa;
46 unsigned short res17;
47 unsigned short sa;
48 unsigned short res18;
49 unsigned short psc;
50 unsigned short res19;
51 unsigned short scll;
52 unsigned short res20;
53 unsigned short sclh;
54 unsigned short res21;
55 unsigned short systest;
56 unsigned short res22;
57 unsigned short bufstat;
58 unsigned short res23;
59};
60
61#define I2C_IP_CLK 48000000
62#define I2C_INTERNAL_SAMPLING_CLK 12000000
63
64#endif
65