Liam Beguin | b61b623 | 2017-03-14 11:24:44 -0400 | [diff] [blame] | 1 | #ifndef _LPC32XX_I2C_H |
| 2 | #define _LPC32XX_I2C_H |
| 3 | |
Liam Beguin | b61b623 | 2017-03-14 11:24:44 -0400 | [diff] [blame] | 4 | #include <asm/types.h> |
| 5 | |
| 6 | /* i2c register set */ |
| 7 | struct lpc32xx_i2c_base { |
| 8 | union { |
| 9 | u32 rx; |
| 10 | u32 tx; |
| 11 | }; |
| 12 | u32 stat; |
| 13 | u32 ctrl; |
| 14 | u32 clk_hi; |
| 15 | u32 clk_lo; |
| 16 | u32 adr; |
| 17 | u32 rxfl; |
| 18 | u32 txfl; |
| 19 | u32 rxb; |
| 20 | u32 txb; |
| 21 | u32 stx; |
| 22 | u32 stxfl; |
| 23 | }; |
| 24 | |
Igor Opaniuk | f7c9176 | 2021-02-09 13:52:45 +0200 | [diff] [blame^] | 25 | #if CONFIG_IS_ENABLED(DM_I2C) |
Liam Beguin | b61b623 | 2017-03-14 11:24:44 -0400 | [diff] [blame] | 26 | enum { |
| 27 | I2C_0, I2C_1, I2C_2, |
| 28 | }; |
| 29 | |
| 30 | struct lpc32xx_i2c_dev { |
| 31 | struct lpc32xx_i2c_base *base; |
| 32 | int index; |
| 33 | uint speed; |
| 34 | }; |
| 35 | #endif /* CONFIG_DM_I2C */ |
| 36 | #endif /* _LPC32XX_I2C_H */ |