Received: by 2002:a17:90b:8d0:0:0:0:0 with SMTP id ds16csp5084798pjb; Mon, 27 Jul 2020 12:32:57 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzC3ZfECzEBXbWJT7J2qxZNe8Sle/yMGpgKV62gOjSODfPjA8ULqIePvOde0tLw7r++v0Vs X-Received: by 2002:a05:6402:b1a:: with SMTP id bm26mr22452786edb.144.1595878377077; Mon, 27 Jul 2020 12:32:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1595878377; cv=none; d=google.com; s=arc-20160816; b=JDRY0VsB8CMm+tNs0Djntm5N0Vx0CAaV5+Lbx2XXN/bbpsh6b9iMThckIzjWp2VV46 1+0fRWyphaa/tbFM3ooOJYhH2+h36a5UrRW1hu0oEXq7FNMRSMV1bmbnUWGqr6A6ZShA uZqCKHjt6Lslj4IaUnOtk7f+pVUWLfSz+SHxi/9ek64N/4kBEoKzt1udoTqNJdYMMRnB jPs8H7Y9/uK4bo2uzoFEMo9ywTy7FG6HHDCI79QhMGZSEHAWMoIfwOWYBOdjIJBnjgXI bCim7zJyr/+zWvhaQFwtEYOVTPFOuG1nfPDRLrpyYAIYeD1BPMhDZAKfFXBz2yc1AFp5 77QQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=ticL88R8RKVjHDYqCYmCobrUYUcpfnt5xb8RKMzCzX8=; b=xC5UmhHJ5hcQXqAmjvIVPta5sSlMGKeb+DmrF3CWodVGpgwuNgBARC5NQMw6WiV28t vtQM9SEFpxQvRSEs/5+2Y5bjUH9HCOh24xWczGfxizBcROIixVu07+pkp4JmggLPlJE0 34GTAuwq084psHHyfUF2t+cWiQe7mPcs9IoD21p0UuX3JmLnIlgUraQBsLY2+m7nphds Z6uyNqvn7QzIwX5+tGuUcxRHwgrKq+JH2XBqAmMK/9v6XifWWcQSaBeg3GSoxVEvd0Zj /P4VkFoGM+wA9FY2lXZFSS8tvq/x8gCwMboqzhbesr9G2Uhzo80q0oJdDmV9+oF6fZLN +Mow== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=hjuYOhxW; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id a7si6227100eds.485.2020.07.27.12.32.34; Mon, 27 Jul 2020 12:32:57 -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=@chromium.org header.s=google header.b=hjuYOhxW; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728364AbgG0TKf (ORCPT + 99 others); Mon, 27 Jul 2020 15:10:35 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54056 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728343AbgG0TKe (ORCPT ); Mon, 27 Jul 2020 15:10:34 -0400 Received: from mail-pl1-x643.google.com (mail-pl1-x643.google.com [IPv6:2607:f8b0:4864:20::643]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5141EC0619D5 for ; Mon, 27 Jul 2020 12:10:33 -0700 (PDT) Received: by mail-pl1-x643.google.com with SMTP id t10so3303322plz.10 for ; Mon, 27 Jul 2020 12:10:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=ticL88R8RKVjHDYqCYmCobrUYUcpfnt5xb8RKMzCzX8=; b=hjuYOhxWkyxIkco7cz3flsCxvz6RvIAHgzIzkNfgT/x9e/YFx9ROmQLeBaibN/AKQl ggH65I1gR0cWWpulPuQvwAQeqlpl5ZyPDgty8hvNF6MJYWNnYWO7dS6mt4IGxRndNyne BScKhSPjV9rATxM4xUcrdiLZorsRsZxf3g2IY= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=ticL88R8RKVjHDYqCYmCobrUYUcpfnt5xb8RKMzCzX8=; b=sqn9DeOZnkpfD6gq5HKKSLccmQhSW37abJMS0TWLqb4bPmKEZG4D0rBe5d+5ekbQoE 6kA0XiYPpZNAUWDHudqSJhRbc6ZRqj9IDTKZftKBxjKnNaYU2F5J9Qrx5Vy4rux+fawU E5izEdCGkMCb1T7Ch55NYv4Nktc4JHc1fUk4nJEk2JMhr1cEITteVuznf82pIn6Waiq9 1/vHx663AAhb7BvO23F7F8BgWkvmVhgcQcs3MuqJpyYLK/ktjVrrKRfOoJrBAPCrSnc/ YsExnHoNfCver/JYuTv5vpB66mqTO2O+RSrFtstQ7LD8E88U+TdnAVul91uCRmHf4XFY nkAw== X-Gm-Message-State: AOAM532fTLvIpIqLfgpxIiTmpVaK9Z/4Dd/OKLo/xjkcRaaveF1QAI0L ThIeOmwdcSlf9cMFriy4xOlS5g== X-Received: by 2002:a17:90a:c087:: with SMTP id o7mr688207pjs.37.1595877032628; Mon, 27 Jul 2020 12:10:32 -0700 (PDT) Received: from localhost ([2620:15c:202:1:f693:9fff:fef4:e70a]) by smtp.gmail.com with ESMTPSA id v28sm16425617pgn.81.2020.07.27.12.10.31 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 27 Jul 2020 12:10:31 -0700 (PDT) Date: Mon, 27 Jul 2020 12:10:29 -0700 From: Matthias Kaehlcke To: sbhanu@codeaurora.org Cc: adrian.hunter@intel.com, ulf.hansson@linaro.org, robh+dt@kernel.org, linux-mmc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org, agross@kernel.org, bjorn.andersson@linaro.org, rnayak@codeaurora.org, Pradeep P V K , devicetree-owner@vger.kernel.org Subject: Re: [PATCH V2] arm64: dts: qcom: sc7180: Add bandwidth votes for eMMC and SDcard Message-ID: <20200727191029.GA3191083@google.com> References: <1595328381-29552-1-git-send-email-sbhanu@codeaurora.org> <20200724171018.GZ3191083@google.com> <7ffcb56e9e6723f4bae687e0f491cb93@codeaurora.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <7ffcb56e9e6723f4bae687e0f491cb93@codeaurora.org> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi, On Mon, Jul 27, 2020 at 12:20:38PM +0530, sbhanu@codeaurora.org wrote: > On 2020-07-24 22:40, Matthias Kaehlcke wrote: > > Hi Shaik, > > > > On Tue, Jul 21, 2020 at 04:16:21PM +0530, Shaik Sajida Bhanu wrote: > > > From: Pradeep P V K > > > > > > Add the bandwidth domain supporting performance state and > > > the corresponding OPP tables for the sdhc device on sc7180. > > > > > > Signed-off-by: Pradeep P V K > > > Signed-off-by: Shaik Sajida Bhanu > > > --- > > > > > > Changes since V1: > > > - Incorporated review comments by Bjorn Andersson. > > > --- > > > arch/arm64/boot/dts/qcom/sc7180.dtsi | 15 +++++++++++++++ > > > 1 file changed, 15 insertions(+) > > > > > > diff --git a/arch/arm64/boot/dts/qcom/sc7180.dtsi > > > b/arch/arm64/boot/dts/qcom/sc7180.dtsi > > > index 68f9894..d78a066 100644 > > > --- a/arch/arm64/boot/dts/qcom/sc7180.dtsi > > > +++ b/arch/arm64/boot/dts/qcom/sc7180.dtsi > > > @@ -684,6 +684,9 @@ > > > clocks = <&gcc GCC_SDCC1_APPS_CLK>, > > > <&gcc GCC_SDCC1_AHB_CLK>; > > > clock-names = "core", "iface"; > > > + interconnects = <&aggre1_noc MASTER_EMMC &mc_virt SLAVE_EBI1>, > > > + <&gem_noc MASTER_APPSS_PROC &config_noc SLAVE_EMMC_CFG>; > > > + interconnect-names = "sdhc-ddr","cpu-sdhc"; > > > power-domains = <&rpmhpd SC7180_CX>; > > > operating-points-v2 = <&sdhc1_opp_table>; > > > > > > @@ -704,11 +707,15 @@ > > > opp-100000000 { > > > opp-hz = /bits/ 64 <100000000>; > > > required-opps = <&rpmhpd_opp_low_svs>; > > > + opp-peak-kBps = <100000 100000>; > > > + opp-avg-kBps = <100000 50000>; > > > }; > > > > > > opp-384000000 { > > > opp-hz = /bits/ 64 <384000000>; > > > required-opps = <&rpmhpd_opp_svs_l1>; > > > + opp-peak-kBps = <600000 900000>; > > > + opp-avg-kBps = <261438 300000>; > > > }; > > > }; > > > }; > > > @@ -2476,6 +2483,10 @@ > > > clocks = <&gcc GCC_SDCC2_APPS_CLK>, > > > <&gcc GCC_SDCC2_AHB_CLK>; > > > clock-names = "core", "iface"; > > > + > > > + interconnects = <&aggre1_noc MASTER_SDCC_2 &mc_virt SLAVE_EBI1>, > > > + <&gem_noc MASTER_APPSS_PROC &config_noc SLAVE_SDCC_2>; > > > + interconnect-names = "sdhc-ddr","cpu-sdhc"; > > > power-domains = <&rpmhpd SC7180_CX>; > > > operating-points-v2 = <&sdhc2_opp_table>; > > > > > > @@ -2489,11 +2500,15 @@ > > > opp-100000000 { > > > opp-hz = /bits/ 64 <100000000>; > > > required-opps = <&rpmhpd_opp_low_svs>; > > > + opp-peak-kBps = <160000 100000>; > > > + opp-avg-kBps = <80000 50000>; > > > }; > > > > > > opp-202000000 { > > > opp-hz = /bits/ 64 <202000000>; > > > required-opps = <&rpmhpd_opp_svs_l1>; > > > + opp-peak-kBps = <200000 120000>; > > > + opp-avg-kBps = <100000 60000>; > > > }; > > > }; > > > }; > > > > Does the sdhci-msm driver actually have BW scaling support at this > > point? > > > > yes > > > There is commit 4ece9795be56 ("mmc: sdhci-msm: Add interconnect > > bandwidth scaling support"), whose commit message says "make sure > > interconnect driver is ready before handling interconnect scaling.". > > > > I haven't seen any patch adding the scaling support (supposedly by > > adding dev_pm_opp_set_bw() calls?). Did I miss it? If not it seems > > it would make sense to post it in a series together with this patch, > > as far as I can tell this patch alone does nothing in practical terms. > > > > grep sdhc /sys/kernel/debug/interconnect/interconnect_summary > > 8804000.sdhci 0 0 0 > > 7c4000.sdhci 0 0 0 > > 7c4000.sdhci 0 0 0 > > 8804000.sdhci 0 0 0 > > ... > > "mmc: sdhci-msm: Use OPP API to set clk/perf > state"(https://lkml.org/lkml/2020/4/8/425) and "mmc: sdhci-msm: Add > interconnect bandwidth scaling support"(https://lkml.org/lkml/2020/3/12/60) > with these two patches scaling will be supported for sdhci-msm driver. Are you testing with exactly these patches or with the ones that landed upstream? At least the second one changed substantially > the values in grep sdhc > /sys/kernel/debug/interconnect/interconnect_summary will be zero during > device is in suspend state... Yes, I forgot to mention that I started MMC IO before looking at 'interconnect_summary'. > and the values in grep sdhc > /sys/kernel/debug/interconnect/interconnect_summary during device in resume > state will be like the following:: > > cicalhost / # cat /sys/kernel/debug/interconnect/interconnect_summary | grep > sdh > 8804000.sdhci 0 60000 120000 > 7c4000.sdhci 0 300000 900000 > 7c4000.sdhci 0 300000 900000 > 8804000.sdhci 0 60000 120000 > 8804000.sdhci 0 100000 200000 > 7c4000.sdhci 0 261438 600000 > 8804000.sdhci 0 60000 120000 On my system the bandwidth is never set: 3.590152] sdhci_msm 7c4000.sdhci: DBG: old/new frequencies (384000000 Hz) are same, nothing to do https://elixir.bootlin.com/linux/v5.7.8/source/drivers/opp/core.c#L847 This happens every time, even after the bandwith is set to 0. The problem seems to be that opp_table->clk doesn't change for target_freq = 0. My system is based on v5.4, so it is possible that my kernel is missing some relevant patch from upstream.