Received: by 2002:a05:6a10:1287:0:0:0:0 with SMTP id d7csp3978909pxv; Mon, 19 Jul 2021 13:28:38 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz932+jSIR6wox7dY//Y8DBefgF8NweruQmZuFP3jJ5VwD7x5DzTvS+3BUj7/+eW47xN+C3 X-Received: by 2002:a50:8d54:: with SMTP id t20mr35610485edt.288.1626726518607; Mon, 19 Jul 2021 13:28:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1626726518; cv=none; d=google.com; s=arc-20160816; b=nZav7jxfjS3Jvw0Sn+w2Hbuhbd3Is//E1n7gAK49+pg5b/vsYvilrSVnMkbptJkcDw 5DgBIRLKZwCcNDZKx6n/IQW6GwWaskoy/08xBOfANQDcMuQ9ORVJy7uf6O5fd8vw3MRd mi9aSwywUyQ7brvBKSEF2NPSztEY+dM91kvIplolQ1wa3N3M3naKXH5DIY4RPEZJniBG GEflTXfs0XSSjvXxt3NwsH7vxrG9Hp3X/TSrqIlma96PCLFcB142zqfGF/cZX5pNT09V Um9IcBG7KOCmmdkChbzcZoWdbbDFWdRq3QgD+GMzNpJ5Q88XleKiTe2fzLV6imVJ5xBr /55A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=SudKCvvWg+Me2mbMwVYeRd31oZcZoO+nm1Zj7MU/9gg=; b=rB/FyqdfDeOPjJZkmrniuzvcGh7w1FELA2xfnLZITXkYrtw3rPWP11yVreYHTCOrkN +eXpQsvadTqZ6A/ZkCQkTYpQNm3UmYROzQySC6pgvfE7/NsPphmV/ekMsvFvp2hz26ao zeDaU4KWRcvRF3TLEwTxJS8LVSrhDM3/Owkq4m8GGGzPTuNPzRb73hBpeNL+S4OaAn4g 4vwxbzFIzSoO1BCiauMzFlZodWymiW1ZrS72VUGLqCnNDfYKybMY5B1Ek2g6zozm08sn fQAD+pO9+hcogUhA4TuG2zId75zoTa35KyGWIK16qvIWtG7XegLXkEyP17P8yHWhi9Pi HlBw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=RiQJfGKT; 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=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id cq5si22403470edb.416.2021.07.19.13.28.14; Mon, 19 Jul 2021 13:28:38 -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=@linaro.org header.s=google header.b=RiQJfGKT; 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=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1385631AbhGSTFS (ORCPT + 99 others); Mon, 19 Jul 2021 15:05:18 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37676 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1384871AbhGSSip (ORCPT ); Mon, 19 Jul 2021 14:38:45 -0400 Received: from mail-oi1-x231.google.com (mail-oi1-x231.google.com [IPv6:2607:f8b0:4864:20::231]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4D143C061762 for ; Mon, 19 Jul 2021 12:09:52 -0700 (PDT) Received: by mail-oi1-x231.google.com with SMTP id y66so12492046oie.7 for ; Mon, 19 Jul 2021 12:19:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=SudKCvvWg+Me2mbMwVYeRd31oZcZoO+nm1Zj7MU/9gg=; b=RiQJfGKTOT2Bj8qhCAPRxVkQZzJtvEnwyjwbYTcQHA7FdW/IjgqG6dCtax0iF7wZ2+ lJ6ZILsNV8Tn+kJ2osIhKWO6+BYMHQI7C/oeokRCZr7kbIZ9PDfpGDj6xejngosaZkBZ oCJrxu77q+CrhX7GrjH62ULOIcf9vv5fDwSHFuFTPv610ALry6kWkpWYGm6dqV1qDiNE 6Y7ZBjkIVDgOmfXIB+pHLaipkkBmRVcxCvzPdgk1NqM9goQtPQTPgackMCv17gTIPF+g bkoXpPN2pU4AF8ohL6w1DOwmqNc9S+eHMr+XQZhn3oolQIgtEw86MbbiTrly+ksKWlb1 QITA== 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=SudKCvvWg+Me2mbMwVYeRd31oZcZoO+nm1Zj7MU/9gg=; b=AQVPy3R4Lr+iXDZS1xetPYz52N2hdm03cvdlNpprwUTstevKAhmrgOjZHFzGccVk8H Dd++GYqkycc7hWC6wriW+mb5DDwmv40bwYjT3yQix4W2f4T9VUo3c5rfA/8O/jPjTCsG Mke+eIr5x9m40jzGIl0r5bILpc1kEwD5WASQTWbfoGJLuryoiKrlUa1+GPW6DsyJUJfA cRf8XvlbaSuejmR+afuGhfqr4t9c5eqrXA7A8AY8fSiTxceb1A+vKGfqD7I7x2I0X1FG lQek13/Awrg8fFuoztE7HjV118cmo1G0prJ+XfJ3rib3hIkbuRvesrv6eKPxzF3DUSO+ 46vA== X-Gm-Message-State: AOAM530IZc9In/avSvAD9xT/BNQlgKf3qI/cQhBVsu2eGOyxFuhsvfEZ lV51FU2pjbNeVA8TTPYEsnIl0Q== X-Received: by 2002:a05:6808:a83:: with SMTP id q3mr22994769oij.125.1626722359359; Mon, 19 Jul 2021 12:19:19 -0700 (PDT) Received: from yoga (104-57-184-186.lightspeed.austtx.sbcglobal.net. [104.57.184.186]) by smtp.gmail.com with ESMTPSA id d81sm2738922oob.13.2021.07.19.12.19.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 19 Jul 2021 12:19:18 -0700 (PDT) Date: Mon, 19 Jul 2021 14:19:16 -0500 From: Bjorn Andersson To: Rajendra Nayak Cc: Stephen Boyd , ulf.hansson@linaro.org, viresh.kumar@linaro.org, linux-pm@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org, rojay@codeaurora.org, stephan@gerhold.net Subject: Re: [PATCH v4 2/2] arm64: dts: sc7180: Add required-opps for i2c Message-ID: References: <1626429658-18961-1-git-send-email-rnayak@codeaurora.org> <1626429658-18961-3-git-send-email-rnayak@codeaurora.org> <12711a61-e16c-d2bc-6e04-ab94c7551abe@codeaurora.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <12711a61-e16c-d2bc-6e04-ab94c7551abe@codeaurora.org> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon 19 Jul 04:37 CDT 2021, Rajendra Nayak wrote: > > > On 7/17/2021 3:29 AM, Bjorn Andersson wrote: > > On Fri 16 Jul 16:49 CDT 2021, Stephen Boyd wrote: > > > > > Quoting Bjorn Andersson (2021-07-16 13:52:12) > > > > On Fri 16 Jul 15:21 CDT 2021, Stephen Boyd wrote: > > > > > > > > > Quoting Bjorn Andersson (2021-07-16 13:18:56) > > > > > > On Fri 16 Jul 05:00 CDT 2021, Rajendra Nayak wrote: > > > > > > > > > > > > > qup-i2c devices on sc7180 are clocked with a fixed clock (19.2 MHz) > > > > > > > Though qup-i2c does not support DVFS, it still needs to vote for a > > > > > > > performance state on 'CX' to satisfy the 19.2 Mhz clock frequency > > > > > > > requirement. > > > > > > > > > > > > > > > > > > > Sounds good, but... > > > > > > > > > > > > > Use 'required-opps' to pass this information from > > > > > > > device tree, and also add the power-domains property to specify > > > > > > > the CX power-domain. > > > > > > > > > > > > > > > > > > > ..is the required-opps really needed with my rpmhpd patch in place? > > > > > > > > > > > > > > > > Yes? Because rpmhpd_opp_low_svs is not the lowest performance state for > > > > > CX. > > > > > > > > On e.g. sm8250 the first available non-zero corner presented in cmd-db > > > > is low_svs. > > what rail is this? the mmcx? Perhaps it does not support RET. > cx usually supports both collapse state and RET. > That was the one I was specifically looking at for the MDSS_GDSC->MMCX issue, so it's likely I didn't look elsewhere. > > > > > > Indeed. On sc7180 it's not the first non-zero corner. I suppose > > > retention for CX isn't actually used when the SoC is awake so your > > > rpmhpd patch is putting in a vote for something that doesn't do anything > > > at runtime for CX? I imagine that rpmh only sets the aggregate corner to > > > retention when the whole SoC is suspended/sleeping, otherwise things > > > wouldn't go very well. Similarly, min_svs may be VDD minimization? If > > > so, those first two states are basically states that shouldn't be used > > > at runtime, almost like sleep states. > > > > > > > But if that's the case, I don't think it's appropriate for the "enabled > > state" of the domain to use any of those corners. > > I rechecked the downstream kernels where all this voting happens from within > the clock drivers, and I do see votes to min_svs for some clocks, but Stephen is > right that RET is not something that's voted on while in active state. > > But always going with something just above the ret level while active will also > not work for all devices, for instance for i2c on 7180, it needs a cx vote of > low svs while the rail (cx) does support something lower than that which is min svs. > (why can't it just work with min svs?, I don't know, these values and recommendations > come in from the voltage plans published by HW teams for every SoC and we just end up > using them in SW, perhaps something to dig further and understand which I will try and > do but these are the values in voltage plans and downstream kernels which work for now) > So to some degree this invalidates my argumentation about the enabled_corner in rpmhpd, given that "enabled" means a different corner for each rail - not just the one with lowest non-zero value. So perhaps instead of introducing the enabled_corner we need to introduce your patch and slap a WARN_ON(corner == 0) in rpmhpd_power_on() - to ensure that all clients that uses a rpmhpd domain actually do vote for a high enough corner? Regards, Bjorn > > > > As this means that anyone who needs any of the rpmhpd domains active > > also needs to specify required-opps, which wouldn't be needed for any > > other power domain provider. > > > > And more importantly it means that a device sitting in a GDSC, which > > would be parented by a rpmhpd domain has no way to specify the GDSC and > > trickle the minimum-vote up to the rpmhpd domain. (And I know that we > > don't describe the parentship of the GDSCs today, but this patch > > tells me that it's around the corner - for more than MMCX) > > > > Regards, > > Bjorn > > > > > > > > > > And if this (which?) clock requires a higher corner than the lowest > > > > possible in order to tick at this "lowest" frequency, I'm certainly > > > > interested in some more details. > > > > > > -- > QUALCOMM INDIA, on behalf of Qualcomm Innovation Center, Inc. is a member > of Code Aurora Forum, hosted by The Linux Foundation