[PATCH 06/27] dm: powerpc: P1020: add i2c DM support

Biwen Li biwen.li at nxp.com
Thu Apr 16 10:52:02 CEST 2020


> >--- a/include/configs/p1_p2_rdb_pc.h
> >+++ b/include/configs/p1_p2_rdb_pc.h
> >@@ -1,6 +1,7 @@
> > /* SPDX-License-Identifier: GPL-2.0+ */
> > /*
> >  * Copyright 2010-2011 Freescale Semiconductor, Inc.
> >+ * Copyright 2020 NXP
> >  */
> >
> > /*
> >@@ -546,6 +547,12 @@
> > #define CONFIG_SYS_FSL_I2C2_SLAVE	0x7F
> > #define CONFIG_SYS_FSL_I2C2_OFFSET	0x3100
> > #define CONFIG_SYS_I2C_NOPROBES		{ {0, 0x29} }
> >+#else
> >+#define CONFIG_I2C_SET_DEFAULT_BUS_NUM
> >+#define CONFIG_I2C_DEFAULT_BUS_NUMBER	0
> >+#endif
> Biwen,
> 
> One thing I missed earlier, where is corresponding #ifdef
Yeah, I missed #ifndef,
/* I2C */
#ifndef CONFIG_DM_I2C
#define CONFIG_SYS_I2C
#define CONFIG_SYS_I2C_FSL
#define CONFIG_SYS_FSL_I2C_SPEED	400000
#define CONFIG_SYS_FSL_I2C_SLAVE	0x7F
#define CONFIG_SYS_FSL_I2C_OFFSET	0x3000
#define CONFIG_SYS_FSL_I2C2_SPEED	400000
#define CONFIG_SYS_FSL_I2C2_SLAVE	0x7F
#define CONFIG_SYS_FSL_I2C2_OFFSET	0x3100
#define CONFIG_SYS_I2C_NOPROBES		{ {0, 0x29} }
#else
#define CONFIG_I2C_SET_DEFAULT_BUS_NUM
#define CONFIG_I2C_DEFAULT_BUS_NUMBER	0
#endif

#define CONFIG_SYS_I2C_FSL
> 
> Regards
> Priyanka
> >+
> >+#define CONFIG_SYS_I2C_FSL
> > #define CONFIG_SYS_I2C_EEPROM_ADDR	0x52
> > #define CONFIG_SYS_SPD_BUS_NUM		1 /* For rom_loc and flash
> >bank */
> >
> >--
> >2.17.1



More information about the U-Boot mailing list