From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtpout-04.galae.net (smtpout-04.galae.net [185.171.202.116]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 4192723EAB5 for ; Mon, 24 Nov 2025 08:25:34 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=185.171.202.116 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1763972738; cv=none; b=j97BXIRizWrmTzExoDXbUYJHEE5XBz7Crx1YPJ02/a9kkO7sdR8SwAgJvpcxJOmVsbC/Cp/av/mCByqwlubd8FKar3Wn4ETxGs7+Q6Zw2/19k8UClZjlND8oLvGtmRSCes2ehzuYXqr6ag03V9TWThssvvF9c8gqNIWE/NpB7OA= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1763972738; c=relaxed/simple; bh=ySeegTYBsSBUy2/pDPz+nslSsWNY7sI1vzlpJW3gb84=; h=From:To:Cc:Subject:In-Reply-To:References:Date:Message-ID: MIME-Version:Content-Type; b=bOx9pA1XreB0KcDIsxZX3s3m28QL7++Epwf8FFkiVbavmaubvKDXoZbGboiyYXCYp3ietGgSqpsimO7j5o/6PGqDlSSQmWkjbiumbsyIDDMKsWEODkST6HOmHVjtPElu+tIJ8cCftz8+bpzDfvlhV4TY89cBVJD7ch0lSHGx1gg= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=bootlin.com; spf=pass smtp.mailfrom=bootlin.com; dkim=pass (2048-bit key) header.d=bootlin.com header.i=@bootlin.com header.b=MYQ83/h5; arc=none smtp.client-ip=185.171.202.116 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=bootlin.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=bootlin.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=bootlin.com header.i=@bootlin.com header.b="MYQ83/h5" Received: from smtpout-01.galae.net (smtpout-01.galae.net [212.83.139.233]) by smtpout-04.galae.net (Postfix) with ESMTPS id DFE64C139A6; Mon, 24 Nov 2025 08:25:10 +0000 (UTC) Received: from mail.galae.net (mail.galae.net [212.83.136.155]) by smtpout-01.galae.net (Postfix) with ESMTPS id 78F6A606FC; Mon, 24 Nov 2025 08:25:33 +0000 (UTC) Received: from [127.0.0.1] (localhost [127.0.0.1]) by localhost (Mailerdaemon) with ESMTPSA id E57121037000C; Mon, 24 Nov 2025 09:25:29 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=dkim; t=1763972732; h=from:subject:date:message-id:to:cc:mime-version:content-type: content-transfer-encoding:in-reply-to:references; bh=gCy5N1WBUXX+tDLm3V71pH2fTObTCZIir5hgNTKW1Ds=; b=MYQ83/h5nHT/hZoOVwcUOoBmqvn0Hd0YkGB5ulSw7ewaBdxoYduMryrWLTPLe653F3y6vn H+StQbP1jTlQTEKYsHmdkDMN1o2NvHs7GSwrOxVcs08NIrcyu9nCNb9qMn9+9qUiyJ2OsD C952Cn9TTADIr4fFlF87qLTmoFdnhcixMFOo9uLXW4LcyyO0lw+4UYWgge97qPSh+anhqO MeEbvT6Y9BvAEiq/Me0FykD63VBgbGb0IqzWs8Rq2NNu1O9XDogSfPt2kGEWu3/momtprH 1pq3Pk201aE/IDTsdRYO1lBYZa6+vNrsUwhTW0kmWbrK9TYuMFDnBJOK4MooLg== From: Miquel Raynal To: "Michael Walle" Cc: "Marc Olberding" , "Tudor Ambarus" , "Pratyush Yadav" , "Richard Weinberger" , "Vignesh Raghavendra" , , Subject: Re: [PATCH] mtd: spi-nor: Fix w25q01jv flags In-Reply-To: (Michael Walle's message of "Mon, 24 Nov 2025 09:12:38 +0100") References: <20251121-w25q01jv_fixup-v1-1-3d175050db73@nvidia.com> <87jyzfzwpw.fsf@bootlin.com> User-Agent: mu4e 1.12.7; emacs 30.2 Date: Mon, 24 Nov 2025 09:25:28 +0100 Message-ID: <87bjkrzvk7.fsf@bootlin.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Last-TLS-Session-Version: TLSv1.3 Hi, On 24/11/2025 at 09:12:38 +01, "Michael Walle" wrote: > Hi, > >>> + .no_sfdp_flags =3D SECT_4K, >> >> This one is the right fix and should stand alone in its own patch (first >> in the series if you add support for the block protection). > > Only if that flash really doesn't have SFDP. But since the entry > didn't have a size property the flash *must* have SFDP in the first > place. Otherwise it won't even be probed. Please provide a dump of > the SFDP tables, see [1]. SFDP data is in lore, but not the params which are missing (?) Marc, can you compare with your data? https://lore.kernel.org/all/20250110-winbond-6-12-rc1-nor-volatile-bit-v3-1= -735363f8cc7d@bootlin.com/ > Also please provide the contents of > /sys/kernel/debug/spi-nor/spiN.N/params. > > -michael My understanding (which may clearly be erroneous) is that most of these flashes support 4K blocks but somehow don't advertise it in their SFDP data, so every time we describe a chip we must remember to tick that flag. I guess all^Wmost chips have 4k blocks compatibility support, but in general we prefer to use bigger blocks (the ones advertised in the SFDP data). Michael, am I being mislead by the decades of history that went through the spi-nor core? :) > [1] https://docs.kernel.org/driver-api/mtd/spi-nor.html#minimum-testing-r= equirements > >> >>> .fixups =3D &winbond_nor_multi_die_fixups, >>> }, { >>> .id =3D SNOR_ID(0xef, 0x50, 0x12), >> >> Thanks, >> Miqu=C3=A8l