From: Miquel Raynal <miquel.raynal@bootlin.com>
To: zhengxunli <zhengxunli@mxic.com.tw>
Cc: juliensu@mxic.com.tw, ycllin@mxic.com.tw, linux-mtd@lists.infradead.org
Subject: Re: [PATCH 1/3] mtd: spi-nor: macronix: add support for Macronix octaflash
Date: Mon, 1 Feb 2021 16:06:29 +0100 [thread overview]
Message-ID: <20210201160629.4c872643@xps13> (raw)
In-Reply-To: <20210201154429.4bd5e15a@xps13>
> > + SPI_MEM_OP(SPI_MEM_OP_CMD(SPINOR_OP_WR_CR2, 1),
> > + SPI_MEM_OP_ADDR(4, SPINOR_REG_MXIC_CR2_DC, 1),
> > + SPI_MEM_OP_NO_DUMMY,
> > + SPI_MEM_OP_DATA_OUT(1, buf, 1));
> > +
> > + ret = spi_mem_exec_op(nor->spimem, &op);
> > + if (ret)
> > + return ret;
> > +
> > + ret = spi_nor_wait_till_ready(nor);
> > + if (ret)
> > + return ret;
> > +
> > + nor->read_dummy = 20;
>
> I am not entirely convinced by this value, yet.
>
> If I understand correctly your issue, the flash needs some extra time
> before receiving/sending data. You estimate it to be around 800ns
> (20 bytes @ 20MHz), so would it be possible to derive the minimum
> number of dummy cycles needed for the flash and use a dynamic value?
> Otherwise if the controller is not running at the maximum frequency
> you'll end up waiting a lot more than expected.
Just to clarify, I meant 20 bytes @ 200Mhz, not 20MHz, and I got
possibly fooled by the fact that we are talking about DDR mode, so
400ns is probably more accurate than 800. But no matter the actual
numbers, let's discuss the logic more than the values.
Thanks,
Miquèl
______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/
next prev parent reply other threads:[~2021-02-01 15:07 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-01-29 8:13 [PATCH 0/3] Add octal DTR support for Macronix flash zhengxunli
2021-01-29 8:13 ` [PATCH 1/3] mtd: spi-nor: macronix: add support for Macronix octaflash zhengxunli
2021-02-01 14:44 ` Miquel Raynal
2021-02-01 15:06 ` Miquel Raynal [this message]
2021-02-01 19:55 ` Pratyush Yadav
2021-01-29 8:13 ` [PATCH 2/3] spi: mxic: patch for octal DTR mode support zhengxunli
2021-02-01 14:49 ` Miquel Raynal
2021-02-01 20:10 ` Pratyush Yadav
2021-02-01 21:20 ` Miquel Raynal
[not found] ` <OF6211E4EF.55839180-ON48258670.0011946B-48258670.001EE31F@mxic.com.tw>
2021-02-02 8:06 ` Miquel Raynal
2021-01-29 8:13 ` [PATCH 3/3] spi: mxic: add maximum speed of spi host zhengxunli
2021-02-01 15:02 ` Miquel Raynal
[not found] ` <OFCBF59ED0.4C198CA3-ON48258670.00236718-48258670.0026E452@mxic.com.tw>
2021-02-02 8:04 ` Miquel Raynal
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=20210201160629.4c872643@xps13 \
--to=miquel.raynal@bootlin.com \
--cc=juliensu@mxic.com.tw \
--cc=linux-mtd@lists.infradead.org \
--cc=ycllin@mxic.com.tw \
--cc=zhengxunli@mxic.com.tw \
/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).