openbmc.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: "Cédric Le Goater" <clg@kaod.org>
To: Shakeeb B K <shakeebbk@gmail.com>
Cc: openbmc@lists.ozlabs.org
Subject: Re: [ast2500] aspeed-smc fail with MX25L25635F
Date: Fri, 2 Apr 2021 09:15:47 +0200	[thread overview]
Message-ID: <da335562-6472-d165-8b91-0fcf6c6873f4@kaod.org> (raw)
In-Reply-To: <CABYu0Wi=Y2B0WsKqYd9Fin=Weow28ex6YzBPnKuoQq4cB26n6Q@mail.gmail.com>

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@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@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@0 {
 		status = "okay";
 		m25p,fast-read;
+		single-io;
 		label = "pnor";
 		spi-max-frequency = <100000000>;
 	};



  reply	other threads:[~2021-04-02  8:35 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-03-18 16:02 [ast2500] aspeed-smc fail with MX25L25635F Shakeeb B K
2021-04-01 10:17 ` Shakeeb B K
2021-04-01 11:22   ` Cédric Le Goater
2021-04-01 15:22     ` Shakeeb B K
2021-04-02  7:15       ` Cédric Le Goater [this message]
2021-04-05  6:08         ` Shakeeb B K
2021-04-06  8:51           ` Cédric Le Goater

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=da335562-6472-d165-8b91-0fcf6c6873f4@kaod.org \
    --to=clg@kaod.org \
    --cc=openbmc@lists.ozlabs.org \
    --cc=shakeebbk@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).