[ast2500] aspeed-smc fail with MX25L25635F

Cédric Le Goater clg at kaod.org
Fri Apr 2 18:15:47 AEDT 2021


Hello,

On 4/1/21 5:22 PM, Shakeeb B K wrote:
> Hi Cédric,
> 
> The part we are using is *MX25L25635F* https://www.macronix.com/Lists/Datasheet/Attachments/7414/MX25L25635F,%203V,%20256Mb,%20v1.5.pdf <https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww.macronix.com%2FLists%2FDatasheet%2FAttachments%2F7414%2FMX25L25635F%2C%25203V%2C%2520256Mb%2C%2520v1.5.pdf&data=04%7C01%7Cspasha%40nvidia.com%7C4cf89d8779c84d638c6f08d8ef7d0919%7C43083d15727340c1b7db39efd9ccc17a%7C0%7C0%7C637522667609971209%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=hYy5Cpi06y4T0DpFb4%2FDeo2nEy5Cn3rf3l%2BEO%2FaPP%2FU%3D&reserved=0>
> 
> Attaching the failed boot log - full_boot.log

This was failing in 5.8 already.

> The patch that fixes the problem - workaround.patch

OK. You are disabling Dual I/O.

> A patch to override read opcode - 001-Debug.patch
> Failing log with post fixup read opcode update - fail_post_fixup.log

Could you check the SPI wiring on the schematics of your AST2500 dgx board ?  

If it is single wired, then I suggest a work around like the one attached.

Thanks,

C. 



From: Cédric Le Goater <clg at kaod.org>
Subject: [PATCH] mtd: spi-nor: aspeed: force single IO on tacoma
Date: Wed, 16 Oct 2019 08:14:10 +0200
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

Signed-off-by: Cédric Le Goater <clg at kaod.org>
---
 arch/arm/boot/dts/aspeed-bmc-opp-tacoma.dts  |    1 +
 drivers/mtd/spi-nor/controllers/aspeed-smc.c |    6 +++++-
 2 files changed, 6 insertions(+), 1 deletion(-)

Index: linux-openbmc.git/drivers/mtd/spi-nor/controllers/aspeed-smc.c
===================================================================
--- linux-openbmc.git.orig/drivers/mtd/spi-nor/controllers/aspeed-smc.c
+++ linux-openbmc.git/drivers/mtd/spi-nor/controllers/aspeed-smc.c
@@ -1265,6 +1265,7 @@ static int aspeed_smc_setup_flash(struct
 		struct aspeed_smc_chip *chip;
 		struct spi_nor *nor;
 		struct mtd_info *mtd;
+		struct spi_nor_hwcaps child_hwcaps = hwcaps;
 
 		/* This driver does not support NAND or NOR flash devices. */
 		if (!of_device_is_compatible(child, "jedec,spi-nor"))
@@ -1303,6 +1304,9 @@ static int aspeed_smc_setup_flash(struct
 		dev_info(dev, "Using %d MHz SPI frequency\n",
 			 chip->clk_rate / 1000000);
 
+		if (of_property_read_bool(child, "single-io"))
+			child_hwcaps.mask &= ~SNOR_HWCAPS_READ_1_1_2;
+
 		chip->controller = controller;
 		chip->ctl = controller->regs + info->ctl0 + cs * 4;
 		chip->cs = cs;
@@ -1324,7 +1328,7 @@ static int aspeed_smc_setup_flash(struct
 		 * attach when board support is present as determined
 		 * by of property.
 		 */
-		ret = spi_nor_scan(nor, NULL, &hwcaps);
+		ret = spi_nor_scan(nor, NULL, &child_hwcaps);
 		if (ret)
 			break;
 
Index: linux-openbmc.git/arch/arm/boot/dts/aspeed-bmc-opp-tacoma.dts
===================================================================
--- linux-openbmc.git.orig/arch/arm/boot/dts/aspeed-bmc-opp-tacoma.dts
+++ linux-openbmc.git/arch/arm/boot/dts/aspeed-bmc-opp-tacoma.dts
@@ -158,6 +158,7 @@
 	flash at 0 {
 		status = "okay";
 		m25p,fast-read;
+		single-io;
 		label = "pnor";
 		spi-max-frequency = <100000000>;
 	};




More information about the openbmc mailing list