Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp848333yba; Wed, 3 Apr 2019 22:13:07 -0700 (PDT) X-Google-Smtp-Source: APXvYqzlwzghLsU8U4NWPvqmulc1xBfHtz3nI6PhD/l6Ho76navLwgzg+kXJMTcdx4YVSdip2S5k X-Received: by 2002:a17:902:b43:: with SMTP id 61mr4261779plq.83.1554354787454; Wed, 03 Apr 2019 22:13:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1554354787; cv=none; d=google.com; s=arc-20160816; b=H+Zibtr44HQkB/z2oxFGpxsh8lVJdqKbn973nTv+THcZhPas+is9yoYQipevmHnu8G GWCVexJOgNpYyQ1juKAC4oMwkmpkoOT3u4O32gzQcoj39CLCcKy+jd9qyvQT9MWc8VO8 f7bKoPoGc6NQSWnJk/ZA47LhMThsAAGlYNz5wbM45vETdBVgASMnH2MEqe3FqN8EaCMT 8CDfZ2Bk+BKPDS7hxkqSbRl94OYHmBaPrk/CpHwv7ZE9nR5xglTam/Gr+E0vYS/LaGmL QSytAGG3GTswV0/HTpbd0uLkgVPJT05BZK2NtYDvwfAB+LqOXIdvK9I3lAwTNYeGjDtz eT+Q== 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=KklAnXYLBcaWUwOXv3w+NPnCSqij3vKIBVWvRjd2T1M=; b=Ha6q9pwRJaQZN7Ut+XxJxt/BKBaiaWKd8GTLYZkxdjNohRCo5UNDN/Hi4te6eDDGnd 6Hhu3LXZqKjAJwRL3G3LYJQeAzUHh9CesnLFwaJfCeWtMcRWCf6sZbRf1QWeX/5gC/JN AciiqZfiReNdrMWeXylk++KzXuhW8GFJSRzDfc3mp2VC1QeMjTXN/lye1oXJdeD+Lrkr dhUL/LB7464oGLsOmvqZXZZgFE1PBgPAEzJb6KTvAZof+lcjG02Eg1TweYMQ0AcM+3Ng n3co6iDBtZ6VjSjxYVS1zgfo5kUSC4/UwEkrc8ZcsyfBbTcZesuSAIm1fLoPgfiJSVr/ Nv0A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=TVrlYzkJ; 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 r23si12923854pgv.471.2019.04.03.22.12.52; Wed, 03 Apr 2019 22:13:07 -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=TVrlYzkJ; 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 S1727080AbfDDFKt (ORCPT + 99 others); Thu, 4 Apr 2019 01:10:49 -0400 Received: from mail-pg1-f194.google.com ([209.85.215.194]:44296 "EHLO mail-pg1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727002AbfDDFKs (ORCPT ); Thu, 4 Apr 2019 01:10:48 -0400 Received: by mail-pg1-f194.google.com with SMTP id i2so601660pgj.11 for ; Wed, 03 Apr 2019 22:10:47 -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=KklAnXYLBcaWUwOXv3w+NPnCSqij3vKIBVWvRjd2T1M=; b=TVrlYzkJah4xdZ0w8EvrnSm/BK2kbCUs+gYrh4qHXuTB+9XfnOKDUijzhXIOhYcCQ1 lMWLSiwQm+HBmQ8e4X8RqpPvj65Nem5N7MMVM86i766VY6p6IXLsPIDlRbHoOoXhjrkM i41Ogs62ITdcsCP4H3olAyjjOUko92YbM/gLAPKf3PBVt/OaCvR34FNNUfU/GGNzxrDt 4dK87LDFQXJLL/EefUGM7xmBQ9sKFFy/Np27g9F+KAJFqgzDyy3t5QGS+0VMhXbPKQwv Dkb9xcd4wT7vQL5n7o1j4Ra+ue6z78MoWYjjfcBc4E1tnEXZ3IG9Y1v+bcdpW/aD3CTf rdPg== 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=KklAnXYLBcaWUwOXv3w+NPnCSqij3vKIBVWvRjd2T1M=; b=UyuCHT+2KaNkVNwffA3U3rPARbRrXljfMJvYDLTFSVsJi13Pk78OmmuhHYFHe8nsDi lSBBnZqJgL154nE3NqyPLk4hkZd0fjmTJKTIS7D+eHlQT0E7RQvCPCsRViGsleI5wOXg 2FLpPo7plrTBmoW7vdP6kd/R2O0vh57tUBU+VLSYqJB07HbaafNpCCsY/4WsJ6MfCOb3 V9oNc72xgYiQp5cugtBFVmU1gXiaoV2scx+kTET8v2r2Epi2ldMgijrxwrxFndtzV4aj R5upbqJWal4k8XAV10YHFvlPoPGqg8lT2JgcNBdKNctkT1GLsmF0Di0eRBiaJH5kjmQI Rl2Q== X-Gm-Message-State: APjAAAWBA3ufI4smHPuCW8q44+s+xqdhVTWpYDFA4gMdwH+GKMuztu/D oUT6HKMJk3mAWUadbGhCxNDWIg== X-Received: by 2002:a62:1318:: with SMTP id b24mr3620039pfj.201.1554354647500; Wed, 03 Apr 2019 22:10:47 -0700 (PDT) Received: from centauri.imgcgcw.net ([147.50.13.10]) by smtp.gmail.com with ESMTPSA id g64sm43254361pfg.13.2019.04.03.22.10.44 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 03 Apr 2019 22:10:46 -0700 (PDT) From: Niklas Cassel To: Rob Herring , Mark Rutland , Jorge Ramirez-Ortiz , Niklas Cassel Cc: linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [RFC PATCH 7/9] dt-bindings: power: avs: Add support for CPR (Core Power Reduction) Date: Thu, 4 Apr 2019 07:09:28 +0200 Message-Id: <20190404050931.9812-8-niklas.cassel@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190404050931.9812-1-niklas.cassel@linaro.org> References: <20190404050931.9812-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 Add DT bindings to describe the CPR HW found on certain Qualcomm SoCs. Co-developed-by: Jorge Ramirez-Ortiz Signed-off-by: Jorge Ramirez-Ortiz Signed-off-by: Niklas Cassel --- .../bindings/power/avs/qcom,cpr.txt | 119 ++++++++++++++++++ 1 file changed, 119 insertions(+) create mode 100644 Documentation/devicetree/bindings/power/avs/qcom,cpr.txt diff --git a/Documentation/devicetree/bindings/power/avs/qcom,cpr.txt b/Documentation/devicetree/bindings/power/avs/qcom,cpr.txt new file mode 100644 index 000000000000..541c9b31cd3b --- /dev/null +++ b/Documentation/devicetree/bindings/power/avs/qcom,cpr.txt @@ -0,0 +1,119 @@ +QCOM CPR (Core Power Reduction) + +CPR (Core Power Reduction) is a technology to reduce core power on a CPU +or other device. Each OPP of a device corresponds to a "corner" that has +a range of valid voltages for a particular frequency. While the device is +running at a particular frequency, CPR monitors dynamic factors such as +temperature, etc. and suggests adjustments to the voltage to save power +and meet silicon characteristic requirements. + +- compatible: + Usage: required + Value type: + Definition: must be "qcom,cpr" + +- reg: + Usage: required + Value type: + Definition: base address and size of the rbcpr register region + +- interrupts: + Usage: required + Value type: + Definition: list of three interrupts in order of irq0, irq1, irq2 + +- acc-syscon: + Usage: optional + Value type: + Definition: phandle to syscon for writing ACC settings + +- nvmem: + Usage: required + Value type: + Definition: phandle to nvmem provider containing efuse settings + +- nvmem-names: + Usage: required + Value type: + Definition: must be "qfprom" + +vdd-mx-supply = <&pm8916_l3>; + +- qcom,cpr-ref-clk: + Usage: required + Value type: + Definition: rate of reference clock in kHz + +- qcom,cpr-timer-delay-us: + Usage: required + Value type: + Definition: delay in uS for the timer interval + +- qcom,cpr-timer-cons-up: + Usage: required + Value type: + Definition: Consecutive number of timer intervals, or units of + qcom,cpr-timer-delay-us, that occur before issuing an up + interrupt + +- qcom,cpr-timer-cons-down: + Usage: required + Value type: + Definition: Consecutive number of timer intervals, or units of + qcom,cpr-timer-delay-us, that occur before issuing a down + interrupt + +- qcom,cpr-up-threshold: + Usage: optional + Value type: + Definition: The threshold for CPR to issue interrupt when error_steps + is greater than it when stepping up + +- qcom,cpr-down-threshold: + Usage: optional + Value type: + Definition: The threshold for CPR to issue interrdownt when error_steps + is greater than it when stepping down + +- qcom,cpr-down-threshold: + Usage: optional + Value type: + Definition: Idle clock cycles ring oscillator can be in + +- qcom,cpr-gcnt-us: + Usage: required + Value type: + Definition: The time for gate count in uS + +- qcom,vdd-apc-step-up-limit: + Usage: required + Value type: + Definition: Limit of vdd-apc-supply steps for scaling up + +- qcom,vdd-apc-step-down-limit: + Usage: required + Value type: + Definition: Limit of vdd-apc-supply steps for scaling down + +Example: + + avs@b018000 { + compatible = "qcom,cpr"; + reg = <0xb018000 0x1000>; + interrupts = <0 15 1>, <0 16 1>, <0 17 1>; + vdd-mx-supply = <&pm8916_l3>; + acc-syscon = <&tcsr>; + nvmem = <&qfprom>; + nvmem-names = "qfprom"; + + qcom,cpr-ref-clk = <19200>; + qcom,cpr-timer-delay-us = <5000>; + qcom,cpr-timer-cons-up = <0>; + qcom,cpr-timer-cons-down = <2>; + qcom,cpr-up-threshold = <0>; + qcom,cpr-down-threshold = <2>; + qcom,cpr-idle-clocks = <15>; + qcom,cpr-gcnt-us = <1>; + qcom,vdd-apc-step-up-limit = <1>; + qcom,vdd-apc-step-down-limit = <1>; + }; -- 2.20.1