Re: [PATCH] mtd: spi-nor: Clear Winbond SR3 WPS bit on boot

2024-05-24 Thread Jagan Teki
On Mon, Mar 4, 2024 at 9:46 PM Marek Vasut wrote: > > Some Winbond SPI NORs have special SR3 register which is > used among other things to control whether non-standard > "Individual Block/Sector Write Protection" (WPS bit) > locking scheme is activated. This non-standard locking > scheme is not

Re: [PATCH] mtd: spi-nor: Clear Winbond SR3 WPS bit on boot

2024-05-15 Thread Marek Vasut
On 3/6/24 1:55 PM, Michael Walle wrote: Hi, On Wed Mar 6, 2024 at 3:56 AM CET, Marek Vasut wrote: I'd argue if one wants to use the locking at all, you have to set UNLOCK_ALL=n. Otherwise, the bootloader might come alone and just clear your locking bits again. Clearing the WPS bit there is

Re: [PATCH] mtd: spi-nor: Clear Winbond SR3 WPS bit on boot

2024-03-06 Thread Michael Walle
Hi, On Wed Mar 6, 2024 at 3:56 AM CET, Marek Vasut wrote: > > I'd argue if one wants to use the locking at all, you have to set > > UNLOCK_ALL=n. Otherwise, the bootloader might come alone and just > > clear your locking bits again. Clearing the WPS bit there is just > > one more thing which IMHO

Re: [PATCH] mtd: spi-nor: Clear Winbond SR3 WPS bit on boot

2024-03-05 Thread Marek Vasut
On 3/5/24 10:41 PM, Michael Walle wrote: On Tue Mar 5, 2024 at 7:54 PM CET, Marek Vasut wrote: On 3/5/24 5:55 PM, Michael Walle wrote: [...] Clearing this SR3 WPS bit fixes that problem, both in U-Boot and in Linux, since Linux that is booted afterward then gets a device that has locking

Re: [PATCH] mtd: spi-nor: Clear Winbond SR3 WPS bit on boot

2024-03-05 Thread Michael Walle
On Tue Mar 5, 2024 at 7:54 PM CET, Marek Vasut wrote: > On 3/5/24 5:55 PM, Michael Walle wrote: > > [...] > > >> Clearing this SR3 WPS bit fixes that problem, both in U-Boot and in > >> Linux, since Linux that is booted afterward then gets a device that has > >> locking scheme

Re: [PATCH] mtd: spi-nor: Clear Winbond SR3 WPS bit on boot

2024-03-05 Thread Marek Vasut
On 3/5/24 5:55 PM, Michael Walle wrote: [...] Clearing this SR3 WPS bit fixes that problem, both in U-Boot and in Linux, since Linux that is booted afterward then gets a device that has locking scheme configured in a way that Linux expects and can operate. Better yet, if some old LTS version

Re: [PATCH] mtd: spi-nor: Clear Winbond SR3 WPS bit on boot

2024-03-05 Thread Michael Walle
On Tue Mar 5, 2024 at 5:28 PM CET, Marek Vasut wrote: > On 3/5/24 4:53 PM, Michael Walle wrote: > > On Tue Mar 5, 2024 at 4:37 PM CET, Marek Vasut wrote: > >> On 3/5/24 1:50 PM, Michael Walle wrote: > >>> On Tue Mar 5, 2024 at 1:31 PM CET, Marek Vasut wrote: > On 3/5/24 9:55 AM, Michael Walle

Re: [PATCH] mtd: spi-nor: Clear Winbond SR3 WPS bit on boot

2024-03-05 Thread Marek Vasut
On 3/5/24 4:53 PM, Michael Walle wrote: On Tue Mar 5, 2024 at 4:37 PM CET, Marek Vasut wrote: On 3/5/24 1:50 PM, Michael Walle wrote: Hi Marek, Hi, On Tue Mar 5, 2024 at 1:31 PM CET, Marek Vasut wrote: On 3/5/24 9:55 AM, Michael Walle wrote: On Mon Mar 4, 2024 at 5:16 PM CET, Marek Vasut

Re: [PATCH] mtd: spi-nor: Clear Winbond SR3 WPS bit on boot

2024-03-05 Thread Michael Walle
On Tue Mar 5, 2024 at 4:37 PM CET, Marek Vasut wrote: > On 3/5/24 1:50 PM, Michael Walle wrote: > > Hi Marek, > > Hi, > > > On Tue Mar 5, 2024 at 1:31 PM CET, Marek Vasut wrote: > >> On 3/5/24 9:55 AM, Michael Walle wrote: > >>> On Mon Mar 4, 2024 at 5:16 PM CET, Marek Vasut wrote: > Some

Re: [PATCH] mtd: spi-nor: Clear Winbond SR3 WPS bit on boot

2024-03-05 Thread Marek Vasut
On 3/5/24 1:50 PM, Michael Walle wrote: Hi Marek, Hi, On Tue Mar 5, 2024 at 1:31 PM CET, Marek Vasut wrote: On 3/5/24 9:55 AM, Michael Walle wrote: On Mon Mar 4, 2024 at 5:16 PM CET, Marek Vasut wrote: Some Winbond SPI NORs have special SR3 register which is used among other things to

Re: [PATCH] mtd: spi-nor: Clear Winbond SR3 WPS bit on boot

2024-03-05 Thread Michael Walle
Hi Marek, On Tue Mar 5, 2024 at 1:31 PM CET, Marek Vasut wrote: > On 3/5/24 9:55 AM, Michael Walle wrote: > > On Mon Mar 4, 2024 at 5:16 PM CET, Marek Vasut wrote: > >> Some Winbond SPI NORs have special SR3 register which is > >> used among other things to control whether non-standard > >>

Re: [PATCH] mtd: spi-nor: Clear Winbond SR3 WPS bit on boot

2024-03-05 Thread Marek Vasut
On 3/5/24 9:55 AM, Michael Walle wrote: [+ linux-mtd ] Hi Marek, Hi, On Mon Mar 4, 2024 at 5:16 PM CET, Marek Vasut wrote: Some Winbond SPI NORs have special SR3 register which is used among other things to control whether non-standard "Individual Block/Sector Write Protection" (WPS bit)

Re: [PATCH] mtd: spi-nor: Clear Winbond SR3 WPS bit on boot

2024-03-05 Thread Michael Walle
[+ linux-mtd ] Hi Marek, On Mon Mar 4, 2024 at 5:16 PM CET, Marek Vasut wrote: > Some Winbond SPI NORs have special SR3 register which is > used among other things to control whether non-standard > "Individual Block/Sector Write Protection" (WPS bit) > locking scheme is activated. This

[PATCH] mtd: spi-nor: Clear Winbond SR3 WPS bit on boot

2024-03-04 Thread Marek Vasut
Some Winbond SPI NORs have special SR3 register which is used among other things to control whether non-standard "Individual Block/Sector Write Protection" (WPS bit) locking scheme is activated. This non-standard locking scheme is not supported by either U-Boot or Linux SPI NOR stack so make sure