Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp10879346ybi; Thu, 25 Jul 2019 06:28:37 -0700 (PDT) X-Google-Smtp-Source: APXvYqxtUZwhf7ZMWSN22RMPL9gaSSK1WfmdXGr+QgA/g8o5MMUN3z8Mfp67uCl3pRTCYdLSraZH X-Received: by 2002:a62:1750:: with SMTP id 77mr16883462pfx.172.1564061317712; Thu, 25 Jul 2019 06:28:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1564061317; cv=none; d=google.com; s=arc-20160816; b=eBXWEcQy/5Zhq28TUYqXy0zerxQWec5Jrs9u4xVPjnjH8y8mc1dWFb7r+toZjKmT3S 3VeE1AoIfblhYPk+prD9zB8xfoXsTSwdR1lc/9qPsiMaL8VHNrl84oJsmTyoN0g0++gO ojFhQ6L1a195hJqvZEI6gYE4eVk1U7cyUIVEIusA025OA9/UQTAVKDIQnx6I9udbfkmQ qO1oaMsTAlFWr7iaDAH60fAdsK/eSKEJjnRXHcy4MHnFKMvHXE1cJvYhQWAhGLxFOSmz 60uolcemIyT7wHKpwviGw7At/MvG24uXZyCeXyAke/PWA9bf4zInCif8loBetRg2iwiD +5tQ== 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=LiiDIcuYuvzDkVVpaCJ51zP8pkBPJ3mw/U4ClXITP7ep46pUe/htg/eN4ag+WZcRjr x98zO6gKf7KUgD+23ucH8/cbejsYMPptRp6yEe/xuiE7x3A2BX5KDyxeXG1hHB647aIz 1qTWJtSC2k6kIvBi+ym3fcK/FYsMYDS7j8YkD5A3u2ZNzghAeTqzPn9IKTvdjRC32erm KqNwTzkA9lYaLjtrdxUaHPM2W/0XlUY8dnRFl0piTmb6HHj3sdJgto+edcCaC6PCx2jb EmM1mLra9uqaUWzIgqU30K0eCZz2bVjixhcu3hed0DZd6U/HUTu1G1T1AmdkGq0aVa4D JOlg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=csVHpCLA; 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 29si4020157pgw.326.2019.07.25.06.28.22; Thu, 25 Jul 2019 06:28:37 -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=csVHpCLA; 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 S2390018AbfGYKmf (ORCPT + 99 others); Thu, 25 Jul 2019 06:42:35 -0400 Received: from mail-lj1-f194.google.com ([209.85.208.194]:45721 "EHLO mail-lj1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2389363AbfGYKme (ORCPT ); Thu, 25 Jul 2019 06:42:34 -0400 Received: by mail-lj1-f194.google.com with SMTP id m23so47444643lje.12 for ; Thu, 25 Jul 2019 03:42:31 -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=csVHpCLA5Pk3GDmRAP9m1Ka9VSO+6NzJzZMzdJorVAdGE3hwGdBVrpgI7dNWlxKh5+ gp2Jnqh1jTzEYKZ2cuAO9fNIysTEyilMqkvBZ7Es/sttkX11gsh4pt17Bq5V5ikLgcPZ 07h4eMoW6kC1kiC/JWESg9NsKm9MS3EWFMcEDENNY4HnbldWLbbmD0U/xtAOPCaINXcP lwBrhC+T1897IM+jvEohanzwbCHC/BLsmnRGCTZu41aQcIjP8uexSxkp2ORA4s2orTNl d0Daf2zOXzOT9wsg3Vk0S0kKM6dwDOTBAegabpvisdrX3oBYB2iPQrG5HICwn2pT+Pt0 Cx0Q== 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=uUicmmE/3g0bFjJtjQPkJJgTIQENBFvuFi+T7oHaoenY6cKx6RdOr1TX+RcuhiQSp4 Ynf6OpSOXROcyfZits8nmLslE8+ogdgjTHgUNDzsaal65UH3bJfypAm+dPYGHNMk7WRk 0Vo1OnrK2WZinn92IecroMQ2CGtcfBKmZSgQZHterr4CiUu/dvSRa/ox3eZI6lP0MZyt 6ojKvm7N21pUlUzujkltuNAuAmr5KaA7iJi/QgVdT2QCUtpMAS7laPs8+JAiuk+wMc7u rOTvoGekEhMq42/NvI+nXZCbpdFTLmSV1zsJkhAPb7/A/0UCgbG82pQb165nf6YCRR9+ Xm0g== X-Gm-Message-State: APjAAAXylnUrbbHm4XFJp4eiHjAiJqHh3sH5zXbK+mU5b6apTcFCRLH7 FwpAhgdNAT2bgQMb1CxRfIqZNA== X-Received: by 2002:a2e:8849:: with SMTP id z9mr6421628ljj.203.1564051351281; Thu, 25 Jul 2019 03:42:31 -0700 (PDT) Received: from localhost.localdomain (ua-83-226-44-230.bbcust.telenor.se. [83.226.44.230]) by smtp.gmail.com with ESMTPSA id k124sm7461299lfd.60.2019.07.25.03.42.30 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Thu, 25 Jul 2019 03:42:30 -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 , Mark Rutland , linux-pm@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v2 06/14] dt-bindings: cpufreq: qcom-nvmem: Support pstates provided by a power domain Date: Thu, 25 Jul 2019 12:41:34 +0200 Message-Id: <20190725104144.22924-7-niklas.cassel@linaro.org> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20190725104144.22924-1-niklas.cassel@linaro.org> References: <20190725104144.22924-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