All of lore.kernel.org
 help / color / mirror / Atom feed
From: Vignesh Raghavendra <vigneshr@ti.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH RFT 0/3] spi-nor: spi-nor-ids: Fix 4 Byte addressing for n25q256 and n25q512*
Date: Tue, 24 Sep 2019 14:47:38 +0530	[thread overview]
Message-ID: <b1273c7d-7345-b7b2-191a-9636a426e637@ti.com> (raw)
In-Reply-To: <CAAh8qsx6-ubJ0Vq3iMCpwBW0ZeA+pJLniztNj0XtVmbkXU4u-A@mail.gmail.com>



On 24/09/19 2:13 PM, Simon Goldschmidt wrote:
> HI Vignesh,
> 
> On Tue, Sep 24, 2019 at 9:59 AM Vignesh Raghavendra <vigneshr@ti.com> wrote:
>>
>> Hi Simon,
>>
>> On 24/09/19 12:32 PM, Simon Goldschmidt wrote:
>>> Hi Vignesh,
>>>
>>> On Tue, Sep 24, 2019 at 7:55 AM Vignesh Raghavendra <vigneshr@ti.com> wrote:
>>>>
>>>> This series removes SPI_NOR_4B_OPCODES flags from legacy variants of
>>>> n25q256* and n25q512* and adds entries for newer variants of those
>>>> flashes that support 4 Byte opcodes.
>>>>
>>>> I don't have the flash devices. So its only compile tested.
>>>>
>>>> Ashish, Simon,
>>>>
>>>> I would greatly appreciate if you could test these patches and make sure
>>>> 4 Byte opcodes are being used. (Probably by enabling/adding prints to
>>>> cmd->opcode in spi_mem_exec_op() in drivers/spi/spi-mem.c
>>>
>>> As written in my last mail, I currently cannot get SFDP to work on my board:
>>> I keep getting 0xffdddfdf instead of 0x50444653 (SFDP_SIGNATURE).
>>>
>>
>> Did it ever work on your board ie did you test it when you were testing
>> my patches porting SPI NOR framework from kernel?
> 
> I tested that series on the EBV Socrates (socfpga_socrates), while this is our
> custom board. It is similar, but the flash chips are different. So
> unfortunately, I don't know if it ever worked...
> 
> I'll try to run this series on socfpga_socrates soon.
> 
>>
>> What's the controller driver? Cadence QSPI?
> 
> Yes.

What does the DT snippet for flash node looks like?
I think cadence QSPI is broken for SFDP if it has:

	spi-rx-bus-width = <4>;

Driver does:

       if (rx_width & SPI_RX_QUAD)
                /* Instruction and address at DQ0, data at DQ0-3. */
                rd_reg |= CQSPI_INST_TYPE_QUAD << CQSPI_REG_RD_INSTR_TYPE_DATA_LSB;

So, driver tries to execute SFDP command in 1-1-4 mode which is wrong. 
For now try setting spi-rx-bus-width to 1 and see if SFDP works (of course this not the fix)

I have patches[1] to convert this driver to implement spi-mem framework which should help in fixing this issues.
Will post them probably@the start of merge window after some more testing. If you have time, please give it a try

[1] https://github.com/r-vignesh/u-boot.git branch: cqspi

Regards
Vignesh


> 
> Regards,
> Simon
> 
>>
>> Regards
>> Vignesh
>>
>>> Any idea for a reason of that? That device I have here seems to be equipped
>>> with an MT25QL256ABA, but that should not be an issue, I think.
>>>
>>> Regards,
>>> Simon
>>>
>>>>
>>>> Euginey,
>>>>
>>>> Could you test this series on top of latest u-boot master and confirm
>>>> that your test cases still work?
>>>>
>>>> Regards
>>>> Vignesh
>>>>
>>>> Vignesh Raghavendra (3):
>>>>   spi-nor: spi-nor-ids: Disable SPI_NOR_4B_OPCODES for n25q512* and
>>>>     n25q256*
>>>>   spi-nor: spi-nor-ids: Rename mt25qu512a entry
>>>>   spi-nor: spi-nor-ids: Add entries for newer variants of n25q256* and
>>>>     n25q512*
>>>>
>>>>  drivers/mtd/spi/spi-nor-ids.c | 13 ++++++++-----
>>>>  1 file changed, 8 insertions(+), 5 deletions(-)
>>>>
>>>> --
>>>> 2.23.0
>>>>
>>
>> --
>> Regards
>> Vignesh

-- 
Regards
Vignesh

  reply	other threads:[~2019-09-24  9:17 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-09-24  5:56 [U-Boot] [PATCH RFT 0/3] spi-nor: spi-nor-ids: Fix 4 Byte addressing for n25q256 and n25q512* Vignesh Raghavendra
2019-09-24  5:56 ` [U-Boot] [PATCH RFT 1/3] spi-nor: spi-nor-ids: Disable SPI_NOR_4B_OPCODES for n25q512* and n25q256* Vignesh Raghavendra
2019-09-24  5:56 ` [U-Boot] [PATCH RFT 2/3] spi-nor: spi-nor-ids: Rename mt25qu512a entry Vignesh Raghavendra
2019-09-24  5:56 ` [U-Boot] [PATCH RFT 3/3] spi-nor: spi-nor-ids: Add entries for newer variants of n25q256* and n25q512* Vignesh Raghavendra
2019-09-24 11:47   ` Simon Goldschmidt
2019-09-24 11:49     ` Simon Goldschmidt
2019-09-24 12:24     ` Tudor.Ambarus at microchip.com
2019-09-25  8:21       ` Vignesh Raghavendra
2019-09-25  8:27         ` Simon Goldschmidt
2019-09-25  9:09           ` Vignesh Raghavendra
2019-09-24  7:02 ` [U-Boot] [PATCH RFT 0/3] spi-nor: spi-nor-ids: Fix 4 Byte addressing for n25q256 " Simon Goldschmidt
2019-09-24  8:00   ` Vignesh Raghavendra
2019-09-24  8:43     ` Simon Goldschmidt
2019-09-24  9:17       ` Vignesh Raghavendra [this message]
2019-09-24  9:23         ` Simon Goldschmidt
2019-09-24  9:23   ` Tudor.Ambarus at microchip.com
2019-09-24  9:27     ` Simon Goldschmidt
2019-09-24 17:23 ` Eugeniy Paltsev
2019-09-25  8:11   ` Vignesh Raghavendra
2019-10-07 14:46     ` Eugeniy Paltsev
2019-10-09 11:48       ` Vignesh Raghavendra

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=b1273c7d-7345-b7b2-191a-9636a426e637@ti.com \
    --to=vigneshr@ti.com \
    --cc=u-boot@lists.denx.de \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.