Received: by 2002:a25:8b12:0:0:0:0:0 with SMTP id i18csp532224ybl; Fri, 30 Aug 2019 03:30:27 -0700 (PDT) X-Google-Smtp-Source: APXvYqxKBlvpxvk8GJBsFPc+3In0bt0Y58LRYUAJvbUt8+vyyaajxqWwThi5VOcDHV9cWNUviCXw X-Received: by 2002:a17:90a:db06:: with SMTP id g6mr15193049pjv.60.1567161027808; Fri, 30 Aug 2019 03:30:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1567161027; cv=none; d=google.com; s=arc-20160816; b=s8XtCtFJz+n3zUu4n6IunVaw2euoXJ/UTwd95/u3GWDPwpFzN0O2bliefH8RzPcNa6 kUuRja2Xdk0sYI7W1qGHrUJQlgZZ4a5QvvgUF/1uBx70+KewcItHGVitrCibtsSaehgr qSUzm/QImRRywdkRZ54xCBtq0Pgb1Lrhv99/qZysNsucG1myQZYl+V4ucYIrtahKlRxB Lhi9CUkPlvn0bx+gvEu6XgQYqC3XS+vVkdHVuzJLJgCI2jZ90gaXWU7+ccvWspdD4Ow+ VIBL+SOc0EJl9jKmZJqHZCIrLv5lXVH+2t+A7ZApC5R6MW8FFD3iPfEM32VS3Z+R31gX sX3w== 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=77jjzv0Z9CzErPSRHF84ZQ30/TlT+daBnsbqrJqJCd4=; b=XyzUyn/1D72+nOjErkOarSgoKQNsGLt41eWthd6249GrvDlUnbk/G/3hXboqK5wYiN 1U+g0E++y9KEQWCNkJw/lamufgGuLZqFaRZFcoV0BtLutWgWoI/f25BCb/CcnESSQMWr zY0FsrkXKoJhbABkqL5BzUQqADEET8yP5yMKTx5YZJF1zzbLElHAk9+Qm4aRQyOOluJq XgFalCuOOCJ3+o+jPc/p2mePtig7p+ePOKmG8TJhegWyDeFt/sDQoAJJCk9KDG0IdYVr g2xsUNcqfOdMgC3h3SsX/U2XblHTZdOL78F2JgZgPuEqNBBpoj8fSBoe40oQSojZox4B UrOA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Pf2xiclZ; 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 s14si5551770pfc.35.2019.08.30.03.30.11; Fri, 30 Aug 2019 03:30:27 -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=Pf2xiclZ; 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 S1727792AbfH3K3X (ORCPT + 99 others); Fri, 30 Aug 2019 06:29:23 -0400 Received: from mail-lj1-f194.google.com ([209.85.208.194]:41854 "EHLO mail-lj1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727603AbfH3K3X (ORCPT ); Fri, 30 Aug 2019 06:29:23 -0400 Received: by mail-lj1-f194.google.com with SMTP id m24so5989391ljg.8 for ; Fri, 30 Aug 2019 03:29:21 -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=77jjzv0Z9CzErPSRHF84ZQ30/TlT+daBnsbqrJqJCd4=; b=Pf2xiclZwwkFi4pPMvFrD4oBHqaPKSusBqloCaplvgLWIbPC5oH6J8nSFdYgrMURxK XNRzdtUAG1gZ1p4U0kmKOiFjF8bXqPCiUlsMYqjXNk7Gb66QODKm3AETHHzBqvHLieEd 0+i/nehhw3anG74awucIWO/fUwOk/jR0+3Woz3A7bzK4fpcBZOVXEABjHdcBZNj5hzk4 1UuJsIn7X+Vp/KBQsvl9cbl0c9w4hFmDvqRV8sqFenRUB7MKkE9Cphs/KuXdfTjHeqZj +ERRSybPlqUD9bPHV5SPvwe+QgTmUNpg2klC11Bk4uXzy5CCfgwbhtVR84p7ueTI6duW 9KyA== 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=77jjzv0Z9CzErPSRHF84ZQ30/TlT+daBnsbqrJqJCd4=; b=cbMGgLpOeRMbfT3Qa9nRhK0xWL/YYWy1QuPy7NvIRl9zUYosvBjQbroY8jgXVn5FKp RfHsRSlLKmpqY6mLENMDRNN2/E2tSVvWroYFUM3bTv06QMbrx1HpvjPaTgtCuuZDX576 QiGkYOWOm+sLtHJZsG13LyFV1iLB8XSq62d+QT5IoKqxMVfjs4S9h4RBA//cgPABhzxK bLpJvaccS5sQ7q9HaLzZtLBdmD0p/Wxzzn6rZxRpiVfzh89D53pD8vTjDosXKx1uHoF8 WM5E/rf6YR/ZQKv4muh2qs7vxoSI1Zx/AInoPAzitu7XJJBuVILOw6gEUk6ltZtxu8Q6 KTjQ== X-Gm-Message-State: APjAAAW9e7L1ldUzPjdQ674MorCQ08vHFyU63xLc8hBi7vDqL62CdXrA R5H5R4XeN6IquQfVVCFTnZ86WQ== X-Received: by 2002:a2e:a313:: with SMTP id l19mr8299166lje.32.1567160960375; Fri, 30 Aug 2019 03:29:20 -0700 (PDT) Received: from localhost.localdomain (ua-84-219-138-247.bbcust.telenor.se. [84.219.138.247]) by smtp.gmail.com with ESMTPSA id l8sm778786lja.38.2019.08.30.03.29.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 30 Aug 2019 03:29:19 -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 , Rob Herring , Mark Rutland , linux-pm@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v4 06/14] dt-bindings: opp: qcom-nvmem: Support pstates provided by a power domain Date: Fri, 30 Aug 2019 12:29:15 +0200 Message-Id: <20190830102915.7418-1-niklas.cassel@linaro.org> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20190819100957.17095-1-niklas.cassel@linaro.org> References: <20190819100957.17095-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 Reviewed-by: Rob Herring --- Changes since V3: -In Example 2: rename the node name from cpr to power-controller, and rename the label from cprpd to cpr. .../bindings/opp/qcom-nvmem-cpufreq.txt | 113 +++++++++++++++++- 1 file changed, 112 insertions(+), 1 deletion(-) diff --git a/Documentation/devicetree/bindings/opp/qcom-nvmem-cpufreq.txt b/Documentation/devicetree/bindings/opp/qcom-nvmem-cpufreq.txt index c5ea8b90e35d..4751029b9b74 100644 --- a/Documentation/devicetree/bindings/opp/qcom-nvmem-cpufreq.txt +++ b/Documentation/devicetree/bindings/opp/qcom-nvmem-cpufreq.txt @@ -14,7 +14,7 @@ operating-points-v2 table when it is parsed by the OPP framework. Required properties: -------------------- -In 'cpus' nodes: +In 'cpu' nodes: - operating-points-v2: Phandle to the operating-points-v2 table to use. In 'operating-points-v2' table: @@ -23,6 +23,15 @@ In 'operating-points-v2' table: Optional properties: -------------------- +In 'cpu' 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 = <&cpr>; + 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 = <&cpr>; + 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 = <&cpr>; + 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 = <&cpr>; + 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>; + qcom,opp-fuse-level = <1>; + }; + cpr_opp2: opp2 { + opp-level = <2>; + qcom,opp-fuse-level = <2>; + }; + cpr_opp3: opp3 { + opp-level = <3>; + qcom,opp-fuse-level = <3>; + }; + }; + +.... + +soc { +.... + cpr: power-controller@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