[U-Boot] [PATCH 14/18] armv8: ls1043ardb: enable I2C DM and EEPROM DM

ying.zhang22455 at nxp.com ying.zhang22455 at nxp.com
Thu Aug 23 01:15:01 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/ls1043ardb_SECURE_BOOT_defconfig | 3 +++
 configs/ls1043ardb_defconfig             | 3 +++
 include/configs/ls1043a_common.h         | 3 ---
 include/configs/ls1043aqds.h             | 2 ++
 include/configs/ls1043ardb.h             | 7 +++++++
 5 files changed, 15 insertions(+), 3 deletions(-)

diff --git a/configs/ls1043ardb_SECURE_BOOT_defconfig b/configs/ls1043ardb_SECURE_BOOT_defconfig
index 44b8702..131ee2c 100644
--- a/configs/ls1043ardb_SECURE_BOOT_defconfig
+++ b/configs/ls1043ardb_SECURE_BOOT_defconfig
@@ -46,3 +46,6 @@ CONFIG_SPL_RSA=y
 CONFIG_RSA_SOFTWARE_EXP=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/ls1043ardb_defconfig b/configs/ls1043ardb_defconfig
index 4ee6346..221fc10 100644
--- a/configs/ls1043ardb_defconfig
+++ b/configs/ls1043ardb_defconfig
@@ -44,3 +44,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/ls1043a_common.h b/include/configs/ls1043a_common.h
index 656d10d..71cef41 100644
--- a/include/configs/ls1043a_common.h
+++ b/include/configs/ls1043a_common.h
@@ -141,9 +141,6 @@
 #endif
 #endif
 
-/* I2C */
-#define CONFIG_SYS_I2C
-
 /* PCIe */
 #ifndef SPL_NO_PCIE
 #define CONFIG_PCIE1		/* PCIE controller 1 */
diff --git a/include/configs/ls1043aqds.h b/include/configs/ls1043aqds.h
index f4a0cc0..7dfcf68 100644
--- a/include/configs/ls1043aqds.h
+++ b/include/configs/ls1043aqds.h
@@ -87,6 +87,8 @@ unsigned long get_board_ddr_clk(void);
 /* SATA */
 #define CONFIG_SCSI_AHCI_PLAT
 
+#define CONFIG_SYS_I2C
+
 /* EEPROM */
 #define CONFIG_ID_EEPROM
 #define CONFIG_SYS_I2C_EEPROM_NXID
diff --git a/include/configs/ls1043ardb.h b/include/configs/ls1043ardb.h
index 9b24056..80f06c7 100644
--- a/include/configs/ls1043ardb.h
+++ b/include/configs/ls1043ardb.h
@@ -211,6 +211,10 @@
 #define CONFIG_SYS_CS2_FTIM2		CONFIG_SYS_CPLD_FTIM2
 #define CONFIG_SYS_CS2_FTIM3		CONFIG_SYS_CPLD_FTIM3
 
+#if (defined(CONFIG_NAND_BOOT) || defined(CONFIG_SD_BOOT))
+#define CONFIG_SYS_I2C
+#endif
+
 /* EEPROM */
 #ifndef SPL_NO_EEPROM
 #define CONFIG_ID_EEPROM
@@ -220,6 +224,9 @@
 #define CONFIG_SYS_I2C_EEPROM_ADDR_LEN		1
 #define CONFIG_SYS_EEPROM_PAGE_WRITE_BITS	3
 #define CONFIG_SYS_EEPROM_PAGE_WRITE_DELAY_MS	5
+#define FSL_I2C_EEPROM_DM_NAME                 "i2c at 2180000"
+#define CONFIG_I2C_SET_DEFAULT_BUS_NUM
+#define CONFIG_I2C_DEFAULT_BUS_NUMBER		0
 #endif
 
 /*
-- 
2.7.4



More information about the U-Boot mailing list