Skip to contentSkip to conversation

powerpc/85xx: Enable eSPI controller & SPI bootsupport on P2020DS

PATCH New Kumar Gala 2 participants 7 messages Apr 21, 2011 – Apr 29, 2011

lore
Share & tools
lore

Kumar Gala

author
#0 lore raw

PATCH 1/3 powerpc/85xx: Enable eSPI controller & SPI bootsupport on P2020DS

From: Jerry Huang <[email protected]>

---
 boards.cfg                |    1 +
 include/configs/P2020DS.h |   28 ++++++++++++++++++++++++++++
 2 files changed, 29 insertions(+), 0 deletions(-)
boards.cfg +1 -0
index be5f83d..39f15f6 100644
@@ -537,6 +537,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
include/configs/P2020DS.h +28 -0
index 47f1f18..cee9fd4 100644
@@ -40,6 +40,13 @@
 #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 */
@@ -418,6 +425,18 @@
 #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.
  */
@@ -594,6 +613,15 @@
 #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
Signature · 1 line
1.7.3.4
author
#3 lore raw

PATCH 2/3 powerpc/85xx: Enable eSPI support for p1_p2_rdb

From: Priyanka Jain <[email protected]>

Also added support to save env to spi flash in case of SPIBOOT.

---
 include/configs/P1_P2_RDB.h |   18 ++++++++++++++++--
 1 files changed, 16 insertions(+), 2 deletions(-)
include/configs/P1_P2_RDB.h +16 -2
index 449329a..9249e37 100644
@@ -411,6 +411,15 @@ extern unsigned long get_board_sys_clk(unsigned long dummy);
 #define CONFIG_RTC_DS1337
 #define CONFIG_SYS_RTC_DS1337_NOOSC
 #define CONFIG_SYS_I2C_RTC_ADDR                0x68
+
+/* 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.
@@ -527,8 +536,13 @@ extern unsigned long get_board_sys_clk(unsigned long dummy);
 #define CONFIG_ENV_SIZE			0x2000
 #define CONFIG_SYS_MMC_ENV_DEV		0
 #elif defined(CONFIG_RAMBOOT_SPIFLASH)
-	#define CONFIG_ENV_IS_NOWHERE	1	/* Store ENV in memory only */
-	#define CONFIG_ENV_ADDR		(CONFIG_SYS_MONITOR_BASE - 0x1000)
+	#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_OFFSET	0x100000	/* 1MB */
+	#define CONFIG_ENV_SECT_SIZE	0x10000
 	#define CONFIG_ENV_SIZE		0x2000
 #endif
 #else
Signature · 1 line
1.7.3.4
author
#5 lore raw

PATCH 3/3 powerpc/85xx: Enable eSPI support on P1022DS

From: Jiang Yutang <[email protected]>

---
 board/freescale/p1022ds/p1022ds.c |    3 +++
 include/configs/P1022DS.h         |   15 +++++++++++++++
 2 files changed, 18 insertions(+), 0 deletions(-)
board/freescale/p1022ds/p1022ds.c +3 -0
index 73a1021..8ef627f 100644
@@ -46,6 +46,9 @@ int board_early_init_f(void)
 	/* Set the pin muxing to enable ETSEC2. */
 	clrbits_be32(&gur->pmuxcr2, 0x001F8000);
 
+	/* Enable the SPI */
+	clrsetbits_8(&pixis->brdcfg0, PIXIS_ELBC_SPI_MASK, PIXIS_SPI);
+
 	return 0;
 }
 
include/configs/P1022DS.h +15 -0
index fb2a41c..593efd5 100644
@@ -170,6 +170,8 @@
 #define PIXIS_LBMAP_SWITCH	7
 #define PIXIS_LBMAP_MASK	0xF0
 #define PIXIS_LBMAP_ALTBANK	0x20
+#define PIXIS_ELBC_SPI_MASK	0xc0
+#define PIXIS_SPI		0x80
 
 #define CONFIG_SYS_INIT_RAM_LOCK
 #define CONFIG_SYS_INIT_RAM_ADDR	0xffd00000 /* Initial L1 address */
@@ -267,6 +269,19 @@
 #define CONFIG_SYS_EEPROM_BUS_NUM	1
 
 /*
+ * eSPI - Enhanced SPI
+ */
+#define CONFIG_SPI_FLASH
+#define CONFIG_SPI_FLASH_SPANSION
+
+#define CONFIG_HARD_SPI
+#define CONFIG_FSL_ESPI
+
+#define CONFIG_CMD_SF
+#define CONFIG_SF_DEFAULT_SPEED		10000000
+#define CONFIG_SF_DEFAULT_MODE		0
+
+/*
  * General PCI
  * Memory space is mapped 1-1, but I/O space must start from 0.
  */
Signature · 1 line
1.7.3.4
#2 lore raw

PATCH 1/3 powerpc/85xx: Enable eSPI controller & SPI bootsupport on P2020DS

In reply to Kumar Gala
Quoted 15 lines · On Thu, 21 Apr 2011 13:54:01 -0500 Kumar Gala <[email protected]> wrote:

From: Jerry Huang <[email protected]>

---
 boards.cfg                |    1 +
 include/configs/P2020DS.h |   28 ++++++++++++++++++++++++++++
 2 files changed, 29 insertions(+), 0 deletions(-)
boards.cfg +0 -0
index be5f83d..39f15f6 100644

boards.cfg P2020DS powerpc mpc85xx p2020ds freesca · line 540

Quoted 4 lines
boards.cfg +1 -0
@@ -537,6 +537,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

36BIT+SPIFLASH?

If it's not working, perhaps a comment about it?

-Scott

author Applied
#1 lore raw

PATCH 1/3 powerpc/85xx: Enable eSPI controller & SPI bootsupport on P2020DS

In reply to Kumar Gala
Quoted 9 lines · Kumar Gala

From: Jerry Huang <[email protected]>

---
boards.cfg | 1 +
include/configs/P2020DS.h | 28 ++++++++++++++++++++++++++++

2 files changed, 29 insertions(+), 0 deletions(-)

applied to 85xx

- k