Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp3162237ybi; Fri, 5 Jul 2019 02:59:50 -0700 (PDT) X-Google-Smtp-Source: APXvYqxKF2kkSfSii29ZTdX1BTpjIxthuPYHtoRccS+A72GlnIb5RoAmK08eMjerYKLWFIrguAFV X-Received: by 2002:a17:90a:258b:: with SMTP id k11mr4190571pje.110.1562320790077; Fri, 05 Jul 2019 02:59:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1562320790; cv=none; d=google.com; s=arc-20160816; b=xU42Q+EPRo0mYdBk2K5ruqk61topQAMt+ml6mN1xEiSydo+iJu4V9MC1bQUABE84H6 7BPo4bJscOboCPTH7PqfQt0rARhPrCk9MdM0aLLqRPGwjee+qs6dYblnThn0z545CISB MeBBUy9S7lYdfNZ77ouEPyYibqEp6JCPJn5VQd1xgIJRFa3mIisLN15nxFUBvtpJDaSv RpKSoEZ+dXASJLWdJrxPoRPocqas84dj+cbwS4ppZ6dVyGrsq0mcQiBT7yTjv+i9YN2d 4ALN3om6nFXhObW+sZgx9Pr2OfmObywmSVNQThNtFAn2b90B8LhaOyFGv/NMbDZyBYtO 7/aw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=3GNalLtrTqW5s+BFJJMMFnFc3aO7NBuze3htvzi00W0=; b=IuPUFzBsYk3fSrZsz7VJH/PEtsPnAxmQJ6NpmZYlIJ1aw1/bx0jr/lwao+g0hYRD8a LNPirvQQ323pfKWvMAmRQFPhIuo4lWF2zByIBhBpmtlDFpOVznEu8jpJBnXj/pY2NcNR YQj3lhiUCXvgnLx3Ee0dCuC2GuqaFs6YBmGKPclUy9XEqEq0Nln9tYr2A/aBcC2HVgrw o/EdlAvenJ6qa3EhbWR/9nAX1onT3ZJFTjqjEpWONHyvT83DK/N5L/mtY/citvq6UmB2 uUOS/3BF4BgkkMr8+EZFhidVNl4BuA7RsDrpSqs1wZVSd4s8HauYO0Q5qDflomzIdW8c cWDA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=hmExekYi; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 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. [209.132.180.67]) by mx.google.com with ESMTP id f92si8910141plb.330.2019.07.05.02.59.35; Fri, 05 Jul 2019 02:59:50 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=hmExekYi; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 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 S1728468AbfGEJ6K (ORCPT + 99 others); Fri, 5 Jul 2019 05:58:10 -0400 Received: from mail-lf1-f66.google.com ([209.85.167.66]:37878 "EHLO mail-lf1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728430AbfGEJ6I (ORCPT ); Fri, 5 Jul 2019 05:58:08 -0400 Received: by mail-lf1-f66.google.com with SMTP id c9so4189187lfh.4 for ; Fri, 05 Jul 2019 02:58:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=3GNalLtrTqW5s+BFJJMMFnFc3aO7NBuze3htvzi00W0=; b=hmExekYi60+hf8c4YDeaGqFYkUdJGMndPOTAz0wzT5VaYrhc79TdPrC82wL7SI1HMS 4B9mDD2JiVa++vAEXHVQb0+EI7rCDihpO7F40mAaBXF7Uk9HbWS/PAUzo7lcLs1D+Z+5 +VCR+V4xb6J4WTh8C16gju5+rR5NbyRcecrcUSwIsPl0ZzwWjh9zoIUlEBYwFgv9gE9s YZU+4liOcFjYB4deygvG/JxyDYUhIx9AambMTyv7d4zxy7I1buYsHQHlCwGBegiQVp1R vigjgZqTKy8zqnB1XSWpP3VssMyj7Beg5ro1l+jhu2Vwbsl++Xdy1jq8OMNcv8pL3J7+ 4otA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=3GNalLtrTqW5s+BFJJMMFnFc3aO7NBuze3htvzi00W0=; b=a1juFet9prz5X2FkVhtc+UPebr+r4HzpMSXBbq/Brx9qbLySA5OGnyWtGquw98k5Vu PJAxdCvd/UnOlK/4dFJUIWibhB6K/XkXHuqyNVUYGak1Ty/V2YNNXS6CIjW1+moU8ZZj 71VwHtgNlG1ywSSqh2TUVNphl2bzq/SHLpOyDP9CZyMO6jmaM0OIoIKVuHRmeZoiJ+/N Qh7GrD/aSfDVueYyJq6wUpcVMn1P13pvMEiblhIwTdTp/CD1ac2vIBHTWHD5G3LJise8 FtgWXdCYbrhMmEDmBCXUpgJVn4evFdoBh+Bv7oVDlLhBj+7hwSuoRXSmfogQp+HLSLOB J37g== X-Gm-Message-State: APjAAAV0Q91QZnlIkM+af/tpAXMMTlNCDPlPSUJ9DogyrDdhcnwfsArS ZMMY3brDzcAebtzDBLln9+7dPA== X-Received: by 2002:ac2:4a6e:: with SMTP id q14mr1583691lfp.154.1562320686116; Fri, 05 Jul 2019 02:58:06 -0700 (PDT) Received: from localhost.localdomain (ua-83-226-34-119.bbcust.telenor.se. [83.226.34.119]) by smtp.gmail.com with ESMTPSA id 25sm1692704ljn.62.2019.07.05.02.58.05 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Fri, 05 Jul 2019 02:58:05 -0700 (PDT) From: Niklas Cassel To: Ilia Lin , Andy Gross , Viresh Kumar , Nishanth Menon , Stephen Boyd Cc: linux-arm-msm@vger.kernel.org, jorge.ramirez-ortiz@linaro.org, bjorn.andersson@linaro.org, ulf.hansson@linaro.org, Niklas Cassel , Rob Herring , Mark Rutland , linux-pm@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 05/13] dt-bindings: cpufreq: qcom-nvmem: Support pstates provided by a power domain Date: Fri, 5 Jul 2019 11:57:16 +0200 Message-Id: <20190705095726.21433-6-niklas.cassel@linaro.org> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20190705095726.21433-1-niklas.cassel@linaro.org> References: <20190705095726.21433-1-niklas.cassel@linaro.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Some Qualcomm SoCs have support for Core Power Reduction (CPR). On these platforms, we need to attach to the power domain provider providing the performance states, so that the leaky device (the CPU) can configure the performance states (which represent different CPU clock frequencies). Signed-off-by: Niklas Cassel --- .../bindings/opp/qcom-nvmem-cpufreq.txt | 111 ++++++++++++++++++ 1 file changed, 111 insertions(+) diff --git a/Documentation/devicetree/bindings/opp/qcom-nvmem-cpufreq.txt b/Documentation/devicetree/bindings/opp/qcom-nvmem-cpufreq.txt index c5ea8b90e35d..e19a95318e98 100644 --- a/Documentation/devicetree/bindings/opp/qcom-nvmem-cpufreq.txt +++ b/Documentation/devicetree/bindings/opp/qcom-nvmem-cpufreq.txt @@ -23,6 +23,15 @@ In 'operating-points-v2' table: Optional properties: -------------------- +In 'cpus' nodes: +- power-domains: A phandle pointing to the PM domain specifier which provides + the performance states available for active state management. + Please refer to the power-domains bindings + Documentation/devicetree/bindings/power/power_domain.txt + and also examples below. +- power-domain-names: Should be + - 'cpr' for qcs404. + In 'operating-points-v2' table: - nvmem-cells: A phandle pointing to a nvmem-cells node representing the efuse registers that has information about the @@ -682,3 +691,105 @@ soc { }; }; }; + +Example 2: +--------- + + cpus { + #address-cells = <1>; + #size-cells = <0>; + + CPU0: cpu@100 { + device_type = "cpu"; + compatible = "arm,cortex-a53"; + reg = <0x100>; + .... + clocks = <&apcs_glb>; + operating-points-v2 = <&cpu_opp_table>; + power-domains = <&cprpd>; + power-domain-names = "cpr"; + }; + + CPU1: cpu@101 { + device_type = "cpu"; + compatible = "arm,cortex-a53"; + reg = <0x101>; + .... + clocks = <&apcs_glb>; + operating-points-v2 = <&cpu_opp_table>; + power-domains = <&cprpd>; + power-domain-names = "cpr"; + }; + + CPU2: cpu@102 { + device_type = "cpu"; + compatible = "arm,cortex-a53"; + reg = <0x102>; + .... + clocks = <&apcs_glb>; + operating-points-v2 = <&cpu_opp_table>; + power-domains = <&cprpd>; + power-domain-names = "cpr"; + }; + + CPU3: cpu@103 { + device_type = "cpu"; + compatible = "arm,cortex-a53"; + reg = <0x103>; + .... + clocks = <&apcs_glb>; + operating-points-v2 = <&cpu_opp_table>; + power-domains = <&cprpd>; + power-domain-names = "cpr"; + }; + }; + + cpu_opp_table: cpu-opp-table { + compatible = "operating-points-v2-kryo-cpu"; + opp-shared; + + opp-1094400000 { + opp-hz = /bits/ 64 <1094400000>; + required-opps = <&cpr_opp1>; + }; + opp-1248000000 { + opp-hz = /bits/ 64 <1248000000>; + required-opps = <&cpr_opp2>; + }; + opp-1401600000 { + opp-hz = /bits/ 64 <1401600000>; + required-opps = <&cpr_opp3>; + }; + }; + + cpr_opp_table: cpr-opp-table { + compatible = "operating-points-v2-qcom-level"; + + cpr_opp1: opp1 { + opp-level = <1>; + .... + }; + cpr_opp2: opp2 { + opp-level = <2>; + .... + }; + cpr_opp3: opp3 { + opp-level = <3>; + .... + }; + }; + +.... + +soc { +.... + cprpd: cpr@b018000 { + compatible = "qcom,qcs404-cpr", "qcom,cpr"; + reg = <0x0b018000 0x1000>; + .... + vdd-apc-supply = <&pms405_s3>; + #power-domain-cells = <0>; + operating-points-v2 = <&cpr_opp_table>; + .... + }; +}; -- 2.21.0