From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-alma10-1.taild15c8.ts.net [100.103.45.18]) (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 907C732B108 for ; Thu, 28 May 2026 07:52:12 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=100.103.45.18 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1779954733; cv=none; b=qSh+/eoiMt8A3dD/O/ml5am8J/bDXJAPxPKsd5UeIGjxGF6NDTQ50XYWFnIUe/Psd7TaPh9fBpqRjIci8gzwHysWOqjoqEV0Vsk9Gpfb/YKo3sbiO4fNMBI37+LB+JS1O/vNPeCw4FfDc+pr/sHmFVeqIKW0o1CQXnaS0Ekltpg= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1779954733; c=relaxed/simple; bh=7NbnqRt/KPBhuJGSag4CmWhhsupkzCehk6Ae8PrBRVI=; h=Mime-Version:Content-Type:Date:Message-Id:To:Subject:Cc:From: References:In-Reply-To; b=Rt1F1LKkWR2SWcAfxPNc5Y/tLUEiDlsrLvUSBnGgdoWVAac5aWW3hXCifbE/9WNw/0MvQlZrZCIaRHDeyIXxoyj2DZymKXrxqY+iZUEYeC91gy7ZZEJ0kX/t2HQftqpsV4VaCMf8ccRxz1CX5Lpxw+wfX95hZB6MsEAfl4Zr8OE= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=kmGPG3q+; arc=none smtp.client-ip=100.103.45.18 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="kmGPG3q+" Received: by smtp.kernel.org (Postfix) with UTF8SMTPSA id E265F1F00A3A; Thu, 28 May 2026 07:52:11 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1779954732; bh=2GMkjPxX2bdw46i4uwyD0Ly6pBU0GmTzAqTMf4hdkRI=; h=Date:To:Subject:Cc:From:References:In-Reply-To; b=kmGPG3q+QT6ER7LA5P38moW3cF68TRwJfA/25p9dCUS681urOmZikYpa3cXzLHpXI 6P6zA9g78QE2BIS+xXG365jtFUENZSM0aWpXrkjohntXrSgDNbP3VeWuUVmbS9Ebwa zrX9CcXyONX6+H8tU1lUfaE7pqYwpFo/Dxdsli1VBYEI6My0gaJI9SO0C36EUDNOBh apVBl5uNNpqWkMSWk8SgAcstMXo7FdYq57bt9uP7T/HC7HZXvGrpz0LKp96otJ1vcS ITF+Bwc8U7MfBg6sL/0OTAyN1u6sCbq4SxtzRIqycbEZN8XrzwZuDGkQMN0Xjszd5D tUHrEgo7HFG5A== Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 Content-Type: multipart/signed; boundary=925f76c6de4a818e9399224f463366c077bdf0fc82b27f5e98e940a62e31; micalg=pgp-sha384; protocol="application/pgp-signature" Date: Thu, 28 May 2026 09:52:08 +0200 Message-Id: To: "Miquel Raynal" , "Cheng Ming Lin" Subject: Re: [PATCH] mtd: spi-nor: Add support for MX25L12833F and MX25L12845G Cc: "Pratyush Yadav" , "Takahiro Kuwano" , "Richard Weinberger" , "Vignesh Raghavendra" , , , , "Cheng Ming Lin" From: "Michael Walle" X-Mailer: aerc 0.20.0 References: <20260528051751.1648246-1-linchengming884@gmail.com> <87eciwhtf8.fsf@bootlin.com> In-Reply-To: <87eciwhtf8.fsf@bootlin.com> --925f76c6de4a818e9399224f463366c077bdf0fc82b27f5e98e940a62e31 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=UTF-8 Hi, On Thu May 28, 2026 at 9:42 AM CEST, Miquel Raynal wrote: > Hi Cheng Ming, > >>> It looks like you're getting bitten by the ID reuse. You can't just >>> unconditionally add the quad PP because as far as I can see the >>> MX25L12805D [1] is just a standard single bit i/o flash and doesn't >>> support the 4PP. >> >> You are absolutely right. Thanks for catching this. >> >> The MX25L12805D is indeed a much older product (released around 2009). >> Since the initial JESD216 SFDP standard wasn't published until 2011, >> I double-checked with our internal PM and confirmed that the MX25L12805D >> does not support SFDP at all. >> >> Since the newer flashes (MX25L12833F and MX25L12845G) do support SFDP, >> we could use this as a differentiator to distinguish them from the legac= y >> MX25L12805D. >> >> What if we try to read the SFDP signature (RDSFDP) in the fixup hook? >> If a valid SFDP signature is detected, we can safely identify it as the >> newer flash and apply the SNOR_HWCAPS_PP_1_4_4 capability. If there is >> no SFDP signature, we leave it as is for the legacy MX25L12805D. >> >> Do you think this approach is feasible and acceptable? If so, I will >> implement this logic and submit a v2 patch. > > The ->post_sfdp() fixup hook is documented as "not called for SPI NORs > that do not support SFDP". Alternatively, I believe an earlier hook, > like ->post_bfpt() could also work since it does not seem to run on > non SFDP compatible flashes. Moreover: * spi_nor_post_sfdp_fixups() is called after the SFDP tables are parsed= . * It is used to tweak various flash parameters when information provide= d * by the SFDP tables are wrong. And it looks like that is the case for these flashes. Also, please provide a comment on the fixup describing that the flash misses that property. Basically, what you've written in the commit message. -michael --925f76c6de4a818e9399224f463366c077bdf0fc82b27f5e98e940a62e31 Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iKgEABMJADAWIQTIVZIcOo5wfU/AngkSJzzuPgIf+AUCahf0KBIcbXdhbGxlQGtl cm5lbC5vcmcACgkQEic87j4CH/hD6gF9EgLZdXSAupg/3ipw2fvtR9bRXS5g/Pvx X8fTvB0ix0lcfAVEkuVUAjtOJTxr/9yuAX9aFnjlczgHvO2Wg4aaRy7Af6up486X /WhadFLeFZAUdcjw6Uy4iGdYLtn/aYT5lhw= =/t2e -----END PGP SIGNATURE----- --925f76c6de4a818e9399224f463366c077bdf0fc82b27f5e98e940a62e31--