Received: by 2002:a25:8b12:0:0:0:0:0 with SMTP id i18csp2505106ybl; Mon, 19 Aug 2019 03:11:20 -0700 (PDT) X-Google-Smtp-Source: APXvYqyI0Fk0e3qNwoWGOvcfRwUlw/umiLJ0YYDjIE/YSS5cwdeC4VH7lVa5ihtETVajL1pnBu4W X-Received: by 2002:a63:b346:: with SMTP id x6mr19415172pgt.218.1566209480417; Mon, 19 Aug 2019 03:11:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1566209480; cv=none; d=google.com; s=arc-20160816; b=By/IseYEvrLXy3V7jWSq4CtXFBqzPQNJas2CPy2zj9TAfMXQ/8vS3Gxh01SgeaI5us LIp5Y9M/dfijfKieGKu3x/USW5IlxLz6a75DGUUOUWKCMaL6lJ7A12FCu2IWOrfbUcAm mDgL9pbFZP9T/ervEJNWTftqOsxL5YVEwZs9PosNXvM/ogumAGg97oI49NFdgLxwp6Cg qb9gs8XG+Y8xJrmjYZC8lchZMIPPrHU51Aus8HJS/LES2ZxGAR/ZvrFQHaJe/+plVYfR ujxsIckDM+E1Vll8CWwuOrjRdY4Clbrb0kbHzfipVXB/G7lucn6V1kicN8GDVrzaizB+ h0QQ== 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=bFsYBz11w/0+2ipDFc6RAzNYkyX/rGj3LfC3+f/vlp4=; b=u4tFbhTmwGfDJW+Ku4tiaX87JxIXREBbfaLmb0yKxgMZKoSjXZXgfPSfdcP7fZO/uN vHCz1gyOscyc/sJqYyDgjnXi5IU9e0yhM4gwSGerxGSnaTlA/PqunJWwheS3a+FgUefN vKquSEddbzP1RUfHVavqdO6r8qUjU9NNSX6BDbHUFy7KGGZYj+dIh040yr2E+T8w4u0J csgYLpbRT4bChjlR6I/6l7oOW4a08vEi2rw6l7gufZn3zyhQWPvtNmGtIyerqWcnOaDR InBZC8pSq6iXEv2cYGGrimup3OtEr4tc0vdQnMQxnKrTcbI7yIBa17qdrRzZJX6lEmmC Pdmw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=beyi9uGJ; 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 q23si8419866pjp.76.2019.08.19.03.11.05; Mon, 19 Aug 2019 03:11:20 -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=beyi9uGJ; 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 S1727084AbfHSKKM (ORCPT + 99 others); Mon, 19 Aug 2019 06:10:12 -0400 Received: from mail-lj1-f195.google.com ([209.85.208.195]:35615 "EHLO mail-lj1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726373AbfHSKKM (ORCPT ); Mon, 19 Aug 2019 06:10:12 -0400 Received: by mail-lj1-f195.google.com with SMTP id l14so1206093lje.2 for ; Mon, 19 Aug 2019 03:10:10 -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=bFsYBz11w/0+2ipDFc6RAzNYkyX/rGj3LfC3+f/vlp4=; b=beyi9uGJnPpG8O0vT7qQxG//HWz2f6IINF0hBwHiHXB3kM5NEIyK3NG65ahyuzltQn HwoxDU9bsUkPsLT2MHe2pzdSOftUh6tGgYxJ2PUa0Sw7H1uV3stySjV8LZplZKEUFRo1 1Maodh2jZXqnsXwBVOS+g7SjZozY0N2P2ppxGP3+EPBO5n3rpwN1+RvTcGELgeGjE/+c SEYlGvgFZQlQ3cYuGhsm3Qg7gDua8/tTFp179tb3eMFcaWj5mh9KwHU7WogsqXdVypED HPITvLx5YQBBjPJOA37N4CS1M6xlUFJupOFzYyH+79Fvw+WcGFoKXUvrZfAYTlPZMgRY ZtCg== 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=bFsYBz11w/0+2ipDFc6RAzNYkyX/rGj3LfC3+f/vlp4=; b=sryz2P9+FZy3k8M2V2EfATu5jDCxMMG/mdsYQ9CD87PUOZJxD4fNZ8uMlt69TU4RSp AB1zbYyKCVZqnwXvBq9uZaVcBYQnDcCg4uIYY8qiYS8MiQPYxoARr4KmOX46wxD7kGi1 quFRFT8HXsdtXiYRN8Mg22xxU9ft1jG7SkEfBNRuOjgxJ6LnejNYzkgbS3HSLhpRGPCG ntN9aC+7RB0kxyuNXDQRFfcI4yv5TpPfzgdaWjtxQa1ZMV9GWZ5YVNBbeFJcrkTuVUun oGxE2ZjCmTVzZTZG6FjE4jKsuoZSJH3DIy03W8ssBDpnl7PGJL93VgEF+SOkUBUhGdg4 /C6A== X-Gm-Message-State: APjAAAVPvwsFLzjPCFwSKqgsi/fTZCS6s4kOM/+mismbb6QrezHlSaRV 25Ec+9j+K0D4OB7EBMFGWsgIlg== X-Received: by 2002:a05:651c:29b:: with SMTP id b27mr12017195ljo.74.1566209409256; Mon, 19 Aug 2019 03:10:09 -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 g9sm1401833lje.90.2019.08.19.03.10.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 19 Aug 2019 03:10:08 -0700 (PDT) From: Niklas Cassel To: Andy Gross , Ilia Lin , 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 v3 06/14] dt-bindings: cpufreq: qcom-nvmem: Support pstates provided by a power domain Date: Mon, 19 Aug 2019 12:09:57 +0200 Message-Id: <20190819100957.17095-1-niklas.cassel@linaro.org> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20190725104144.22924-7-niklas.cassel@linaro.org> References: <20190725104144.22924-7-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 V2: -Picked up Rob's Reviewed-by on V2. -As Rob pointed out in V1, it should be "In 'cpu' nodes" and not "In 'cpus' nodes". -In Example 2: include the qcom,opp-fuse-level property rather than "...", since Rob pointed out in the review of V1 of "dt-bindings: opp: Add qcom-opp bindings with properties needed for CPR", that this property was missing in this patch. .../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..1e6261570f3e 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 = <&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>; + 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 { +.... + 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