Patil, Rachna | 5f70c51 | 2012-01-22 23:47:01 +0000 | [diff] [blame] | 1 | /* |
| 2 | * (C) Copyright 2012 |
| 3 | * Texas Instruments, <www.ti.com> |
| 4 | * |
Wolfgang Denk | d79de1d | 2013-07-08 09:37:19 +0200 | [diff] [blame] | 5 | * SPDX-License-Identifier: GPL-2.0+ |
Patil, Rachna | 5f70c51 | 2012-01-22 23:47:01 +0000 | [diff] [blame] | 6 | */ |
Heiko Schocher | f53f2b8 | 2013-10-22 11:03:18 +0200 | [diff] [blame] | 7 | #ifndef _I2C_AM33XX_H_ |
| 8 | #define _I2C_AM33XX_H_ |
Patil, Rachna | 5f70c51 | 2012-01-22 23:47:01 +0000 | [diff] [blame] | 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 | |
| 17 | struct i2c { |
| 18 | unsigned short revnb_lo; /* 0x00 */ |
| 19 | unsigned short res1; |
| 20 | unsigned short revnb_hi; /* 0x04 */ |
Tom Rini | 0a5f44b | 2012-05-21 06:46:30 +0000 | [diff] [blame] | 21 | unsigned short res2[5]; |
| 22 | unsigned short sysc; /* 0x10 */ |
| 23 | unsigned short res3[9]; |
Patil, Rachna | 5f70c51 | 2012-01-22 23:47:01 +0000 | [diff] [blame] | 24 | 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 Rini | 74349c6 | 2012-05-21 06:46:32 +0000 | [diff] [blame] | 63 | #define I2C_INTERNAL_SAMPLING_CLK 12000000 |
Patil, Rachna | 5f70c51 | 2012-01-22 23:47:01 +0000 | [diff] [blame] | 64 | |
Heiko Schocher | f53f2b8 | 2013-10-22 11:03:18 +0200 | [diff] [blame] | 65 | #endif /* _I2C_AM33XX_H_ */ |