From: Michael Walle <michael@walle.cc>
To: Biju Das <biju.das.jz@bp.renesas.com>
Cc: Geert Uytterhoeven <geert@linux-m68k.org>,
Miquel Raynal <miquel.raynal@bootlin.com>,
Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>,
Prabhakar Mahadev Lad <prabhakar.mahadev-lad.rj@bp.renesas.com>,
linux-renesas-soc@vger.kernel.org,
Vignesh Raghavendra <vigneshr@ti.com>,
Tudor Ambarus <tudor.ambarus@linaro.org>,
Mark Brown <broonie@kernel.org>,
MTD Maling List <linux-mtd@lists.infradead.org>,
linux-spi <linux-spi@vger.kernel.org>,
Rob Herring <robh+dt@kernel.org>
Subject: Re: [PATCH] memory: renesas-rpc-if: Fix IO state based on flash type
Date: Thu, 14 Sep 2023 14:31:30 +0200 [thread overview]
Message-ID: <41a960b2a039ab88cb8a6ed6ed21e067@walle.cc> (raw)
In-Reply-To: <OS0PR01MB5922A4F16DE8923373AA5DD886F7A@OS0PR01MB5922.jpnprd01.prod.outlook.com>
Hi,
>> >> > I'm not sure we can do that, as this code is part of the hardware
>> >> > initialization during probing.
>> >> > Biju: is this needed that early, or can it be done later, after the
>> >> > connected device has been identified?
>> >>
>> >> I need to check that.
>> >>
>> >> You mean patch drivers/spi/spi-rpc-if.c to identify the flash type
>> >> from sfdp info and pass as a parameter to rpcif_hw_init??
>> >
>> > Something like that.
>> >
>> > That configuration should be saved somewhere, as rpcif_hw_init() is
>> > also called from rpcif_resume(), and when recovering from an error in
>> > rpcif_manual_xfer().
>>
>> I'm not sure I follow everything here, but apparently you want to set
>> the
>> mode of the I/O pins of the controller, right? Shouldn't that depend
>> on the
>> spi-mem mode, i.e. the buswidth? Certainly not on the type of flash
>> which
>> is connected to the spi controller.
>
>
> How do you handle the IO states sections mentioned in the HW manual[1]
> and [2]?
What do you mean by "IO states" you don't configure anything on the SPI
flash, do you?
I guess you should have to configure your SoC SPI pins in your
.exec_op()
callback according to the buswidth property. Have a look at the other
spi drivers. I'm not that familiar with the spi controller drivers.
> Without this setting flash detection/ read/write failing with tx in
> 4-bit mode.
>
> [1] Figure 20: QUAD INPUT/OUTPUT FAST READ - EBh/ECh
>
> https://media-www.micron.com/-/media/client/global/documents/products/data-sheet/nor-flash/serial-nor/mt25q/die-rev-a/mt25q_qlks_u_512_aba_0.pdf?rev=3e5b2a574f7b4790b6e58dacf4c889b2
>
> [2] section 8.14
>
> https://www.renesas.com/eu/en/document/dst/at25ql128a-datasheet?r=1608586
Section 8.14 shows a Read with Quad I/O and the flash will tri-state
the I/O lines during the command and dummy phase and drive them during
data phase (and expect an address from the SoC on all I/Os during
address
and mode phase).
-michael
next prev parent reply other threads:[~2023-09-14 12:31 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20230830145835.296690-1-biju.das.jz@bp.renesas.com>
2023-08-30 15:08 ` [PATCH] memory: renesas-rpc-if: Fix IO state based on flash type Geert Uytterhoeven
2023-08-30 15:18 ` Biju Das
2023-09-14 8:08 ` Krzysztof Kozlowski
2023-09-14 8:34 ` Geert Uytterhoeven
2023-09-14 8:59 ` Miquel Raynal
2023-09-14 9:04 ` Geert Uytterhoeven
2023-09-14 9:12 ` Miquel Raynal
2023-09-14 9:23 ` Geert Uytterhoeven
2023-09-14 9:37 ` Biju Das
2023-09-14 9:55 ` Geert Uytterhoeven
2023-09-14 11:27 ` Michael Walle
2023-09-14 12:17 ` Biju Das
2023-09-14 12:31 ` Michael Walle [this message]
2023-09-14 12:59 ` Biju Das
2023-09-14 13:17 ` Michael Walle
2023-09-14 13:32 ` Michael Walle
2023-11-08 10:57 ` Biju Das
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=41a960b2a039ab88cb8a6ed6ed21e067@walle.cc \
--to=michael@walle.cc \
--cc=biju.das.jz@bp.renesas.com \
--cc=broonie@kernel.org \
--cc=geert@linux-m68k.org \
--cc=krzysztof.kozlowski@linaro.org \
--cc=linux-mtd@lists.infradead.org \
--cc=linux-renesas-soc@vger.kernel.org \
--cc=linux-spi@vger.kernel.org \
--cc=miquel.raynal@bootlin.com \
--cc=prabhakar.mahadev-lad.rj@bp.renesas.com \
--cc=robh+dt@kernel.org \
--cc=tudor.ambarus@linaro.org \
--cc=vigneshr@ti.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).