From patchwork Thu Feb 26 13:21:39 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Leo Yan X-Patchwork-Id: 5892561 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id BDA2EBF440 for ; Thu, 26 Feb 2015 13:27:08 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id D35802038F for ; Thu, 26 Feb 2015 13:27:07 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 0A4C22020F for ; Thu, 26 Feb 2015 13:27:07 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1YQyQf-0000DS-0i; Thu, 26 Feb 2015 13:24:37 +0000 Received: from merlin.infradead.org ([2001:4978:20e::2]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1YQyPU-0007qJ-Oh for linux-arm-kernel@bombadil.infradead.org; Thu, 26 Feb 2015 13:23:25 +0000 Received: from mail-pa0-f42.google.com ([209.85.220.42]) by merlin.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1YQyPQ-0006KM-Qr for linux-arm-kernel@lists.infradead.org; Thu, 26 Feb 2015 13:23:21 +0000 Received: by paceu11 with SMTP id eu11so13943099pac.7 for ; Thu, 26 Feb 2015 05:22:53 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=qby8KiMUd+0mSHwu4Vzr5SASxazz1e3a6KXIVAZQUZk=; b=HCCfEPBwSw6IKkd2X4Hm/q5Sl+M0lTsbvE4qOEV/LinvRDIhrVlpQRiD7Qyb8GLHXJ lIqGN5j8etsp31rnnmz6ZUoWVG4KAqKDFRnd+qvp1Km2rbZFWhRBf48EjUF0QPPmQBoX JocVUvyhi5I+UhLvOPyBdu4IkgxnyEE3t8O3fIb1kiH7dnigVHXXlMU/WhLhe13joobt p+OEKhM0YZcs5kByD5K1UDpapCK1vLaEchDhvDIa3FmfkPC3H0dvU2/clcAsMZs5dU/8 ylkSP5rspXMjHxrb+T2kY/jhAVKQZzPUGP4xY/C4n6wdYDyVmqCFjurspIWmSv4pvKDu r7rw== X-Gm-Message-State: ALoCoQnGWwAJiSiyDP4f+5Pu/LToi++5op6DTl4cDToL3gOP8zD9M2xi/C+s6YOgGw68IisY7kSH X-Received: by 10.68.100.99 with SMTP id ex3mr5649812pbb.7.1424956973796; Thu, 26 Feb 2015 05:22:53 -0800 (PST) Received: from localhost.localdomain ([180.150.157.4]) by mx.google.com with ESMTPSA id g7sm1117723pdm.4.2015.02.26.05.22.50 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 26 Feb 2015 05:22:53 -0800 (PST) From: Leo Yan To: "Rafael J . Wysocki" , Viresh Kumar , linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Dan Zhao , zhenwei.wang@hisilicon.com, mohaoju@hisilicon.com Subject: [PATCH 2/2] dt-bindings: cpufreq: document for hisilicon acpu driver Date: Thu, 26 Feb 2015 21:21:39 +0800 Message-Id: <1424956899-8891-3-git-send-email-leo.yan@linaro.org> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1424956899-8891-1-git-send-email-leo.yan@linaro.org> References: <1424956899-8891-1-git-send-email-leo.yan@linaro.org> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20150226_082320_943367_5D6F7480 X-CRM114-Status: GOOD ( 11.12 ) X-Spam-Score: -2.6 (--) Cc: Leo Yan X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP This adds documentation for hisilicon acpu's cpufreq driver. OPP library is used for device tree parsing to get frequency list; Furthermore, this driver can bind all CPUs to change frequency together, or the two clusters can trigger the frequency change independently. This is controlled by the dtb flag "hisilicon,coupled-clusters". Signed-off-by: Leo Yan --- .../bindings/cpufreq/cpufreq-hisi-acpu.txt | 112 +++++++++++++++++++++ 1 file changed, 112 insertions(+) create mode 100644 Documentation/devicetree/bindings/cpufreq/cpufreq-hisi-acpu.txt diff --git a/Documentation/devicetree/bindings/cpufreq/cpufreq-hisi-acpu.txt b/Documentation/devicetree/bindings/cpufreq/cpufreq-hisi-acpu.txt new file mode 100644 index 0000000..547e7339 --- /dev/null +++ b/Documentation/devicetree/bindings/cpufreq/cpufreq-hisi-acpu.txt @@ -0,0 +1,112 @@ +Hisilicon acpu cpufreq driver +----------------------------- + +Hisilicon ACPU cpufreq driver for CPU frequency scaling. + +Required properties: +- operating-points: Table of frequencies and voltage CPU could be transitioned + into. Frequency should be in KHz units and voltage should be in + microvolts; This must be defined under node /cpus/cpu@x. Where x is + the first cpu inside a cluster. + +Optional properties: +- hisilicon,coupled-clusters: Specify whether all clusters share one clock + source. This must be defined under node cpufreq. + +Example 1: all clusters share one clock source +---------------------------------------------- + +cpus { + #address-cells = <1>; + #size-cells = <0>; + + cpu@0 { + compatible = "arm,cortex-a53", "arm,armv8"; + device_type = "cpu"; + reg = <0x0 0x0>; + operating-points = < + /* kHz uV */ + 1200000 0 + 960000 0 + 729000 0 + 432000 0 + 208000 0 + >; + }; + + cpu@1 { + compatible = "arm,cortex-a53", "arm,armv8"; + device_type = "cpu"; + reg = <0x0 0x1>; + }; + + cpu@100 { + compatible = "arm,cortex-a53", "arm,armv8"; + device_type = "cpu"; + reg = <0x0 0x100>; + }; + + cpu@101 { + compatible = "arm,cortex-a53", "arm,armv8"; + device_type = "cpu"; + reg = <0x0 0x101>; + }; +}; + +cpufreq { + compatible = "hisilicon,hisi-acpu-cpufreq"; + hisilicon,coupled-clusters = <1>; +}; + + +Example 2: every cluster has dedicated clock source +--------------------------------------------------- + +cpus { + #address-cells = <1>; + #size-cells = <0>; + + cpu@0 { + compatible = "arm,cortex-a53", "arm,armv8"; + device_type = "cpu"; + reg = <0x0 0x0>; + operating-points = < + /* kHz uV */ + 1200000 0 + 960000 0 + 729000 0 + 432000 0 + 208000 0 + >; + }; + + cpu@1 { + compatible = "arm,cortex-a53", "arm,armv8"; + device_type = "cpu"; + reg = <0x0 0x1>; + }; + + cpu@100 { + compatible = "arm,cortex-a53", "arm,armv8"; + device_type = "cpu"; + reg = <0x0 0x100>; + operating-points = < + /* kHz uV */ + 1200000 0 + 960000 0 + 729000 0 + 432000 0 + 208000 0 + >; + }; + + cpu@101 { + compatible = "arm,cortex-a53", "arm,armv8"; + device_type = "cpu"; + reg = <0x0 0x101>; + }; +}; + +cpufreq { + compatible = "hisilicon,hisi-acpu-cpufreq"; +};