[U-Boot] [PATCH 13/18] armv8: ls1046ardb: enable I2C DM and EEPROM DM

ying.zhang22455 at nxp.com ying.zhang22455 at nxp.com
Thu Aug 23 01:15:00 UTC 2018


From: Zhang Ying-22455 <ying.zhang22455 at nxp.com>

Some CONFIG options that are not supported on SPL must be
disabled because one .config is shared between SPL and U-Boot
proper going forward.

Such as CONFIG_I2C_DM is not supported in SPL at this time,
so we can only add a option CONFIG_I2C_DM in the image without
SPL.

After supporting the option CONFIG_SPL_I2C_DM in the future,
we can enable CONFIG_I2C_DM in all the image.

Signed-off-by: Zhang Ying-22455 <ying.zhang22455 at nxp.com>
---
 configs/ls1046ardb_qspi_SECURE_BOOT_defconfig | 3 +++
 configs/ls1046ardb_qspi_defconfig             | 3 +++
 include/configs/ls1046a_common.h              | 2 --
 include/configs/ls1046aqds.h                  | 2 ++
 include/configs/ls1046ardb.h                  | 7 +++++++
 5 files changed, 15 insertions(+), 2 deletions(-)

diff --git a/configs/ls1046ardb_qspi_SECURE_BOOT_defconfig b/configs/ls1046ardb_qspi_SECURE_BOOT_defconfig
index 2c532a3..c01949d 100644
--- a/configs/ls1046ardb_qspi_SECURE_BOOT_defconfig
+++ b/configs/ls1046ardb_qspi_SECURE_BOOT_defconfig
@@ -47,3 +47,6 @@ CONFIG_USB_STORAGE=y
 CONFIG_RSA=y
 CONFIG_DM_GPIO=y
 CONFIG_MPC8XXX_GPIO=y
+CONFIG_DM_I2C=y
+CONFIG_DM_I2C_COMPAT=y
+CONFIG_DM_EEPROM=y
diff --git a/configs/ls1046ardb_qspi_defconfig b/configs/ls1046ardb_qspi_defconfig
index abc1abf..643b4cc 100644
--- a/configs/ls1046ardb_qspi_defconfig
+++ b/configs/ls1046ardb_qspi_defconfig
@@ -47,3 +47,6 @@ CONFIG_USB_XHCI_DWC3=y
 CONFIG_USB_STORAGE=y
 CONFIG_DM_GPIO=y
 CONFIG_MPC8XXX_GPIO=y
+CONFIG_DM_I2C=y
+CONFIG_DM_I2C_COMPAT=y
+CONFIG_DM_EEPROM=y
diff --git a/include/configs/ls1046a_common.h b/include/configs/ls1046a_common.h
index cdb73f6..72ca9fe 100644
--- a/include/configs/ls1046a_common.h
+++ b/include/configs/ls1046a_common.h
@@ -125,8 +125,6 @@
 #define CONFIG_SYS_MONITOR_LEN		0xa0000
 #endif
 
-/* I2C */
-#define CONFIG_SYS_I2C
 
 /* PCIe */
 #define CONFIG_PCIE1		/* PCIE controller 1 */
diff --git a/include/configs/ls1046aqds.h b/include/configs/ls1046aqds.h
index e873682..758d388 100644
--- a/include/configs/ls1046aqds.h
+++ b/include/configs/ls1046aqds.h
@@ -127,6 +127,8 @@ unsigned long get_board_ddr_clk(void);
 #define CFG_LPUART_EN		0x2
 #endif
 
+#define CONFIG_SYS_I2C
+
 /* EEPROM */
 #define CONFIG_ID_EEPROM
 #define CONFIG_SYS_I2C_EEPROM_NXID
diff --git a/include/configs/ls1046ardb.h b/include/configs/ls1046ardb.h
index 87d8cf5..4b783b6 100644
--- a/include/configs/ls1046ardb.h
+++ b/include/configs/ls1046ardb.h
@@ -139,6 +139,10 @@
 #define CONFIG_SYS_CS2_FTIM2		CONFIG_SYS_CPLD_FTIM2
 #define CONFIG_SYS_CS2_FTIM3		CONFIG_SYS_CPLD_FTIM3
 
+#ifdef CONFIG_SD_BOOT
+#define CONFIG_SYS_I2C
+#endif
+
 /* EEPROM */
 #define CONFIG_ID_EEPROM
 #define CONFIG_SYS_I2C_EEPROM_NXID
@@ -148,6 +152,9 @@
 #define CONFIG_SYS_EEPROM_PAGE_WRITE_BITS	3
 #define CONFIG_SYS_EEPROM_PAGE_WRITE_DELAY_MS	5
 #define I2C_RETIMER_ADDR			0x18
+#define FSL_I2C_EEPROM_DM_NAME			"i2c at 2180000"
+#define CONFIG_I2C_SET_DEFAULT_BUS_NUM
+#define CONFIG_I2C_DEFAULT_BUS_NUMBER		0
 
 /* PMIC */
 #define CONFIG_POWER
-- 
2.7.4



More information about the U-Boot mailing list