From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=100.103.45.18 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796106607; b=Q/M5qt4buQ/DN3G6vAyxoj4W6qeKvqIPhYYyo4gZhI0E/PFcysYeLkZ1ALJLtCI0vT1O Q3gLgKwbVDXQIwLGKpwK+/WMGPhgOElkjqjKd/6rubqvxY53MQ9+7O8zGJ+QHfNxHmVtf e9jDFeyWULe9v6GC6ycMRGQZLBo4zNAHMgB1I9yR8R4bngzS3uA+3zLPEq6ybomeymqU7 nFxMt4UuNtwfgoVH791Z/kvZfShaO2AABGLedj4wz3cI6iovKxd75J5jz01iYkr5t79Ee FqKsLLYwrI7Gsh6sua77ODM/7a8LhX7Bv251CIkKz8HCkFszyT7T0f8fPdq50pX8V1Q== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796106607; h=Received:DKIM-Signature:Date:From:To:Cc:Subject:Message-ID: References:MIME-Version:Content-Type:Content-Disposition:In-Reply-To; bh=g3obwmxTy/+s63uR6ekX0SnrHsRq+naXhnmje4WKUZo=; b=oAL08wlG5frYUwXHfsP4xgN1TKwt2PQ1Hf6nHX4lp02cyUsenS/DVeZegEPChv9IC0PL KLZEBlkLb/mjU9j8WWqYp4yYWnflDkDKIYuoilZ6LqCWvcJGd94d1zjjqcHWz566qORP8 Mdi+oiK5DiNzkXtM/syfF/ei7OSqInwU2IelqRjeRuwKialh+k4hv3GdLLUl8CfJYRdvA KOHnvlKH8ePajHN/TkmnSlRfTd558EdVDoUhOTdqc3KBHssPBc583Vjqk0FKPt1HWUcUt YPbgsq3jDR3stx021bh2ZNsWJHhsk5cL6+2MG8drP7sVWFPCgw6N4gOEQ1GRSsSHyow== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b="mCRXs3/S"; arc=none smtp.remote-ip=100.103.45.18 Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 6BCE0606A329; Tue, 1 Dec 2026 06:30:07 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key, unprotected) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=mCRXs3/S Received: by smtp.kernel.org (Postfix) with ESMTPSA id 8017C1F000C1; Tue, 1 Dec 2026 06:30:06 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1796106607; bh=g3obwmxTy/+s63uR6ekX0SnrHsRq+naXhnmje4WKUZo=; h=Date:From:To:Cc:Subject:References:In-Reply-To; b=mCRXs3/Sn7EW76FiIUUV1hqZBU5mOhJzNf8/AMtEm84GNyBNq6pI0l361g37rHkON QykQzwBGdC5lytLF4iSnIc4dWm8R7L61xMcxKEL6KVNlLRpHuhe2aSvRcJFW1D8UB2 aNT5DYT1zvnt6x0o/C0YkCuwjAzfBjGzNdXceApX7JS+v3f8V0QbsU6lcsJRpQquKh dAcUqmGw5bCn9YQJVpSW52fcUoRaPlubWkwclkbmp5sH28blwVfT9BCBjVtt19Og3j NyLuylJwLtTm3cvFJrjV6nJoa5n7aogQganTuKt+Mc0V1L5HaTxczGDKnB0Rn77gGe gbg/DR3EcOZaw== Date: Tue, 1 Dec 2026 06:30:04 +0000 From: Yixun Lan To: alan Cc: Iker Pedrosa , adrian.hunter@intel.com, ulfh@kernel.org, long.wan@linux.spacemit.com, linux-mmc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-riscv@lists.infradead.org, spacemit@lists.linux.dev Subject: Re: [PATCH 6/7] mmc: sdhci-of-k1: Improve RX tuning window Message-ID: <20261201063004-GKE27669@kernel.org> References: <20260902-07-k3-sdhci-fix-v1-6-b15c5d0f64fd@kernel.org> <20260907155300.1411173-1-alan.tseng.cs@gmail.com> X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: Hi On 19:58 Sat 19 Sep , alan wrote: > On Tue, Sep 15, 2026, Iker Pedrosa wrote: > > A jump from a minimum window size of 3 to 50 delay codes is quite dramatic. > > Could you clarify how 50 was chosen? Is there a specific hardware specification, > > phy datasheet recommendation, or test dataset across multiple boards that > > justifies this exact number? > > 50 is not my number; Yixun would need to answer where it comes from. What > I can add is what the vendor driver does. In SpacemiT's sdhci-of-k1x.c > (bianbu linux-6.6), the defaults when DT says nothing are: > The 50 number is a configuration suggested from vendor, which should work for all boards, it's still an value derived from statistics, not caclulated precisely.. > #define RX_TUNING_WINDOW_THRESHOLD 80 Choose 50 here to be less aggresive, which should satisfy the tuning case > #define RX_TUNING_DLINE_REG 0x09 > > The Jupiter DT overrides both together: spacemit,rx_dline_reg = <0> and > spacemit,rx_tuning_limit = <50>. So 50 is what the vendor pairs with the > finer delay-line step, not a standalone default. That makes the 5/7 -> > 6/7 dependency concrete rather than theoretical. > > I also need to correct what I said earlier. The current driver already > centres on the widest passing window; the "< 3" check only decides when > to give up with -EIO. Raising it to 50 does not change which window is > selected, only whether tuning fails. The 1- and 5-code windows I reported > were never the widest in their boot (the widest was 74 or more each > time), so they do not show the old threshold picking a bad window. > Right, it actually check the final widest tunning window, and abort if smaller than it, for the worst case! > On the form: spacemit,sdhci.yaml has no such property, so a DT knob > would need a binding change. A compile-time default, with DT override > if the binding maintainers accept it, still seems the lower-risk option. > It's just not neccessary, introducing a DT property is overkill, it's probably only useful for debugging purpose, while we stride hard to not introduce DT property which isn't necessary. For compile-time default, are you suggesting a CONFIG option or just a C-Code maro? I would go for latter To be clear, I object to introduce a DT property for the window limit. -- Yixun Lan (dlan)