Skip to contentSkip to conversation

mpc85xx/t208xqds: Adjust DDR timing parameters

PATCH New York Sun 1 participant 2 messages Oct 27, 2014 PowerPC

lore
Share & tools
lore

York Sun

author
#0 lore raw

PATCH 1/2 mpc85xx/t208xqds: Adjust DDR timing parameters

Adjust timing for dual-rank UDIMM, verified on M3CQ-8GHS3C0E for speed of 1066, 1333, 1600, 1866MT/s. The 1866 timing is copied to 2133 timing in case such DIMM comes available.

Also update single-rank 1866 timing. Enable interactive debugging as well.

CC Shengzhou Liu <[email protected]>
---
 board/freescale/t208xqds/ddr.h |   15 +++++++--------
 include/configs/T208xQDS.h     |    2 +-
 2 files changed, 8 insertions(+), 9 deletions(-)
board/freescale/t208xqds/ddr.h +7 -8
index ed52fef6..9c26fdf 100644
@@ -28,17 +28,16 @@ static const struct board_specific_parameters udimm0[] = {
 	 *   num|  hi| rank|  clk| wrlvl | wrlvl | wrlvl |
 	 * ranks| mhz| GB  |adjst| start | ctl2  | ctl3  |
 	 */
-	{2,  1200,  0,  5,  7,  0x0808090a,  0x0b0c0c0a},
-	{2,  1500,  0,  5,  6,  0x07070809,  0x0a0b0b09},
-	{2,  1600,  0,  5,  8,  0x090b0b0d,  0x0d0e0f0b},
-	{2,  1700,  0,  4,  7,  0x080a0a0c,  0x0c0d0e0a},
-	{2,  1900,  0,  5,  9,  0x0a0b0c0e,  0x0f10120c},
-	{2,  2140,  0,  4,  8,  0x090a0b0d,  0x0e0f110b},
+	{2,  1200,  0,  5,  7,  0x0708090a,  0x0b0c0d09},
+	{2,  1400,  0,  5,  7,  0x08090a0c,  0x0d0e0f0a},
+	{2,  1700,  0,  5,  8,  0x090a0b0c,  0x0e10110c},
+	{2,  1900,  0,  5,  8,  0x090b0c0f,  0x1012130d},
+	{2,  2140,  0,  5,  8,  0x090b0c0f,  0x1012130d},
 	{1,  1200,  0,  5,  7,  0x0808090a,  0x0b0c0c0a},
 	{1,  1500,  0,  5,  6,  0x07070809,  0x0a0b0b09},
 	{1,  1600,  0,  5,  8,  0x090b0b0d,  0x0d0e0f0b},
-	{1,  1700,  0,  4,  7,  0x080a0a0c,  0x0c0d0e0a},
-	{1,  1900,  0,  5,  9,  0x0a0b0c0e,  0x0f10120c},
+	{1,  1700,  0,  4,  8,  0x080a0a0c,  0x0c0d0e0a},
+	{1,  1900,  0,  5,  8,  0x090a0c0d,  0x0e0f110c},
 	{1,  2140,  0,  4,  8,  0x090a0b0d,  0x0e0f110b},
 	{}
 };
include/configs/T208xQDS.h +1 -1
index 2733358..3426b55 100644
@@ -234,7 +234,7 @@ unsigned long get_board_ddr_clk(void);
 #define CONFIG_FSL_DDR_FIRST_SLOT_QUAD_CAPABLE
 #define CONFIG_DDR_SPD
 #define CONFIG_SYS_FSL_DDR3
-#undef CONFIG_FSL_DDR_INTERACTIVE
+#define CONFIG_FSL_DDR_INTERACTIVE
 #define CONFIG_SYS_SPD_BUS_NUM	0
 #define CONFIG_SYS_SDRAM_SIZE	2048	/* for fixed parameter use */
 #define SPD_EEPROM_ADDRESS1	0x51
Signature · 1 line
1.7.9.5
author
#1 lore raw

PATCH 2/2 mpc85xx/t2080: Fix parsing DDR ratio for new revision

T2080 rev 1.1 changes MEM_RAT in RCW, which requires new parsing for ratio, the same way as T4240 rev 2.0.

CC Shengzhou Liu <[email protected]>
---
 arch/powerpc/cpu/mpc85xx/speed.c |   23 ++++++++++++++++++++---
 1 file changed, 20 insertions(+), 3 deletions(-)
arch/powerpc/cpu/mpc85xx/speed.c +20 -3
index 3236f6a..9d2a3b9 100644
@@ -37,6 +37,7 @@ void get_sys_info(sys_info_t *sys_info)
 #ifdef CONFIG_SYS_FSL_QORIQ_CHASSIS2
 	int cc_group[12] = CONFIG_SYS_FSL_CLUSTER_CLOCKS;
 #endif
+	__maybe_unused u32 svr;
 
 	const u8 core_cplx_PLL[16] = {
 		[ 0] = 0,	/* CC1 PPL / 1 */
@@ -122,11 +123,27 @@ void get_sys_info(sys_info_t *sys_info)
 	/* T4240/T4160 Rev2.0 MEM_PLL_RAT uses a value which is half of
 	 * T4240/T4160 Rev1.0. eg. It's 12 in Rev1.0, however, for Rev2.0
 	 * it uses 6.
+	 * T2080 rev 1.1 and later also use half mem_pll comparing with rev 1.0
 	 */
 #if defined(CONFIG_PPC_T4240) || defined(CONFIG_PPC_T4160) || \
-	defined(CONFIG_PPC_T4080)
-	if (SVR_MAJ(get_svr()) >= 2)
-		mem_pll_rat *= 2;
+	defined(CONFIG_PPC_T4080) || defined(CONFIG_PPC_T2080)
+	svr = get_svr();
+	switch (SVR_SOC_VER(svr)) {
+	case SVR_T4240:
+	case SVR_T4160:
+	case SVR_T4120:
+	case SVR_T4080:
+		if (SVR_MAJ(svr) >= 2)
+			mem_pll_rat *= 2;
+		break;
+	case SVR_T2080:
+	case SVR_T2081:
+		if ((SVR_MAJ(svr) > 1) || (SVR_MIN(svr) >= 1))
+			mem_pll_rat *= 2;
+		break;
+	default:
+		break;
+	}
 #endif
 	if (mem_pll_rat > 2)
 		sys_info->freq_ddrbus *= mem_pll_rat;
Signature · 1 line
1.7.9.5