aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorBiwen Li <biwen.li@nxp.com>2020-05-01 20:04:19 +0800
committerPriyanka Jain <priyanka.jain@nxp.com>2020-05-04 09:12:36 +0530
commit8e4be6dfb755bda97bea4d4b211c4aaabe08b730 (patch)
tree336a073962174db68cd041f77255f23625eebdf1 /include
parent30ea84768b678c64fbd890b952b719bf3b8d9dc0 (diff)
downloadu-boot-8e4be6dfb755bda97bea4d4b211c4aaabe08b730.zip
u-boot-8e4be6dfb755bda97bea4d4b211c4aaabe08b730.tar.gz
u-boot-8e4be6dfb755bda97bea4d4b211c4aaabe08b730.tar.bz2
dm: powerpc: T2080/T2081: add i2c DM support
This supports i2c DM for SoC T2080/T2081 Signed-off-by: Biwen Li <biwen.li@nxp.com> Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>
Diffstat (limited to 'include')
-rw-r--r--include/configs/T208xQDS.h7
-rw-r--r--include/configs/T208xRDB.h10
2 files changed, 15 insertions, 2 deletions
diff --git a/include/configs/T208xQDS.h b/include/configs/T208xQDS.h
index 96801e5..aed2e87 100644
--- a/include/configs/T208xQDS.h
+++ b/include/configs/T208xQDS.h
@@ -1,6 +1,7 @@
/* SPDX-License-Identifier: GPL-2.0+ */
/*
* Copyright 2011-2013 Freescale Semiconductor, Inc.
+ * Copyright 2020 NXP
*/
/*
@@ -385,8 +386,8 @@ unsigned long get_board_ddr_clk(void);
/*
* I2C
*/
+#ifndef CONFIG_DM_I2C
#define CONFIG_SYS_I2C
-#define CONFIG_SYS_I2C_FSL
#define CONFIG_SYS_FSL_I2C_SLAVE 0x7F
#define CONFIG_SYS_FSL_I2C2_SLAVE 0x7F
#define CONFIG_SYS_FSL_I2C3_SLAVE 0x7F
@@ -399,6 +400,10 @@ unsigned long get_board_ddr_clk(void);
#define CONFIG_SYS_FSL_I2C2_SPEED 100000
#define CONFIG_SYS_FSL_I2C3_SPEED 100000
#define CONFIG_SYS_FSL_I2C4_SPEED 100000
+#endif
+
+#define CONFIG_SYS_I2C_FSL
+
#define I2C_MUX_PCA_ADDR_PRI 0x77 /* I2C bus multiplexer,primary */
#define I2C_MUX_PCA_ADDR_SEC1 0x75 /* I2C bus multiplexer,secondary 1 */
#define I2C_MUX_PCA_ADDR_SEC2 0x76 /* I2C bus multiplexer,secondary 2 */
diff --git a/include/configs/T208xRDB.h b/include/configs/T208xRDB.h
index a90ea11..e0ef2b2 100644
--- a/include/configs/T208xRDB.h
+++ b/include/configs/T208xRDB.h
@@ -1,6 +1,7 @@
/* SPDX-License-Identifier: GPL-2.0+ */
/*
* Copyright 2014 Freescale Semiconductor, Inc.
+ * Copyright 2020 NXP
*/
/*
@@ -333,8 +334,8 @@ unsigned long get_board_ddr_clk(void);
/*
* I2C
*/
+#ifndef CONFIG_DM_I2C
#define CONFIG_SYS_I2C
-#define CONFIG_SYS_I2C_FSL
#define CONFIG_SYS_FSL_I2C_SLAVE 0x7F
#define CONFIG_SYS_FSL_I2C2_SLAVE 0x7F
#define CONFIG_SYS_FSL_I2C3_SLAVE 0x7F
@@ -347,6 +348,13 @@ unsigned long get_board_ddr_clk(void);
#define CONFIG_SYS_FSL_I2C2_SPEED 100000
#define CONFIG_SYS_FSL_I2C3_SPEED 100000
#define CONFIG_SYS_FSL_I2C4_SPEED 100000
+#else
+#define CONFIG_I2C_SET_DEFAULT_BUS_NUM
+#define CONFIG_I2C_DEFAULT_BUS_NUMBER 0
+#endif
+
+#define CONFIG_SYS_I2C_FSL
+
#define I2C_MUX_PCA_ADDR_PRI 0x77 /* I2C bus multiplexer,primary */
#define I2C_MUX_PCA_ADDR_SEC1 0x75 /* I2C bus multiplexer,secondary 1 */
#define I2C_MUX_PCA_ADDR_SEC2 0x76 /* I2C bus multiplexer,secondary 2 */