From patchwork Fri Jul 18 05:35:55 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Viresh Kumar X-Patchwork-Id: 33817 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-qc0-f197.google.com (mail-qc0-f197.google.com [209.85.216.197]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id F03AC20969 for ; Fri, 18 Jul 2014 05:36:10 +0000 (UTC) Received: by mail-qc0-f197.google.com with SMTP id x13sf9851185qcv.8 for ; Thu, 17 Jul 2014 22:36:10 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:delivered-to:from:to:cc:subject :date:message-id:sender:precedence:list-id:x-original-sender :x-original-authentication-results:mailing-list:list-post:list-help :list-archive:list-unsubscribe; bh=4zBeM7RJbQEr7IMQ1dK79fwACsa7BzdHiWqup4tij38=; b=H/s/DN7n/9TVWfdrtER1tukkdzl6MVwmKDgom+YcF1Oog30P9OFnIBsxsu0MFvyAiC 5d580A2TqXi64qhFU/tIEdg62/2fDifpsXcr+hj1s9qIhlMZlyjJpLFvzLSE4UvgEXoi vaBSa7cE1BqfcfQ3xyDE1z/zwfxXV87kpWtkjFM+bJLM0hQJ+BUpzGSBAFkyKb6YeIVi iGhyFvCnFg51ZzHIrxTOJS4MVAJJHS2Qytadt4bhASPbBw/olJU4IBz/vAMLCCpdNRmm bMrTuRCRF4wtSQ3fyMJJH/GTJldaU1gPZwRoeqgVvv8BkyKssQRVMb/qixpVZUXnBQkm mEMw== X-Gm-Message-State: ALoCoQkMZdVVBtSNVEcV2pgVa304NhPfTHm6toxFruzZZLRqohnsCENFmrmNEOhIqr0KIodqcnfn X-Received: by 10.236.24.196 with SMTP id x44mr1049566yhx.15.1405661770711; Thu, 17 Jul 2014 22:36:10 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.49.1 with SMTP id p1ls890960qga.97.gmail; Thu, 17 Jul 2014 22:36:10 -0700 (PDT) X-Received: by 10.52.129.232 with SMTP id nz8mr92092vdb.94.1405661770623; Thu, 17 Jul 2014 22:36:10 -0700 (PDT) Received: from mail-vc0-f182.google.com (mail-vc0-f182.google.com [209.85.220.182]) by mx.google.com with ESMTPS id nc1si4805973veb.6.2014.07.17.22.36.10 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 17 Jul 2014 22:36:10 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.220.182 as permitted sender) client-ip=209.85.220.182; Received: by mail-vc0-f182.google.com with SMTP id hy4so6684684vcb.27 for ; Thu, 17 Jul 2014 22:36:10 -0700 (PDT) X-Received: by 10.52.163.229 with SMTP id yl5mr1535412vdb.79.1405661770546; Thu, 17 Jul 2014 22:36:10 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.221.37.5 with SMTP id tc5csp92745vcb; Thu, 17 Jul 2014 22:36:10 -0700 (PDT) X-Received: by 10.66.66.14 with SMTP id b14mr2142871pat.9.1405661769626; Thu, 17 Jul 2014 22:36:09 -0700 (PDT) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id n7si2327163pdl.143.2014.07.17.22.36.08; Thu, 17 Jul 2014 22:36:09 -0700 (PDT) Received-SPF: none (google.com: devicetree-owner@vger.kernel.org does not designate permitted sender hosts) client-ip=209.132.180.67; Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752900AbaGRFgI (ORCPT + 8 others); Fri, 18 Jul 2014 01:36:08 -0400 Received: from mail-qc0-f181.google.com ([209.85.216.181]:34477 "EHLO mail-qc0-f181.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751436AbaGRFgH (ORCPT ); Fri, 18 Jul 2014 01:36:07 -0400 Received: by mail-qc0-f181.google.com with SMTP id w7so2939662qcr.26 for ; Thu, 17 Jul 2014 22:36:06 -0700 (PDT) X-Received: by 10.140.101.142 with SMTP id u14mr3753458qge.48.1405661765958; Thu, 17 Jul 2014 22:36:05 -0700 (PDT) Received: from localhost (ec2-23-23-178-99.compute-1.amazonaws.com. [23.23.178.99]) by mx.google.com with ESMTPSA id z9sm5173529qge.4.2014.07.17.22.35.59 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Thu, 17 Jul 2014 22:36:05 -0700 (PDT) From: Viresh Kumar To: rjw@rjwysocki.net, mike.turquette@linaro.org, rob.herring@linaro.org, grant.likely@linaro.org Cc: linaro-kernel@lists.linaro.org, nm@ti.com, Sudeep.Holla@arm.com, sboyd@codeaurora.org, linux-arm-kernel@lists.infradead.org, linux-pm@vger.kernel.org, devicetree@vger.kernel.org, santosh.shilimkar@ti.com, Lorenzo.Pieralisi@arm.com, arvind.chauhan@arm.com, arnd.bergmann@linaro.org, Viresh Kumar Subject: [RFC] cpufreq: Add bindings for CPU clock sharing topology Date: Fri, 18 Jul 2014 11:05:55 +0530 Message-Id: <7e097b71342c9f5f63b07ff2e135eb7beb626aab.1405661369.git.viresh.kumar@linaro.org> X-Mailer: git-send-email 2.0.0.rc2 Sender: devicetree-owner@vger.kernel.org Precedence: list List-ID: X-Mailing-List: devicetree@vger.kernel.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: viresh.kumar@linaro.org X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.220.182 as permitted sender) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , Clock lines may or may not be shared among different CPUs on a platform. When clock lines are shared between CPUs, they change DVFS state together. Possible configurations: 1.) All CPUs share a single clock line. 2.) All CPUs have independent clock lines. 3.) CPUs within a group/cluster share clock line but each group/cluster have a separate line for itself. There is no generic way available today to detect which CPUs share clock lines and so this is an attempt towards that. Much of the information is present in the commit and so no point duplicating it here. These are obviously not finalized yet and this is an attempt to initiate a discussion around this. Please share your valuable feedback. Signed-off-by: Viresh Kumar --- I wasn't sure about the path/name of this file, so please don't blast me on that :) .../devicetree/bindings/cpufreq/cpu_clocks.txt | 159 +++++++++++++++++++++ 1 file changed, 159 insertions(+) create mode 100644 Documentation/devicetree/bindings/cpufreq/cpu_clocks.txt diff --git a/Documentation/devicetree/bindings/cpufreq/cpu_clocks.txt b/Documentation/devicetree/bindings/cpufreq/cpu_clocks.txt new file mode 100644 index 0000000..30ce9ad --- /dev/null +++ b/Documentation/devicetree/bindings/cpufreq/cpu_clocks.txt @@ -0,0 +1,159 @@ +* Generic CPUFreq clock bindings + +Clock lines may or may not be shared among different CPUs on a platform. + +Possible configurations: +1.) All CPUs share a single clock line +2.) All CPUs have independent clock lines +3.) CPUs within a group/cluster share clock line but each group/cluster have a + separate line for itself + +Optional Properties: +- clock-master: This declares cpu as clock master. Other CPUs can either define + "clock-ganged" or "clock-master" property, but shouldn't be missing both. + +- clock-ganged: Should have phandle of a cpu declared as "clock-master". + +If any cpu node, doesn't have both "clock-master" and "clock-ganged" properties +defined, it would be assumed that all CPUs on that platform share a single clock +line. This will help supporting already upstreamed platforms. + + +Examples: +1.) All CPUs share a single clock line + +cpus { + #address-cells = <1>; + #size-cells = <0>; + + cpu0: cpu@0 { + compatible = "arm,cortex-a15"; + reg = <0>; + next-level-cache = <&L2>; + clock-master; + operating-points = < + /* kHz uV */ + 792000 1100000 + 396000 950000 + 198000 850000 + >; + clock-latency = <61036>; /* two CLK32 periods */ + }; + + cpu1: cpu@1 { + compatible = "arm,cortex-a15"; + reg = <1>; + next-level-cache = <&L2>; + clock-ganged = <&cpu0>; + }; +}; + +OR (clock-master/ganged aren't defined) + +cpus { + #address-cells = <1>; + #size-cells = <0>; + + cpu0: cpu@0 { + compatible = "arm,cortex-a15"; + reg = <0>; + next-level-cache = <&L2>; + operating-points = < + /* kHz uV */ + 792000 1100000 + 396000 950000 + 198000 850000 + >; + clock-latency = <61036>; /* two CLK32 periods */ + }; + + cpu1: cpu@1 { + compatible = "arm,cortex-a15"; + reg = <1>; + next-level-cache = <&L2>; + }; +}; + +2.) All CPUs have independent clock lines +cpus { + #address-cells = <1>; + #size-cells = <0>; + + cpu0: cpu@0 { + compatible = "arm,cortex-a15"; + reg = <0>; + next-level-cache = <&L2>; + clock-master; + operating-points = < + /* kHz uV */ + 792000 1100000 + 396000 950000 + 198000 850000 + >; + clock-latency = <61036>; /* two CLK32 periods */ + }; + + cpu1: cpu@1 { + compatible = "arm,cortex-a15"; + reg = <1>; + next-level-cache = <&L2>; + clock-master; + operating-points = < + /* kHz uV */ + 792000 1100000 + 396000 950000 + 198000 850000 + >; + clock-latency = <61036>; /* two CLK32 periods */ + }; +}; + +3.) CPUs within a group/cluster share single clock line but each group/cluster +have a separate line for itself + +cpus { + #address-cells = <1>; + #size-cells = <0>; + + cpu0: cpu@0 { + compatible = "arm,cortex-a15"; + reg = <0>; + next-level-cache = <&L2>; + clock-master; + operating-points = < + /* kHz uV */ + 792000 1100000 + 396000 950000 + 198000 850000 + >; + clock-latency = <61036>; /* two CLK32 periods */ + }; + + cpu1: cpu@1 { + compatible = "arm,cortex-a15"; + reg = <1>; + next-level-cache = <&L2>; + clock-ganged = <&cpu0>; + }; + + cpu2: cpu@100 { + compatible = "arm,cortex-a7"; + reg = <100>; + next-level-cache = <&L2>; + clock-master; + operating-points = < + /* kHz uV */ + 792000 950000 + 396000 750000 + 198000 450000 + >; + clock-latency = <61036>; /* two CLK32 periods */ + }; + + cpu3: cpu@101 { + compatible = "arm,cortex-a7"; + reg = <101>; + next-level-cache = <&L2>; + clock-ganged = <&cpu2>; + }; +};