From: David Bauer <mail@david-bauer.net>
To: Shuhao Mai <shuhao.mai.1990@gmail.com>, Tudor.Ambarus@microchip.com
Cc: linux-mtd@lists.infradead.org, miquel.raynal@bootlin.com,
richard@nod.at, vigneshr@ti.com
Subject: Re: [PATCH] mtd: spi-nor: add support for Winbond W25Q512JV
Date: Fri, 16 Apr 2021 21:24:39 +0200 [thread overview]
Message-ID: <9150b806-17bb-cdfe-277b-0ca473a41e21@david-bauer.net> (raw)
In-Reply-To: <20210310074120.GA63@an990131127.quanta.corp>
Hi Shuhao,
Sorry for coming back late to this.
On 3/10/21 8:41 AM, Shuhao Mai wrote:
> On Tue, Mar 09, 2021 at 07:53:59AM +0000, Tudor.Ambarus@microchip.com wrote:
>> On 3/8/21 8:03 PM, David Bauer wrote:
>>> EXTERNAL EMAIL: Do not click links or open attachments unless you know the content is safe
>>>
>>> Hi Tudor,
>>>
>>> On 3/8/21 6:50 AM, Tudor.Ambarus@microchip.com wrote:
>>>> On 2/13/21 5:10 PM, David Bauer wrote:
>>>>> EXTERNAL EMAIL: Do not click links or open attachments unless you know the content is safe
>>>>>
>>>>> The Winbond W25Q512JV is a 512mb SPI-NOR chip. It supports 4K
>>>>> sectors as well as block protection and Dual-/Quad-read.
>>>>>
>>>>> Tested on: Ubiquiti UniFi 6 LR
>>>>>
>>>>> Signed-off-by: David Bauer <mail@david-bauer.net>
>>>>
>>>> David, I'll take Shuhao's patch because he sent it first:
>>>> https://patchwork.ozlabs.org/project/linux-mtd/patch/20210208075303.4200-1-shuhao.mai.1990@gmail.com/
>>>
>>> Fine with me, I have not found this patch :)
>>>
>>>>
>>>> Would you make an incremental patch on top op Shuhao's, to add the
>>>> locking support?
>>>
>>> Sure, It's necessary for the board (UniFi 6 LR), as the bootloader locks the flash on boot.
>>
>> Is it necessary to unlock the flash at boot time?
>> You can unlock the flash from user-space, using mtd-utils.
>>
>> Have you tried to lock/unlock portions of the flash using mtd-utils,
>> and check if what was locked corresponds to what the datasheet indicates?
>>
>>>
>>> I'll send a new patch for the lock support.
>>>
>> Great, thanks!
>> ta
>
> Hi Tudor and David,
>
>
> I made a quick test on flash_lock with kernel 5.8.18 and mtd-utils
> v2.1.2. It returns "could not lock device: /dev/mtd0" and "error 22
> (Invalid argument)".
>
> Could be the error caused by my test environment, if it's functional on
> UniFi 6 LR.
Were these partitions starting with the first / ending with the last block on the flash chip?
Locking / unlocking mtd partitions not aligned at the beginning / end of the chip sound will
return invalid argument.
For the UniFi 6 LR, these flags are required, as otherwise the lower half of the flash
remains write protected (the bootloader actively enables this protection for whatever reason).
I'll send a rebased patch adding the required flags shortly.
Best wishes
David
>
>
> Sincerely
> Shuhao
>
______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/
next prev parent reply other threads:[~2021-04-16 19:25 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-02-13 15:10 [PATCH] mtd: spi-nor: add support for Winbond W25Q512JV David Bauer
2021-03-08 5:50 ` Tudor.Ambarus
2021-03-08 18:03 ` David Bauer
2021-03-09 7:53 ` Tudor.Ambarus
2021-03-10 7:41 ` Shuhao Mai
2021-04-16 19:24 ` David Bauer [this message]
2021-05-05 2:25 ` Shuhao Mai
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=9150b806-17bb-cdfe-277b-0ca473a41e21@david-bauer.net \
--to=mail@david-bauer.net \
--cc=Tudor.Ambarus@microchip.com \
--cc=linux-mtd@lists.infradead.org \
--cc=miquel.raynal@bootlin.com \
--cc=richard@nod.at \
--cc=shuhao.mai.1990@gmail.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