From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 778A0606A32C for ; Tue, 1 Dec 2026 06:30:14 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.a=rsa-sha256 header.s=bombadil.20210309 header.b=ukMM9Wu8; dkim=fail reason="signature verification failed" (2048-bit key) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=mCRXs3/S 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:In-Reply-To:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Unsubscribe-Post:List-Owner; bh=MVZ7Z6s6w0Toc8z6k8wi/SJ+rOTYBlQnwi0dDYBVD/Q=; b=ukMM9Wu8H9QgUkeIgkgCijMw9b JB/+R2W+MYaOwdZL+QXeAXXf5CLSlt/CzBpZIqw9irAputM80bZW/7M2mzIwwI9Dhv1cjaVhSPLPc K3RKZGQ+qAYvqlC0e84pOd4MkkC1Gfc0R1FTHWP7Lwd/IJNOCaKIki2iX21KihPKDlseEeSvIZ92G mZhVkSr27OanQUuJEY7LFcRoB4sxEwmINz5+QxgxjVQe2gvoXVx+Ps8bFoEi08P0BAu5dB4MoiFu6 V5Z9vleSPxF3xElyTW2UBjHNCO2meLONEmpLp+TgRZs0Si5pcrWqQPBpuT/yxZtKKkhL9qHqewwa0 XGh8/3MQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.100.1 #2 (Red Hat Linux)) id 1xYHNQ-00000006o2a-3o9V; Tue, 01 Dec 2026 06:30:08 +0000 Received: from sea.source.kernel.org ([172.234.252.31]) by bombadil.infradead.org with esmtps (Exim 4.100.1 #2 (Red Hat Linux)) id 1xYHNP-00000006o2O-37pw for linux-riscv@lists.infradead.org; Tue, 01 Dec 2026 06:30:07 +0000 Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) by sea.source.kernel.org (Postfix) with ESMTP id 302E745072; Tue, 1 Dec 2026 06:30:07 +0000 (UTC) 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-Archived-By: MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: X-BeenThere: linux-riscv@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-riscv" X-Spam-Status: No, score=-3.9 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_EF,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=4.0.1 X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-26) on aws-us-west-2-korg-listserv-alma10-1 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) _______________________________________________ linux-riscv mailing list linux-riscv@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-riscv