Home | History | Annotate | Download | only in arch-lpc32xx
      1 #ifndef _LPC32XX_I2C_H
      2 #define _LPC32XX_I2C_H
      3 
      4 #include <common.h>
      5 #include <asm/types.h>
      6 
      7 /* i2c register set */
      8 struct lpc32xx_i2c_base {
      9 	union {
     10 		u32 rx;
     11 		u32 tx;
     12 	};
     13 	u32 stat;
     14 	u32 ctrl;
     15 	u32 clk_hi;
     16 	u32 clk_lo;
     17 	u32 adr;
     18 	u32 rxfl;
     19 	u32 txfl;
     20 	u32 rxb;
     21 	u32 txb;
     22 	u32 stx;
     23 	u32 stxfl;
     24 };
     25 
     26 #ifdef CONFIG_DM_I2C
     27 enum {
     28 	I2C_0, I2C_1, I2C_2,
     29 };
     30 
     31 struct lpc32xx_i2c_dev {
     32 	struct lpc32xx_i2c_base *base;
     33 	int index;
     34 	uint speed;
     35 };
     36 #endif /* CONFIG_DM_I2C */
     37 #endif /* _LPC32XX_I2C_H */
     38