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