Skip to contentSkip to conversation

ARM: dts: aspeed: tacoma: Disable CS1 as it is broken

PATCH In review Joel Stanley 2 participants 2 messages Sep 26, 2019

Subsystems (4)
lore
Share & tools
lore

Joel Stanley

author maintainer
#0 lore raw

PATCH 1/1 ARM: dts: aspeed: tacoma: Disable CS1 as it is broken

We currently hang when attempting to probe the second flash chip on the FMC. Disable it until this issue is resolved.

OpenBMC-Staging-Count: 1

---
 arch/arm/boot/dts/aspeed-bmc-opp-tacoma.dts | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm/boot/dts/aspeed-bmc-opp-tacoma.dts +1 -1
index a923fffbb5a4..942eb974cca2 100644
@@ -35,7 +35,7 @@
 	};
 
 	flash@1 {
-		status = "okay";
+		status = "disabled";
 		m25p,fast-read;
 		label = "alt-bmc";
 		spi-max-frequency = <50000000>;
Signature · 1 line
2.23.0
Reviewed-by on v1 1/1
#1 lore raw
Quoted 2 lines · Joel Stanley

We currently hang when attempting to probe the second flash chip on the FMC. Disable it until this issue is resolved.

Below is a fix. It's worth a try.

Thanks,

C.

From cb1237b2fdf8f5a55254ac066d8ab3c4924c93b6 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?C=C3=A9dric=20Le=20Goater?= <[email protected]>
Date: Thu, 26 Sep 2019 15:45:37 +0200
Subject: [PATCH] mtd: spi-nor: aspeed: fix training of multiple CS on the
AST2600
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

Each CE has its own read timing compensation register.

---
 drivers/mtd/spi-nor/aspeed-smc.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
drivers/mtd/spi-nor/aspeed-smc.c +3 -2
index e9bc89755912..9873824eb381 100644
@@ -1133,7 +1133,7 @@ static int aspeed_smc_calibrate_reads_ast2600(struct aspeed_smc_chip *chip, u32
 		fread_timing_val |= hcycle << shift;
 
 		/* no DI input delay first  */
-		writel(fread_timing_val, controller->regs + info->timing);
+		writel(fread_timing_val, controller->regs + info->timing + chip->cs);
 		pass = aspeed_smc_check_reads(chip, golden_buf, test_buf);
 		dev_dbg(chip->nor.dev,
 			"  * [%08x] %d HCLK delay, DI delay none : %s",
@@ -1149,7 +1149,8 @@ static int aspeed_smc_calibrate_reads_ast2600(struct aspeed_smc_chip *chip, u32
 			fread_timing_val &= ~(0xf << (4 + shift));
 			fread_timing_val |= delay_ns << (4 + shift);
 
-			writel(fread_timing_val, controller->regs + info->timing);
+			writel(fread_timing_val,
+			       controller->regs + info->timing + chip->cs);
 			pass = aspeed_smc_check_reads(chip, golden_buf, test_buf);
 			dev_dbg(chip->nor.dev,
 				"  * [%08x] %d HCLK delay, DI delay %d.%dns : %s",
Signature · 1 line
2.21.0