summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorHeiko Schocher <hs@denx.de>2009-02-24 11:30:34 +0100
committerKim Phillips <kim.phillips@freescale.com>2009-03-05 18:21:17 -0600
commit19f0e93041dbfe22f8d39b98e4f7f9ea87b77803 (patch)
treedaee9618bf97254766a44843f66bd797732b6d4f /include
parentdb1d72afd77287bc8577210f3f71ab249dcf146f (diff)
downloadu-boot-imx-19f0e93041dbfe22f8d39b98e4f7f9ea87b77803.zip
u-boot-imx-19f0e93041dbfe22f8d39b98e4f7f9ea87b77803.tar.gz
u-boot-imx-19f0e93041dbfe22f8d39b98e4f7f9ea87b77803.tar.bz2
83xx, kmeter1: add I2C, dtt, eeprom support
This patch adds I2C support for the Keymile kmeter1 board. It uses the First I2C Controller from the CPU, for accessing 4 temperature sensors, an eeprom with IVM data and the booteeprom over a pca9547 mux. Signed-off-by: Heiko Schocher <hs@denx.de> Signed-off-by: Kim Phillips <kim.phillips@freescale.com>
Diffstat (limited to 'include')
-rw-r--r--include/configs/keymile-common.h7
-rw-r--r--include/configs/kmeter1.h35
2 files changed, 35 insertions, 7 deletions
diff --git a/include/configs/keymile-common.h b/include/configs/keymile-common.h
index d70bc48..c7f6ba3 100644
--- a/include/configs/keymile-common.h
+++ b/include/configs/keymile-common.h
@@ -42,13 +42,9 @@
#define CONFIG_CMD_IMMAP
#define CONFIG_CMD_MII
#define CONFIG_CMD_PING
-
-/* should go away, if kmeter I2C support is enabled */
-#if defined(CONFIG_MGCOGE) || defined(CONFIG_MGSUVD)
#define CONFIG_CMD_DTT
#define CONFIG_CMD_EEPROM
#define CONFIG_CMD_I2C
-#endif
#undef CONFIG_WATCHDOG /* disable platform specific watchdog */
@@ -73,10 +69,7 @@
#define CONFIG_SYS_BARGSIZE CONFIG_SYS_CBSIZE /* Boot Argument Buffer Size */
#define CONFIG_CMDLINE_EDITING 1 /* add command line history */
-/* should go away, if kmeter I2C support is enabled */
-#if defined(CONFIG_MGCOGE) || defined(CONFIG_MGSUVD)
#define CONFIG_HUSH_INIT_VAR 1
-#endif
#define CONFIG_SYS_ALT_MEMTEST /* memory test, takes time */
#define CONFIG_SYS_MEMTEST_START 0x00100000 /* memtest works on */
diff --git a/include/configs/kmeter1.h b/include/configs/kmeter1.h
index b86c61d..a23c9ed 100644
--- a/include/configs/kmeter1.h
+++ b/include/configs/kmeter1.h
@@ -32,6 +32,7 @@
/* include common defines/options for all Keymile boards */
#include "keymile-common.h"
+#define CONFIG_MISC_INIT_R 1
/*
* System Clock Setup
*/
@@ -300,6 +301,38 @@
#define CONFIG_ENV_SIZE 0x2000
#endif /* CFG_RAMBOOT */
+/* I2C */
+#define CONFIG_HARD_I2C /* I2C with hardware support */
+#undef CONFIG_SOFT_I2C /* I2C bit-banged */
+#define CONFIG_FSL_I2C
+#define CONFIG_SYS_I2C_SPEED 200000 /* I2C speed and slave address */
+#define CONFIG_SYS_I2C_SLAVE 0x7F
+#define CONFIG_SYS_I2C_OFFSET 0x3000
+#define CONFIG_I2C_MULTI_BUS 1
+#define CONFIG_I2C_CMD_TREE 1
+#define CONFIG_SYS_MAX_I2C_BUS 2
+#define CONFIG_I2C_MUX 1
+
+/* EEprom support */
+#define CONFIG_SYS_I2C_EEPROM_ADDR_LEN 2
+#define CONFIG_SYS_I2C_MULTI_EEPROMS 1
+#define CONFIG_SYS_EEPROM_PAGE_WRITE_ENABLE
+#define CONFIG_SYS_EEPROM_PAGE_WRITE_BITS 3
+#define CONFIG_SYS_EEPROM_PAGE_WRITE_DELAY_MS 10
+
+/* Support the IVM EEprom */
+#define CONFIG_SYS_IVM_EEPROM_ADR 0x50
+#define CONFIG_SYS_IVM_EEPROM_MAX_LEN 0x400
+#define CONFIG_SYS_IVM_EEPROM_PAGE_LEN 0x100
+
+/* I2C SYSMON (LM75, AD7414 is almost compatible) */
+#define CONFIG_DTT_LM75 1 /* ON Semi's LM75 */
+#define CONFIG_DTT_SENSORS {0, 1, 2, 3} /* Sensor addresses */
+#define CONFIG_SYS_DTT_MAX_TEMP 70
+#define CONFIG_SYS_DTT_LOW_TEMP -30
+#define CONFIG_SYS_DTT_HYSTERESIS 3
+#define CONFIG_SYS_DTT_BUS_NUM (2)
+
#if defined(CONFIG_PCI)
#define CONFIG_CMD_PCI
#endif
@@ -452,6 +485,8 @@
"loadfdt=tftp ${fdt_addr_r} ${fdt_file}\0" \
"loadkernel=tftp ${kernel_addr_r} ${boot_file}\0" \
"unlock=yes\0" \
+ "EEprom_ivm=pca9547:70:9\0" \
+ "dtt_bus=pca9547:70:a\0" \
""
#endif /* __CONFIG_H */