From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id AEC0FE9A03B for ; Thu, 19 Feb 2026 10:31:02 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-ID:Date:References :In-Reply-To:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=xEtSMjb331EYk0pbN77rJ3kl9Z2RIJujNRRshYjXYFg=; b=evhNLAIR5FdWYp PeRkHXYcYn3exD6nbzC14QcaufRmHrPbM1eHwx2fRwyXzaftSnTqX1oBrlMrsgdTXrAPI9Z1P3Pof MKJ795hT4ZBtKwBRA+u5jKT3X2TMGX7DH8mCbgAIz2PHsg2o3SXq4NjMXy0Ln4l7VSkRgUTGUURF1 s/sUe7X60lwb8I4DYuPsalz2EIub7pUhtV5ixwOt6oTSAtzgA+CX9PqTeKVEcPfHjEhlEXvrYGslc ZPck0AsoXT+/wFn/MaiKX/2hzCN2QCi0ZOiEKPfA1+rNGQn1FAKdMMI4DajlgV2JrhD5xp5KQCWln 5pITM2zZOHgFgoWiOLhg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98.2 #2 (Red Hat Linux)) id 1vt1JA-0000000BE8T-0XaW; Thu, 19 Feb 2026 10:30:56 +0000 Received: from smtpout-04.galae.net ([185.171.202.116]) by bombadil.infradead.org with esmtps (Exim 4.98.2 #2 (Red Hat Linux)) id 1vt1J7-0000000BE7y-1r63 for linux-mtd@lists.infradead.org; Thu, 19 Feb 2026 10:30:55 +0000 Received: from smtpout-01.galae.net (smtpout-01.galae.net [212.83.139.233]) by smtpout-04.galae.net (Postfix) with ESMTPS id 39C64C2F4EF; Thu, 19 Feb 2026 10:31:01 +0000 (UTC) Received: from mail.galae.net (mail.galae.net [212.83.136.155]) by smtpout-01.galae.net (Postfix) with ESMTPS id D766E5FB45; Thu, 19 Feb 2026 10:30:48 +0000 (UTC) Received: from [127.0.0.1] (localhost [127.0.0.1]) by localhost (Mailerdaemon) with ESMTPSA id 4C35910368C91; Thu, 19 Feb 2026 11:30:39 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=dkim; t=1771497044; h=from:subject:date:message-id:to:cc:mime-version:content-type: content-transfer-encoding:in-reply-to:references; bh=x5h6dSzaRazgNOk4NVSUO9wlD+x70M8Q2BQei2ERMhM=; b=Booxv9PbJN7mvEol1b8efv6ZI0Uqn4d8M8SzKeniy2eAuYg+MSzDsNwj9/1/oGC7PRtGuT gMrHMl4ZE0kGFFTlsFe6q0Cj5SD6I1WHrtv2g/d021QaKUwIbxsB06n0i7dMbg7Ph1peiG P+H/PuqvWmQ0GKtFfFVLYfVOtCXwrpZ5LDz/7VgWjKuHw4LZbLpCVoOZxDMcmtJ2Q0EnHA j1ObB0AOFn28+dnynxDS0pYIMx2mX73wn4v7/axwNgd9DK7Gp7MMC+gfEcE9JvaUkwRIKD TQXizrbkuOUWECOPiVgu2ZpmLjGinlG627DAuRM3PNfJhGiY301vkMcjRd2InA== From: Miquel Raynal To: Santhosh Kumar K Cc: , , , , , , , , , , , , , , , , Subject: Re: [RFC PATCH v2 09/12] spi: cadence-quadspi: add PHY tuning infrastructure In-Reply-To: (Santhosh Kumar K.'s message of "Wed, 18 Feb 2026 23:37:59 +0530") References: <20260113141617.1905039-1-s-k6@ti.com> <20260113141617.1905039-10-s-k6@ti.com> <87bji3gkda.fsf@bootlin.com> <012a44f3-973f-4f34-be69-286cf924a6c6@ti.com> <87a4xdxdht.fsf@bootlin.com> User-Agent: mu4e 1.12.7; emacs 30.2 Date: Thu, 19 Feb 2026 11:30:38 +0100 Message-ID: <87cy21t48h.fsf@bootlin.com> MIME-Version: 1.0 X-Last-TLS-Session-Version: TLSv1.3 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20260219_023053_621124_66BBBCE4 X-CRM114-Status: GOOD ( 13.72 ) X-BeenThere: linux-mtd@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Linux MTD discussion mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: base64 Sender: "linux-mtd" Errors-To: linux-mtd-bounces+linux-mtd=archiver.kernel.org@lists.infradead.org SGVsbG8sCgo+Pj4+IFRoaXMgaXMgdGhlIHNlY29uZCAoYW5kIGxhc3QpIG1haW4gaXNzdWUgSSBo YXZlIHdpdGggdGhlIHNlcmllcyBhcyBpdAo+Pj4+IGlzCj4+Pj4gcmlnaHQgbm93LiBXZSBjYW5u b3Qgc2V0IHRoaXMgdHlwZSBvZiBmcmVxdWVuY3kgaW4gdGhlIGRyaXZlciBJTU8sIGl0IGlzCj4+ Pj4gdG9vIGJvYXJkIHNwZWNpZmljLgo+Pj4+IFdlIGN1cnJlbnRseSBoYXZlIGEgRFQgcHJvcGVy dHkgZm9yIHRoZSBTUEkgbWF4aW11bSBzdXBwb3J0ZWQKPj4+PiBmcmVxdWVuY3kuIEkgYmVsaWV2 ZSB0aGlzIGlzIG5vIGxvbmdlciBlbm91Z2guIFdoeSBub3QgbWFraW5nIHRoaXMKPj4+PiBmcmVx dWVuY3kgcHJvcGVydHkgYW4gYXJyYXk/IEZpcnN0IGZyZXF1ZW5jeSB3b3VsZCBiZSB0aGUg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RlYWQub3JnL21haWxtYW4vbGlz dGluZm8vbGludXgtbXRkLwo= From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtpout-03.galae.net (smtpout-03.galae.net [185.246.85.4]) (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 7DC9E72634 for ; Thu, 19 Feb 2026 10:30:56 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=185.246.85.4 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1771497057; cv=none; b=J+o4uwOvSz3x1rq9CaNqVmp103SKNNrsDoSr7T1UUdcWNa5sPNxNyxvtgYwa34IOUz1KkUmWLW+vNejFrP4D+gk7WxO9YSZAKyQr8z8plqOXWYqIQjhy/g1ofVdyBk9LmM5Fj9a5KVL+CrMo1gcZmWbPFlndCwWbMwZA8dSiySA= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1771497057; c=relaxed/simple; bh=mWFxKxKNm7ktphMkfmGEvfG50qGVqwEZb9Rb9SuOVWg=; h=From:To:Cc:Subject:In-Reply-To:References:Date:Message-ID: MIME-Version:Content-Type; b=E+7m/12XTsI1t/lzn8WljWQN3vXRSdQP0HX2Js6wvaa5gr5Dk1noYjvx9RKa+z6+zkiv12EnX5fZMpvDlThQOEucDBcIaFL+SZPDgd5vOHfwcQ5JtB24BPJBOmThvSZCNtJ7e1h4f8/QTs0eX3cGLp8IToFKCb7wYcBZUwVRrhw= 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=Booxv9Pb; arc=none smtp.client-ip=185.246.85.4 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="Booxv9Pb" Received: from smtpout-01.galae.net (smtpout-01.galae.net [212.83.139.233]) by smtpout-03.galae.net (Postfix) with ESMTPS id 12DCE4E40544; Thu, 19 Feb 2026 10:30:49 +0000 (UTC) Received: from mail.galae.net (mail.galae.net [212.83.136.155]) by smtpout-01.galae.net (Postfix) with ESMTPS id D766E5FB45; Thu, 19 Feb 2026 10:30:48 +0000 (UTC) Received: from [127.0.0.1] (localhost [127.0.0.1]) by localhost (Mailerdaemon) with ESMTPSA id 4C35910368C91; Thu, 19 Feb 2026 11:30:39 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=dkim; t=1771497044; h=from:subject:date:message-id:to:cc:mime-version:content-type: content-transfer-encoding:in-reply-to:references; bh=x5h6dSzaRazgNOk4NVSUO9wlD+x70M8Q2BQei2ERMhM=; b=Booxv9PbJN7mvEol1b8efv6ZI0Uqn4d8M8SzKeniy2eAuYg+MSzDsNwj9/1/oGC7PRtGuT gMrHMl4ZE0kGFFTlsFe6q0Cj5SD6I1WHrtv2g/d021QaKUwIbxsB06n0i7dMbg7Ph1peiG P+H/PuqvWmQ0GKtFfFVLYfVOtCXwrpZ5LDz/7VgWjKuHw4LZbLpCVoOZxDMcmtJ2Q0EnHA j1ObB0AOFn28+dnynxDS0pYIMx2mX73wn4v7/axwNgd9DK7Gp7MMC+gfEcE9JvaUkwRIKD TQXizrbkuOUWECOPiVgu2ZpmLjGinlG627DAuRM3PNfJhGiY301vkMcjRd2InA== From: Miquel Raynal To: Santhosh Kumar K Cc: , , , , , , , , , , , , , , , , Subject: Re: [RFC PATCH v2 09/12] spi: cadence-quadspi: add PHY tuning infrastructure In-Reply-To: (Santhosh Kumar K.'s message of "Wed, 18 Feb 2026 23:37:59 +0530") References: <20260113141617.1905039-1-s-k6@ti.com> <20260113141617.1905039-10-s-k6@ti.com> <87bji3gkda.fsf@bootlin.com> <012a44f3-973f-4f34-be69-286cf924a6c6@ti.com> <87a4xdxdht.fsf@bootlin.com> User-Agent: mu4e 1.12.7; emacs 30.2 Date: Thu, 19 Feb 2026 11:30:38 +0100 Message-ID: <87cy21t48h.fsf@bootlin.com> Precedence: bulk X-Mailing-List: linux-spi@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 Hello, >>>> This is the second (and last) main issue I have with the series as it >>>> is >>>> right now. We cannot set this type of frequency in the driver IMO, it = is >>>> too board specific. >>>> We currently have a DT property for the SPI maximum supported >>>> frequency. I believe this is no longer enough. Why not making this >>>> frequency property an array? First frequency would be the default, >>>> non tuned maximum frequency. The second would be the maximum frequency >>>> reachable when tuning the PHY. >>> >>> If the concern is only about where this is set, we could introduce a DT >>> property such as "non-phy-max-freq" to carry this information. This >>> would allow us to avoid any changes to the existing "spi-max-frequency" >>> handling. Let me know your thoughts on this. >> Naming is difficult, non-phy-max-freq is too TI specific. I was >> proposing the evolution of spi-max-frequency because it is backward >> compatible. The naming can be discussed after you send a proposal, but >> do not include "non-phy" in it. It shall reflect the fact that with fine >> tuning we can reach higher frequencies on certain operations. > > I tried your suggestion of keeping an array of frequencies in > spi-max-frequency: > > spi-max-frequency =3D <25000000 166000000>; > (non_phy_freq phy_freq) > > and updating max_speed_hz with phy_freq once tuning succeeds. > > Bad news! this doesn't seem to work as we expected. The > read_op->max_freq for both NOR and NAND is initially set to > non_phy_freq, and it does not appear to be updated again by > adjust_op_freq() after tuning completes as the if case fails. Yes, none of the core parts are ready for this, we may need extra logic to handle this gracefully. But with such an option, once tuning has happened, the core could use the correct frequency for each operation? Thanks, Miqu=C3=A8l