From: Dinh Nguyen <dinguyen@kernel.org>
To: Vignesh Raghavendra <vigneshr@ti.com>, linux-spi@vger.kernel.org
Cc: "Ramuthevar,
Vadivel MuruganX" <vadivel.muruganx.ramuthevar@linux.intel.com>,
Tudor.Ambarus@microchip.com, Mark Brown <broonie@kernel.org>,
Richard Gong <richard.gong@intel.com>
Subject: Re: [RFC] Accessing QSPI device under mtd
Date: Sun, 1 Nov 2020 21:03:50 -0600 [thread overview]
Message-ID: <5261561d-17ad-2053-19fb-ae5301546b48@kernel.org> (raw)
In-Reply-To: <70ffca2c-f454-625e-5c87-4d30441763e9@ti.com>
On 10/31/20 12:24 AM, Vignesh Raghavendra wrote:
>
>
> On 10/31/20 12:53 AM, Dinh Nguyen wrote:
>> Hi Vignesh,
>>
>> I'm using the standard arm64 defconfig. Attached are 2 bootlogs, v5.8
>> and v5.9. On the v5.8, I can see the QSPI devices under /dev/mtdX, and
>> has this in the bootlog:
>>
>> [ 1.073562] cadence-qspi ff8d2000.spi: mt25qu02g (262144 Kbytes)
>> [ 1.079865] 2 fixed-partitions partitions found on MTD device
>> ff8d2000.spi.0
>> [ 1.086917] Creating 2 MTD partitions on "ff8d2000.spi.0":
>> [ 1.092401] 0x000000000000-0x000003fe0000 : "Boot and fpga data"
>> [ 1.103073] 0x000003fe0000-0x000010000000 : "Root Filesystem - JFFS2"
>>
>> In v5.9, I don't see the above output in the bootlog, and there are no
>> /dev/mtdX. I did a bisect and it resulted in commit "a314f6367787ee mtd:
>> spi-nor: Convert cadence-quadspi to use spi-mem framework". If I revert
>> this patch, then QSPI device is under /dev/mtdX.
>>
>> There were no changes in the Stratix10 DTS files between v5.8 and v5.9
>> that should have any affect on QSPI.
>>
>
> I think I found the problem. Looking at
> arch/arm64/boot/dts/altera/socfpga_stratix10_socdk.dts:
>
> &qspi {
> ...
> flash@0 {
> compatible = "n25q00a";
> ...
> };
> };
>
> Flash node is using non standard compatible "n25q00a". Per
> Documentation/devicetree/bindings/mtd/jedec,spi-nor.txt, SPI NOR flash
> node must include "jedec,spi-nor" as compatible.
>
> Old driver under drivers/mtd/spi-nor/ worked because, it directly called
> spi_nor_scan() w/o looking at compatible string.
>
> Could you try adding "jedec,spi-nor" to flash node's compatible list and
> see if everything works?
>
>
Yes, that fixed it! I have a question though, if I also change it to
"jedec,spi-nor" on the v5.8 kernel, prior to the spi-mem commit, I get
this error:
[ 1.075268] cadence-qspi ff8d2000.spi: unrecognized JEDEC id bytes:
d0 5d 91 08 22 00
[ 1.083091] cadence-qspi ff8d2000.spi: Cadence QSPI NOR probe failed -2
[ 1.089761] cadence-qspi: probe of ff8d2000.spi failed with error -2
Do you know why that is?
Thanks,
Dinh
next prev parent reply other threads:[~2020-11-02 3:03 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-10-29 19:47 [RFC] Accessing QSPI device under mtd Dinh Nguyen
2020-10-30 4:42 ` Vignesh Raghavendra
2020-10-30 19:23 ` Dinh Nguyen
2020-10-31 5:24 ` Vignesh Raghavendra
2020-11-02 3:03 ` Dinh Nguyen [this message]
2020-11-03 7:00 ` Vignesh Raghavendra
2020-11-03 14:01 ` Dinh Nguyen
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=5261561d-17ad-2053-19fb-ae5301546b48@kernel.org \
--to=dinguyen@kernel.org \
--cc=Tudor.Ambarus@microchip.com \
--cc=broonie@kernel.org \
--cc=linux-spi@vger.kernel.org \
--cc=richard.gong@intel.com \
--cc=vadivel.muruganx.ramuthevar@linux.intel.com \
--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).