Motion-PRO: Add displaying of CPLD revision information during boot.
[oweals/u-boot.git] / include / configs / motionpro.h
index 989a534e68df76d5bd7dfbae895aa8b8373f9689..8ffcc4c9c11752c4e0ffc4073995d867015dde9c 100644 (file)
                                CFG_CMD_NET     | \
                                CFG_CMD_PING    | \
                                CFG_CMD_IDE     | \
-                               CFG_CMD_FAT)
+                               CFG_CMD_FAT     | \
+                               CFG_CMD_JFFS2   | \
+                               CFG_CMD_I2C     | \
+                               CFG_CMD_DATE    | \
+                               CFG_CMD_EEPROM)
 
 /* this must be included AFTER the definition of CONFIG_COMMANDS (if any) */
 #include <cmd_confdefs.h>
 
 
 /*
- * Set IPB speed to 100MHz (yes, the #define is misnamed)
+ * Set IPB speed to 100MHz
  */
-#define CFG_IPBSPEED_133
+#define CFG_IPBCLK_EQUALS_XLBCLK
 
 
 /*
 #define CFG_MAX_FLASH_SECT     256     /* max num of sects on one chip */
 #define CONFIG_FLASH_16BIT             /* Flash is 16-bit */
 
+/*
+ * MTD configuration
+ */
+#define CONFIG_JFFS2_CMDLINE
+#define MTDIDS_DEFAULT         "nor0=motionpro-0"
+#define MTDPARTS_DEFAULT       "mtdparts=motionpro-0:"                   \
+                                       "13m(fs),2m(kernel),256k(uboot)," \
+                                       "64k(env),64k(dtb),-(user_data)"
 
 /*
  * IDE/ATA configuration
 #define CONFIG_DOS_PARTITION
 
 
+/*
+ * I2C configuration
+ */
+#define CONFIG_HARD_I2C                1       /* I2C with hardware support */
+#define CFG_I2C_MODULE         2       /* select I2C module #2 */
+#define CFG_I2C_SPEED          100000  /* 100 kHz */
+#define CFG_I2C_SLAVE          0x7F
+
+
+/*
+ * EEPROM configuration
+ */
+#define CFG_I2C_EEPROM_ADDR_LEN                1
+#define CFG_EEPROM_PAGE_WRITE_BITS     3
+#define CFG_EEPROM_PAGE_WRITE_DELAY_MS 70
+#define CFG_I2C_MULTI_EEPROMS          1       /* 2 EEPROMs (addr:50,52) */
+
+
+/*
+ * RTC configuration
+ */
+#define CONFIG_RTC_DS1337      1
+#define CFG_I2C_RTC_ADDR       0x68
+
+
+/*
+ * Status LED configuration
+ */
+#define CONFIG_STATUS_LED              /* Status LED enabled */
+#define CONFIG_BOARD_SPECIFIC_LED
+
+#define ENABLE_GPIO_OUT                0x00000024
+#define LED_ON                 0x00000010
+
+#ifndef __ASSEMBLY__
+/*
+ * In case of Motion-PRO, a LED is identified by its corresponding
+ * GPT Enable and Mode Select Register.
+ */
+typedef volatile unsigned long * led_id_t;
+
+extern void __led_init(led_id_t id, int state);
+extern void __led_toggle(led_id_t id);
+extern void __led_set(led_id_t id, int state);
+#endif /* __ASSEMBLY__ */
+
+
 /*
  * Environment settings
  */
 #define CFG_GPS_PORT_CONFIG    0x1105a004
 
 
+/*
+ * Motion-PRO's CPLD revision control register
+ */
+#define CPLD_REV_REGISTER      (CFG_CS2_START + 0x06)
+
+
 /*
  * Miscellaneous configurable options
  */