blob: 3918178d3a38c67a58aa657ec8ceeeb80c9d7e03 [file] [log] [blame]
Liam Beguinb61b6232017-03-14 11:24:44 -04001#ifndef _LPC32XX_I2C_H
2#define _LPC32XX_I2C_H
3
Liam Beguinb61b6232017-03-14 11:24:44 -04004#include <asm/types.h>
5
6/* i2c register set */
7struct 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 Opaniukf7c91762021-02-09 13:52:45 +020025#if CONFIG_IS_ENABLED(DM_I2C)
Liam Beguinb61b6232017-03-14 11:24:44 -040026enum {
27 I2C_0, I2C_1, I2C_2,
28};
29
30struct 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 */