Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp4848420pxj; Tue, 25 May 2021 18:48:26 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxl2N0ajTj0g2sD1u0CnQSAoW8aXe5uPl6Hvh0HaYxHf3+mey04zpOEO550BdFX9iNCSl/6 X-Received: by 2002:a92:4a12:: with SMTP id m18mr6638999ilf.156.1621993706201; Tue, 25 May 2021 18:48:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1621993706; cv=none; d=google.com; s=arc-20160816; b=ll8jcAOYSo5MOfjd7IYmECvX8hKfhg98fsLurg36+nVkOGdYKK4Xm2+PspGirfgBce +ylzZn3KXzBPnWMoJI0eWPiOA0igVwXdU5mFOaX2RUcLETdI3OGfMjxAg3nwhhYvpSnB C6PYxq9d3/R/k3wfrh4ihH6s2kuWa/ACXYfMploN24qWLB1YMruOVTsNo/yQjuj5se5F iqkrHspYLT75AqyOG6ZXLTe7kj3Sim+Sih8HVdr0gEj0hnncXZGEm9bZ3n3v9RLLbYP5 I7Tl/dpk73j4mec94xCN9kIWU37Ws+aUJyorxzl3WuUtDCUKm2+wfNA+KeasLPEcNXUz SIJg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:subject:cc:to:from:date:references:in-reply-to :message-id:mime-version:user-agent:dkim-signature:dkim-signature; bh=k2E6Xl2OGkKHi1Co9wKE/zYBcsaaJtPCLHu3XoEVoQ0=; b=BObIh5vAjzqmb3u2fZ53GVlW6oadyT7/Do7iFVaOVEvesi82FeLQL/LZhiOW5NjhIc KmxNY0TZU5H309+RdQdlu+dlSvvnFuFNpL8wIWfrauV2nvij6btrXZohgoasKl/kv7C/ WxCJ4scWAr+npjrLo3vrRbA7LzrAih7/ScOIDvoU//HdKLYEZNXETNOfEc19z6MZFXAb MkmrLD0imBT9DRsuKoPNKQSMJwH0fMPMmlArEvZwEXUOIB0f/m7qLlSqM1SWSkun3EwH PVM0b0bcjilmUQKDTJl3vbqQy0XT8+Lqek4rEHHdJsM1xM0vppc4vctlK/wETid4Rk2P Xu+A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@aj.id.au header.s=fm2 header.b=r+Ba5JSf; dkim=pass header.i=@messagingengine.com header.s=fm2 header.b="j/tvEBgc"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id l15si12370476ilv.39.2021.05.25.18.48.12; Tue, 25 May 2021 18:48:26 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@aj.id.au header.s=fm2 header.b=r+Ba5JSf; dkim=pass header.i=@messagingengine.com header.s=fm2 header.b="j/tvEBgc"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231464AbhEYXBp (ORCPT + 99 others); Tue, 25 May 2021 19:01:45 -0400 Received: from new4-smtp.messagingengine.com ([66.111.4.230]:48719 "EHLO new4-smtp.messagingengine.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230097AbhEYXBi (ORCPT ); Tue, 25 May 2021 19:01:38 -0400 Received: from compute3.internal (compute3.nyi.internal [10.202.2.43]) by mailnew.nyi.internal (Postfix) with ESMTP id 08757580F64; Tue, 25 May 2021 19:00:04 -0400 (EDT) Received: from imap2 ([10.202.2.52]) by compute3.internal (MEProxy); Tue, 25 May 2021 19:00:04 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=aj.id.au; h= mime-version:message-id:in-reply-to:references:date:from:to:cc :subject:content-type; s=fm2; bh=k2E6Xl2OGkKHi1Co9wKE/zYBcsaaJtP CLHu3XoEVoQ0=; b=r+Ba5JSfHnYEVlp/TkUTUnYG03Qko6M6XZGkGlDC6YcunKf BHWlxaBLNmYkqWyR36EMS+hW/z3uQfM439RN4++ABiAzQDLFOAAiWudJRqpxMH6J lkEwppBtDbcXRzKaTCSFVxcQh8EB+kzSbOJ2EqdmCyy4PLXeT5N1CbAxRADLCIde er8+tAw/sdHdbJnOxoeSjdGuVqB8/VU4vGiVg8uN51zalxvra21PM5iF5CVK4Qbw IodHaj4AY2mY+DCsicOEWt/mTq9vWpYx+gnghHgrDkNIRoT31CkeOSs8nBTL3Rl7 pirZlfhAYnHp+cF+29zgtjTMAb9aRshlz5O90xQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm2; bh=k2E6Xl 2OGkKHi1Co9wKE/zYBcsaaJtPCLHu3XoEVoQ0=; b=j/tvEBgcYT6NruAOEo3pmY NFb2EXKVliDobySmbPRtNYOyV1iIUzK1TKy4x/RWO85Ehi7yeLPyWjPT/4LqJ5kM tT75MNO8RJ+xkmG+WE+sT9aS42wi9qbN7S8B0X6+bEQy7+MabqEKyiwiDbcARWBS zU3jptQswjST6QeAGjqNYjREgPUmk8A+o5cQbIF/NyYA9eVxmV3V3XNmKNko3mWh lOsBOW5wpb0TdeO7+BUvROO+GKlOUgUqI3+UhDkpp0w1cux/ESh4hDeaXWzUjNwo t0iLJ1dmo+WjC7Tub1KqwQrTSMOQHH+fAV5IPXOiUTjvbbg7wmsV3YJE/hQAGSKw == X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduledrvdekvddgudeiucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepofgfggfkjghffffhvffutgesthdtredtreerjeenucfhrhhomhepfdetnhgu rhgvficulfgvfhhfvghrhidfuceorghnughrvgifsegrjhdrihgurdgruheqnecuggftrf grthhtvghrnhepkeekteekuddvffeigeetkeegudduffejfffguedvveffvdekheeivdet hefftefhnecuffhomhgrihhnpehlkhhmlhdrohhrghenucevlhhushhtvghrufhiiigvpe dtnecurfgrrhgrmhepmhgrihhlfhhrohhmpegrnhgurhgvfiesrghjrdhiugdrrghu X-ME-Proxy: Received: by mailuser.nyi.internal (Postfix, from userid 501) id 159C4A00079; Tue, 25 May 2021 19:00:02 -0400 (EDT) X-Mailer: MessagingEngine.com Webmail Interface User-Agent: Cyrus-JMAP/3.5.0-alpha0-448-gae190416c7-fm-20210505.004-gae190416 Mime-Version: 1.0 Message-Id: In-Reply-To: References: <20210524073308.9328-1-steven_lee@aspeedtech.com> <20210525094815.GA8757@aspeedtech.com> Date: Wed, 26 May 2021 08:29:41 +0930 From: "Andrew Jeffery" To: "Joel Stanley" , "Steven Lee" Cc: "Rob Herring" , "Adrian Hunter" , "Ulf Hansson" , "open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS" , "moderated list:ARM/ASPEED MACHINE SUPPORT" , "moderated list:ARM/ASPEED MACHINE SUPPORT" , "open list" , linux-mmc , "moderated list:ASPEED SD/MMC DRIVER" , "Hongwei Zhang" , "Ryan Chen" , "Chin-Ting Kuo" Subject: =?UTF-8?Q?Re:_[PATCH_v5_0/4]_mmc:_sdhci-of-aspeed:_Support_toggling_SD_b?= =?UTF-8?Q?us_signal?= Content-Type: text/plain Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, 25 May 2021, at 22:26, Joel Stanley wrote: > On Tue, 25 May 2021 at 09:48, Steven Lee wrote: > > > > The 05/25/2021 15:55, Joel Stanley wrote: > > > When I was testing on my A2 EVB I saw this: > > > > > > [ 1.436219] sdhci-aspeed 1e750100.sdhci: Requested out of range > > > phase tap 192 for 9 degrees of phase compensation at 1562500Hz, > > > clamping to tap 15 > > > [ 1.450913] sdhci-aspeed 1e750100.sdhci: Requested out of range > > > phase tap 963 for 45 degrees of phase compensation at 1562500Hz, > > > clamping to tap 15 > > > > > > Do you know what is happening there? > > > > > > > Per MMC spec, eMMC bus speed is set as legacy mode(0~26MHz) at startup of > > eMMC initializtion flow. Clock phase calculation is triggered in set_clock() > > and it calculates taps based on phase_deg(<9>, <225>) in the dts file and the > > current speed(1562500Hz), which causes the warning message you mentioned. > > As the phase_deg in the dts file should be calculated with 100MHz. > > > > https://lkml.org/lkml/2021/5/24/95 > > > > But after some initialization flow, eMMC bus speed will be set to > > correct speed(100MHz). > > Clock phase calculation will be triggered again to get correct taps. > > Thanks for the explanation. I added another debug print and I can see > it doing what you describe: > > [ 1.465904] sdhci-aspeed 1e750100.sdhci: Requested out of range > phase tap 192 for 9 degrees of phase compensation at 1562500Hz, > clamping to tap 15 > [ 1.480598] sdhci-aspeed 1e750100.sdhci: rate 1562500 phase 9 tap 15 > [ 1.490316] sdhci-aspeed 1e750100.sdhci: Requested out of range > phase tap 963 for 45 degrees of phase compensation at 1562500Hz, > clamping to tap 15 > [ 1.505077] sdhci-aspeed 1e750100.sdhci: rate 1562500 phase 45 tap 15 > [ 1.515059] sdhci-aspeed 1e750100.sdhci: rate 100000000 phase 9 tap 3 > [ 1.524886] sdhci-aspeed 1e750100.sdhci: rate 100000000 phase 45 tap 15 > [ 1.534904] sdhci-aspeed 1e750100.sdhci: rate 100000000 phase 9 tap 3 > [ 1.544713] sdhci-aspeed 1e750100.sdhci: rate 100000000 phase 45 tap 15 > > We should change the "out of range" message to be dev_dbg, as it is > expected on a normal boot. I would think the issue is rather that we shouldn't be applying a phase correction for a bus speed that isn't what the correction was specified for. Let me look at this a bit further. Andrew