powerpc/85xx: Enable eSPI controller & SPI boot support on P2020DS
authorJerry Huang <Chang-Ming.Huang@freescale.com>
Mon, 24 Jan 2011 17:09:56 +0000 (17:09 +0000)
committerKumar Gala <galak@kernel.crashing.org>
Fri, 29 Apr 2011 12:36:07 +0000 (07:36 -0500)
Signed-off-by: Jerry Huang <Chang-Ming.Huang@freescale.com>
Signed-off-by: Zhao Chenhui <b35336@freescale.com>
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
boards.cfg
include/configs/P2020DS.h

index a71b1bbe5555708ea38b3efe050387ba334a69a2..18a44946b4e545fb7b12d0b75fa79c23452e1f50 100644 (file)
@@ -551,6 +551,7 @@ P2020DS                      powerpc     mpc85xx     p2020ds             freesca
 P2020DS_36BIT                powerpc     mpc85xx     p2020ds             freescale      -           P2020DS:36BIT
 P2020DS_DDR2                 powerpc     mpc85xx     p2020ds             freescale      -           P2020DS:DDR2
 P2020DS_SDCARD               powerpc     mpc85xx     p2020ds             freescale      -           P2020DS:SDCARD
+P2020DS_SPIFLASH             powerpc     mpc85xx     p2020ds             freescale      -           P2020DS:SPIFLASH
 P2020RDB                     powerpc     mpc85xx     p1_p2_rdb           freescale      -           P1_P2_RDB:P2020RDB
 P2020RDB_36BIT               powerpc     mpc85xx     p1_p2_rdb           freescale      -           P1_P2_RDB:P2020RDB,36BIT
 P2020RDB_36BIT_SDCARD        powerpc     mpc85xx     p1_p2_rdb           freescale      -           P1_P2_RDB:P2020RDB,36BIT,SDCARD
index 47f1f1800681e7bbf28817986d397a058691117d..cee9fd408d7a41ce98788cb832e4710961411dfb 100644 (file)
 #define CONFIG_RESET_VECTOR_ADDRESS    0xf8fffffc
 #endif
 
+#ifdef CONFIG_SPIFLASH
+#define CONFIG_SYS_RAMBOOT
+#define CONFIG_SYS_EXTRA_ENV_RELOC
+#define CONFIG_SYS_TEXT_BASE           0xf8f80000
+#define CONFIG_RESET_VECTOR_ADDRESS    0xf8fffffc
+#endif
+
 /* High Level Configuration Options */
 #define CONFIG_BOOKE           1       /* BOOKE */
 #define CONFIG_E500            1       /* BOOKE e500 family */
 #define CONFIG_SYS_I2C_EEPROM_ADDR_LEN 1
 #define CONFIG_SYS_EEPROM_BUS_NUM      0
 
+/*
+ * eSPI - Enhanced SPI
+ */
+#define CONFIG_FSL_ESPI
+
+#define CONFIG_SPI_FLASH
+#define CONFIG_SPI_FLASH_SPANSION
+
+#define CONFIG_CMD_SF
+#define CONFIG_SF_DEFAULT_SPEED                10000000
+#define CONFIG_SF_DEFAULT_MODE         SPI_MODE_0
+
 /*
  * General PCI
  * Memory space is mapped 1-1, but I/O space must start from 0.
 #define CONFIG_ENV_IS_IN_MMC
 #define CONFIG_ENV_SIZE                        0x2000
 #define CONFIG_SYS_MMC_ENV_DEV         0
+#elif defined(CONFIG_SPIFLASH)
+#define CONFIG_ENV_IS_IN_SPI_FLASH
+#define CONFIG_ENV_SPI_BUS             0
+#define CONFIG_ENV_SPI_CS              0
+#define CONFIG_ENV_SPI_MAX_HZ          10000000
+#define CONFIG_ENV_SPI_MODE            0
+#define CONFIG_ENV_SIZE                        0x2000          /* 8KB */
+#define CONFIG_ENV_OFFSET              0x100000        /* 1MB */
+#define CONFIG_ENV_SECT_SIZE           0x10000
 #else
 #define CONFIG_ENV_IS_IN_FLASH 1
 #if CONFIG_SYS_MONITOR_BASE > 0xfff80000