Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp4481760pxj; Tue, 25 May 2021 08:58:34 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyZPtmv5EObw1XHp2u32D4loDHuUDKvdAatL49Ybj3yAHo0ztbcRwmsB1sajuI3rn/Ey4V1 X-Received: by 2002:a05:6e02:46:: with SMTP id i6mr21702745ilr.252.1621958314739; Tue, 25 May 2021 08:58:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1621958314; cv=none; d=google.com; s=arc-20160816; b=i9+UVJBfv+vzLAo6oZv99NEftXWQR/HHurCRPbqXBKvNp7T0CFuouwNKMYZscRxUZR EpuTj66JKSc1RZ6GuxnD1szjxDT9AMJd+qQ+Cwzg3z5pWki8TxOpPOuHtc78AdNVBH/N D1MKxDn2wS6UsEFgDMV3W2ARVMk4Iac/Ba+x47qoTEv5pZ7xaU6vT/j28ZjkFi5xTNmn iXqfAEKKLpw2WryHfREzsFYpo2/hq2A6YBi5Z5Xpn4CgaHvI94zo5myJyDY9QRTII5oD be1pAENQkr8HcZdZ1o6dyqyPxsu9oFXy5OhzV+6DSRpDTDdk2gJ+HEQ+mesEkHL8029S QoCg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=26X9qK4i0o6JrWdnAd2JnpXvFHwNqdNddtrdo/NdfKI=; b=kKoS5ey4GZFoIfiabJXpOOIllCOkiK0D9m99QPseHXTU693DQAMZLr+9mmV/G2yPqm oM1NhCNN86F0m4E9sNVKprvTbR2Z+1DPXIcfBd/Qid3CH+fut6feTCOOXNcsEZLlg7Zr MvHsWbbgMuEdbX3g6kMXuI3rXBPehrfIU760I3s15VAUIKveGfmjGIN27+Og0PtWtSiH nn7c5qmuMLRmLE/BbrHzolfFP3J0q7xZp9Dy0Ct9XbGzYKSd0u8798ToY5zLLZOV1nGJ GKXeUdg3YI+8auS168OWN3EGU0N+y16kqAnN8rEwysz0QeVuEcFRUYlXdaY8AIHZBIw5 b2nA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@jms.id.au header.s=google header.b=nBkCcXaG; 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 m4si19668365jah.87.2021.05.25.08.58.21; Tue, 25 May 2021 08:58:34 -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=@jms.id.au header.s=google header.b=nBkCcXaG; 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 S232931AbhEYM5s (ORCPT + 99 others); Tue, 25 May 2021 08:57:48 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54206 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232917AbhEYM5q (ORCPT ); Tue, 25 May 2021 08:57:46 -0400 Received: from mail-qv1-xf33.google.com (mail-qv1-xf33.google.com [IPv6:2607:f8b0:4864:20::f33]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8676DC061574; Tue, 25 May 2021 05:56:16 -0700 (PDT) Received: by mail-qv1-xf33.google.com with SMTP id eb9so15898644qvb.6; Tue, 25 May 2021 05:56:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=jms.id.au; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=26X9qK4i0o6JrWdnAd2JnpXvFHwNqdNddtrdo/NdfKI=; b=nBkCcXaGwEkQhV6TKf2zXfPW4FjThvleyqszqwJFSVAou+D+bRwAbaxBSeKr8Pes11 E5e18rziC1t8POYTRl4a6k8F416Y9cBU3ZUoIqpy6M/uYy9nvutL1W43NWNsss+At6NY 6pcrFoSCPJm1K1tXt+w2Haimjmc6bi/oNcQGs= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=26X9qK4i0o6JrWdnAd2JnpXvFHwNqdNddtrdo/NdfKI=; b=sw30dFRYkbKNYuGdSbaA9riiCIzKGrhRMHkFg9tmiHlHKoZSRhrG3sMTPCqimJGt3H /BOZa6XAoVPlC3/4kiRDQyyDK8TMzhjmVD+uu5Qvj4nFDXd06JPcJ7geQ+k6DoV2/lr7 iAN2d9M2bCEXn30ziP1izD9Y9FEtrCaCOomI1Mu5fealKnpuf7eNlvPyLGFyExwozGyt NsnXd3FRiqMdhjzbECnmDgmX+F1BSnaYy2/lOCQcOpcdxFJXMemWJ1fLJ+kBIsLV22QC BVcn7lK3GPGlLJ9jwsI0GmciiXR0kjujrjdZihPWlcBUvQhvnw4u9AcG3lT1FOeXQ4eH vd+g== X-Gm-Message-State: AOAM530Q8+eGwkT5ZUDjx2dFVI1hSa3Zx8lc+ZoPFwXuFeGDgqudzQoM h7H91Wo+ce0q7q8fI5xWbBmL+P0tvmMlSGsKp0RLE85e X-Received: by 2002:ad4:4961:: with SMTP id p1mr36377153qvy.43.1621947375551; Tue, 25 May 2021 05:56:15 -0700 (PDT) MIME-Version: 1.0 References: <20210524073308.9328-1-steven_lee@aspeedtech.com> <20210525094815.GA8757@aspeedtech.com> In-Reply-To: <20210525094815.GA8757@aspeedtech.com> From: Joel Stanley Date: Tue, 25 May 2021 12:56:03 +0000 Message-ID: Subject: Re: [PATCH v5 0/4] mmc: sdhci-of-aspeed: Support toggling SD bus signal To: Steven Lee Cc: Andrew Jeffery , 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 Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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. Cheers, Joel