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