blob: 8642c8f8722acfc22eee7f6d88e2313810c404ce [file] [log] [blame]
Patil, Rachnab4116ed2012-01-22 23:47:01 +00001/*
2 * (C) Copyright 2012
3 * Texas Instruments, <www.ti.com>
4 *
Wolfgang Denk1a459662013-07-08 09:37:19 +02005 * SPDX-License-Identifier: GPL-2.0+
Patil, Rachnab4116ed2012-01-22 23:47:01 +00006 */
Heiko Schocher6789e842013-10-22 11:03:18 +02007#ifndef _I2C_AM33XX_H_
8#define _I2C_AM33XX_H_
Patil, Rachnab4116ed2012-01-22 23:47:01 +00009
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; /* 0x00 */
19 unsigned short res1;
20 unsigned short revnb_hi; /* 0x04 */
Tom Rinife4f97b2012-05-21 06:46:30 +000021 unsigned short res2[5];
22 unsigned short sysc; /* 0x10 */
23 unsigned short res3[9];
Patil, Rachnab4116ed2012-01-22 23:47:01 +000024 unsigned short irqstatus_raw; /* 0x24 */
25 unsigned short res4;
26 unsigned short stat; /* 0x28 */
27 unsigned short res5;
28 unsigned short ie; /* 0x2C */
29 unsigned short res6;
30 unsigned short irqenable_clr; /* 0x30 */
31 unsigned short res7;
32 unsigned short iv; /* 0x34 */
33 unsigned short res8[45];
34 unsigned short syss; /* 0x90 */
35 unsigned short res9;
36 unsigned short buf; /* 0x94 */
37 unsigned short res10;
38 unsigned short cnt; /* 0x98 */
39 unsigned short res11;
40 unsigned short data; /* 0x9C */
41 unsigned short res13;
42 unsigned short res14; /* 0xA0 */
43 unsigned short res15;
44 unsigned short con; /* 0xA4 */
45 unsigned short res16;
46 unsigned short oa; /* 0xA8 */
47 unsigned short res17;
48 unsigned short sa; /* 0xAC */
49 unsigned short res18;
50 unsigned short psc; /* 0xB0 */
51 unsigned short res19;
52 unsigned short scll; /* 0xB4 */
53 unsigned short res20;
54 unsigned short sclh; /* 0xB8 */
55 unsigned short res21;
56 unsigned short systest; /* 0xBC */
57 unsigned short res22;
58 unsigned short bufstat; /* 0xC0 */
59 unsigned short res23;
60};
61
62#define I2C_IP_CLK 48000000
Tom Rini65c206b2012-05-21 06:46:32 +000063#define I2C_INTERNAL_SAMPLING_CLK 12000000
Patil, Rachnab4116ed2012-01-22 23:47:01 +000064
Heiko Schocher6789e842013-10-22 11:03:18 +020065#endif /* _I2C_AM33XX_H_ */