linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: <Tudor.Ambarus@microchip.com>
To: <p.yadav@ti.com>, <quic_c_sbhanu@quicinc.com>
Cc: <michael@walle.cc>, <miquel.raynal@bootlin.com>, <richard@nod.at>,
	<vigneshr@ti.com>, <linux-mtd@lists.infradead.org>,
	<linux-kernel@vger.kernel.org>, <quic_asutoshd@quicinc.com>,
	<quic_rampraka@quicinc.com>, <quic_pragalla@quicinc.com>,
	<quic_sartgarg@quicinc.com>, <quic_nitirawa@quicinc.com>,
	<quic_sayalil@quicinc.com>
Subject: Re: [PATCH V8] mtd: spi-nor: winbond: add support for W25Q512NW-IM
Date: Tue, 19 Apr 2022 07:32:36 +0000	[thread overview]
Message-ID: <4324bf7f-e397-7510-96a2-5a309e30d76c@microchip.com> (raw)
In-Reply-To: <20220419042742.qqfj6wurpxxqhr6l@ti.com>

On 4/19/22 07:27, Pratyush Yadav wrote:
> EXTERNAL EMAIL: Do not click links or open attachments unless you know the content is safe
> 
> On 25/03/22 12:36PM, Shaik Sajida Bhanu wrote:
>> Add support for winbond W25Q512NW-IM chip.
>>
>> Below are the tests done:
>>
>> 1. Verified flashing binary image on spi card using flashrom tool.
>> 2. Verified OTP support, below are the test results:
>>
>>  localhost / # cat
>>  /sys/bus/platform/devices/soc\@0/88dc000.spi/spi_master/spi16/
>>  spi16.0/spi-nor/jedec_id
>>  ef8020
>>
>>  localhost / # cat
>>  /sys/bus/platform/devices/soc\@0/88dc000.spi/spi_master/spi16/
>>  spi16.0/spi-nor/manufacturer
>>  winbond
>>
>>  localhost / # cat
>>  /sys/bus/platform/devices/soc\@0/88dc000.spi/spi_master/spi16/
>>  spi16.0/spi-nor/partname
>>  w25q512nwm
>>
>>  localhost / # hexdump
>>  /sys/bus/platform/devices/soc\@0/88dc000.spi/spi_master/sp
>>  i16/spi16.0/spi-nor/sfdp
>>  0000000 4653 5044 0106 ff01 0600 1001 0080 ff00
>>  0000010 0084 0201 00d0 ff00 ffff ffff ffff ffff
>>  0000020 6800 6c65 6f6c 7720 726f 646c ffff ffff
>>  0000030 ffff ffff ffff ffff ffff ffff ffff ffff
>>  *
>>  0000080 20e5 fffb ffff 1fff eb44 6b08 3b08 bb42
>>  0000090 fffe ffff ffff 0000 ffff eb40 200c 520f
>>  00000a0 d810 0000 0233 00a6 e781 d914 63e9 3376
>>  00000b0 757a 757a bdf7 5cd5 f719 ff5d 70e9 a5f9
>>  00000c0 ffff ffff ffff ffff ffff ffff ffff ffff
>>  00000d0 0aff fff0 ff21 ffdc
>>  00000d8
>>
>>  localhost / # md5sum
>>  /sys/bus/platform/devices/soc\@0/88dc000.spi/spi_master/spi
>>  16/spi16.0/spi-nor/sfdp
>>  106d89d6c049110bc94c01517cb4ce24
>>  /sys/bus/platform/devices/soc@0/88dc000.spi/
>>  spi_master/spi16/spi16.0/spi-nor/sfdp
>>
>> 3. Tested flash lock, below are the test results (looks like the lock is
>>  not working as expected, so when we do lock the whole card and tried to
>>  write, write was successful without any errors.)
> 
> What should we do with this then? Drop the locking support? Or is there
> something wrong/missing in SPI NOR core that needs to be fixed first so
> locking for this flash works?
> 

If the locking isn't working for this flash, please drop the locking flags
until you identify the problem and fix it.

>>
>>  localhost ~ # flash_lock -i /dev/mtd0
>>  Device: /dev/mtd0
>>  Start: 0
>>  Len: 0x4000000
>>  Lock status: locked
>>  Return code: 1
>>  localhost ~ # mtd_debug erase /dev/mtd0 0x400000 4096
>>  Erased 4096 bytes from address 0x00400000 in flash
>>  localhost ~ # mtd_debug read /dev/mtd0 0x400000 4096
>>  temp
>>  Copied 4096 bytes from address 0x00400000 in flash
>>  to temp
>>  localhost ~ # mtd_debug write /dev/mtd0 0x400000
>>  4096 temp
>>  Copied 4096 bytes from temp to address 0x00400000
>>  in flash
>>  localhost ~ # flash_lock -u /dev/mtd0
>>  localhost ~ # flash_lock -i /dev/mtd0
>>  Device: /dev/mtd0
>>  Start: 0
>>  Len: 0x4000000
>>  Lock status: unlocked
>>  Return code: 0
>>  localhost ~ # mtd_debug erase /dev/mtd0 0x400000 4096
>>  Erased 4096 bytes from address 0x00400000 in flash
>>  localhost ~ # mtd_debug read /dev/mtd0 0x400000
>>  4096 tempCopied 4096 bytes from address 0x00400000 in
>>  flash to temp
>>  localhost ~ # mtd_debug write /dev/mtd0 0x400000 4096 temp
>>  Copied 4096 bytes from temp to address 0x00400000 in flash
>>  localhost ~ #
>>
>> Signed-off-by: Shaik Sajida Bhanu <quic_c_sbhanu@quicinc.com>
>> Reviewed-by: Doug Anderson <dianders@chromium.org>
>> Reviewed-by: Michael Walle <michael@walle.cc>
> [...]
> 
> --
> Regards,
> Pratyush Yadav
> Texas Instruments Inc.


  reply	other threads:[~2022-04-19  7:32 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-03-25  7:06 [PATCH V8] mtd: spi-nor: winbond: add support for W25Q512NW-IM Shaik Sajida Bhanu
2022-04-19  4:27 ` Pratyush Yadav
2022-04-19  7:32   ` Tudor.Ambarus [this message]
2022-04-29 11:35     ` Sajida Bhanu (Temp)
2022-04-21 21:48 ` Michael Walle

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=4324bf7f-e397-7510-96a2-5a309e30d76c@microchip.com \
    --to=tudor.ambarus@microchip.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mtd@lists.infradead.org \
    --cc=michael@walle.cc \
    --cc=miquel.raynal@bootlin.com \
    --cc=p.yadav@ti.com \
    --cc=quic_asutoshd@quicinc.com \
    --cc=quic_c_sbhanu@quicinc.com \
    --cc=quic_nitirawa@quicinc.com \
    --cc=quic_pragalla@quicinc.com \
    --cc=quic_rampraka@quicinc.com \
    --cc=quic_sartgarg@quicinc.com \
    --cc=quic_sayalil@quicinc.com \
    --cc=richard@nod.at \
    --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).