From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtpout-02.galae.net (smtpout-02.galae.net [185.246.84.56]) (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 B846E347BA7 for ; Thu, 28 May 2026 07:42:12 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=185.246.84.56 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1779954136; cv=none; b=KlhVhqjixDFLZw7G2t8Nbg3S8YYx09j9aEDSH6n0SY5oqnLLd2qleuVc2Yt+50SLCf/kQsiiuzwefxz4YsM5mYECZTzttl6xNTgaEXnay8xnZNUg1jB4mso30Z8kalEw381OCdbhYxBWvGs2yI5iV5g6CeCqO4GCv/Xri706L0Y= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1779954136; c=relaxed/simple; bh=JG+4WJntSimt2FPv7soTEK4i7pajIv6cOg6yuhgnh2o=; h=From:To:Cc:Subject:In-Reply-To:References:Date:Message-ID: MIME-Version:Content-Type; b=CJomlHhYgGWj7H6jccm1DOSA5N/Ct3l75gV5t5dsN62tmDvx0mTrb0klA8Cu0Oqe4bxu0P/M7lJw33+e1A+TDUyfP8FxhXJghSRkyMF89Z5nmtGghwQKv6/eOAmztUGzaUJdbF5GrkXTvUUk2iocTwI2gZevz8V6snlvwJsotjY= 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=nk8AdHTs; arc=none smtp.client-ip=185.246.84.56 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="nk8AdHTs" Received: from smtpout-01.galae.net (smtpout-01.galae.net [212.83.139.233]) by smtpout-02.galae.net (Postfix) with ESMTPS id 086F51A36FF; Thu, 28 May 2026 07:42:11 +0000 (UTC) Received: from mail.galae.net (mail.galae.net [212.83.136.155]) by smtpout-01.galae.net (Postfix) with ESMTPS id C0DB060495; Thu, 28 May 2026 07:42:10 +0000 (UTC) Received: from [127.0.0.1] (localhost [127.0.0.1]) by localhost (Mailerdaemon) with ESMTPSA id 310C51088806E; Thu, 28 May 2026 09:42:03 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=dkim; t=1779954130; h=from:subject:date:message-id:to:cc:mime-version:content-type: content-transfer-encoding:in-reply-to:references; bh=JG+4WJntSimt2FPv7soTEK4i7pajIv6cOg6yuhgnh2o=; b=nk8AdHTskLd24iFJo+Muuy6Y2J/PSUg/ztetS7mediHMLwiTkvVg4S7XDJed4dShSjLu/X TtBudKv7nziTpJGHNa1pExRv+Skp7HkIH5NR0ZdDS9At+sR5dMwpsJ3qRunRyUEy+KZ8Sn G+vmOa4/hCL0MjSBD8K0VNh8Ceq1K1KurS7kkLEjGWJWwS44xaLgr9a3YaupkbL6xJWm/0 Dv8lwv5Dej2np5PlcCtiIZZd9K6lP7x6S0LZpUyNL7aRONeaBuIZqKZnSSdV5Zea1cS+yf 8l9PuKHUlB/kXzIKIirX53J1aDoRad2GfEll/nSLmaGjKcTwuQDSPQBnOku8AQ== From: Miquel Raynal To: Cheng Ming Lin Cc: Michael Walle , Pratyush Yadav , Takahiro Kuwano , Richard Weinberger , Vignesh Raghavendra , linux-mtd@lists.infradead.org, linux-kernel@vger.kernel.org, alvinzhou@mxic.com.tw, Cheng Ming Lin Subject: Re: [PATCH] mtd: spi-nor: Add support for MX25L12833F and MX25L12845G In-Reply-To: (Cheng Ming Lin's message of "Thu, 28 May 2026 15:19:36 +0800") References: <20260528051751.1648246-1-linchengming884@gmail.com> User-Agent: mu4e 1.12.7; emacs 30.2 Date: Thu, 28 May 2026 09:42:03 +0200 Message-ID: <87eciwhtf8.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 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 legacy > 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. Thanks, Miqu=C3=A8l