From patchwork Mon Dec 1 11:41:22 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Viresh Kumar X-Patchwork-Id: 41754 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-ee0-f72.google.com (mail-ee0-f72.google.com [74.125.83.72]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 9911824001 for ; Mon, 1 Dec 2014 11:41:58 +0000 (UTC) Received: by mail-ee0-f72.google.com with SMTP id e53sf6542982eek.11 for ; Mon, 01 Dec 2014 03:41:57 -0800 (PST) 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:in-reply-to:references:in-reply-to:references :sender:precedence:list-id:x-original-sender :x-original-authentication-results:mailing-list:list-post:list-help :list-archive:list-unsubscribe; bh=mTWGF700GZR1WpxmkLXMvr2Gp3Q/0dt8XZR6pQzdBXQ=; b=BBwhuorKT2BcaqkFS7+q2ZADjArAH2vbLGhKj3EzTa1DAXcAVuym86UI+MfliTMlFh Sz8jJewZ1diIEXtEt4Xq/TvMnMt0xPcmTqI2/c8SUOnSbi+mV+qNPZDD0hlkeg7pfivO wy9ichI7izPcjxW0PqYtrSL4rqwc1tjQReSlKjNQtIqkC8jJTrIZZiOKuukitgmeLR4r rRppLd+/GVwM6BdyZEi6Jmj+yrYfPon9njDheIHXNbBnR40d0EiEZmg+HpamHIxPzZSU PFJCb3oZJUsoXZLuRP6ty+Leh9xn90/SGF/9b3KAjwMTyaZnJWLSNJkSUeQWxRaEsohP 20vA== X-Gm-Message-State: ALoCoQkU+I7Ezn6jRM+plxT/ikgPujhGyYXor1of+MTpHpNMvhsjtUSJiHO4At1LAtyYTytQ7xbI X-Received: by 10.180.24.35 with SMTP id r3mr11193160wif.0.1417434117905; Mon, 01 Dec 2014 03:41:57 -0800 (PST) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.207.3 with SMTP id ls3ls86855lac.46.gmail; Mon, 01 Dec 2014 03:41:57 -0800 (PST) X-Received: by 10.112.132.67 with SMTP id os3mr54977634lbb.90.1417434117746; Mon, 01 Dec 2014 03:41:57 -0800 (PST) Received: from mail-lb0-f182.google.com (mail-lb0-f182.google.com. [209.85.217.182]) by mx.google.com with ESMTPS id nb4si17435694lbb.35.2014.12.01.03.41.57 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 01 Dec 2014 03:41:57 -0800 (PST) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.217.182 as permitted sender) client-ip=209.85.217.182; Received: by mail-lb0-f182.google.com with SMTP id f15so9312460lbj.13 for ; Mon, 01 Dec 2014 03:41:57 -0800 (PST) X-Received: by 10.152.43.12 with SMTP id s12mr3565320lal.67.1417434117609; Mon, 01 Dec 2014 03:41:57 -0800 (PST) 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.112.184.201 with SMTP id ew9csp268986lbc; Mon, 1 Dec 2014 03:41:56 -0800 (PST) X-Received: by 10.70.134.10 with SMTP id pg10mr99159093pdb.47.1417434115648; Mon, 01 Dec 2014 03:41:55 -0800 (PST) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id wp3si5695725pab.1.2014.12.01.03.41.55 for ; Mon, 01 Dec 2014 03:41:55 -0800 (PST) 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 S1753250AbaLALly (ORCPT + 4 others); Mon, 1 Dec 2014 06:41:54 -0500 Received: from mail-pd0-f182.google.com ([209.85.192.182]:62730 "EHLO mail-pd0-f182.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753197AbaLALlx (ORCPT ); Mon, 1 Dec 2014 06:41:53 -0500 Received: by mail-pd0-f182.google.com with SMTP id r10so10798776pdi.27 for ; Mon, 01 Dec 2014 03:41:52 -0800 (PST) X-Received: by 10.70.64.134 with SMTP id o6mr98122448pds.153.1417434112781; Mon, 01 Dec 2014 03:41:52 -0800 (PST) Received: from localhost ([122.166.92.172]) by mx.google.com with ESMTPSA id dj1sm17315052pbb.48.2014.12.01.03.41.51 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Mon, 01 Dec 2014 03:41:52 -0800 (PST) From: Viresh Kumar To: Rafael Wysocki , Arnd Bergmann , Rob Herring , Grant Likely Cc: linaro-kernel@lists.linaro.org, linux-pm@vger.kernel.org, Nishanth Menon , Sudeep Holla , Stephen Boyd , devicetree@vger.kernel.org, santosh shilimkar , Lorenzo Pieralisi , Mike Turquette , kesavan.abhilash@gmail.com, catalin.marinas@arm.com, k.chander@samsung.com, olof@lixom.net, ta.omasab@gmail.com, linux-arm-kernel@lists.infradead.org, Viresh Kumar Subject: [RFC V1 1/8] cpufreq: Reuse "compatible" binding to probe cpufreq drivers Date: Mon, 1 Dec 2014 17:11:22 +0530 Message-Id: <3f559b4093fed13f96da928882839f6f1353d07f.1417433163.git.viresh.kumar@linaro.org> X-Mailer: git-send-email 2.0.3.693.g996b0fd In-Reply-To: References: In-Reply-To: References: 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.217.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: , DT based cpufreq drivers doesn't require much support from platform code now a days as most of the stuff is moved behind generic APIs. Like clk APIs for changing clock rates, regulator APIs for changing voltages, etc. One of the bottleneck still left was how to select which cpufreq driver to probe for a given platform as there might be multiple drivers available. Traditionally, we used to create platform devices from machine specific code which binds with a cpufreq driver. And while we moved towards DT based device creation, these devices stayed as is. The problem is getting worse now as we have architectures now with Zero platform specific code. Forcefully these platforms have to create a new file in drivers/cpufreq/ to just add these platform devices in order to use the generic drivers like cpufreq-dt.c. This has been discussed again and again, but with no solution yet. Last it was discussed here: http://lists.infradead.org/pipermail/linux-arm-kernel/2014-May/256154.html This patch is an attempt towards getting the bindings. We only need to have cpufreq drivers name string present in "compatible" property for the root node.. If a cpufreq driver with DT support exists with that name, then cpufreq core will create a platform device for that. Signed-off-by: Viresh Kumar --- .../devicetree/bindings/cpufreq/drivers.txt | 46 ++++++++++++++++++++++ 1 file changed, 46 insertions(+) create mode 100644 Documentation/devicetree/bindings/cpufreq/drivers.txt diff --git a/Documentation/devicetree/bindings/cpufreq/drivers.txt b/Documentation/devicetree/bindings/cpufreq/drivers.txt new file mode 100644 index 0000000..6a33150 --- /dev/null +++ b/Documentation/devicetree/bindings/cpufreq/drivers.txt @@ -0,0 +1,46 @@ +Binding to select which cpufreq driver to register +-------------------------------------------------- + +This presents generic DT binding for selecting which cpufreq-driver to probe for +platforms. + +The property listed below must be defined in root nodes compatible list. We +don't support multiple CPUFreq driver currently for different cluster and so +this information isn't required to be present in cpu nodes. + +Required properties: +- None + +Optional properties: +- compatible: CPUFreq driver to probe. For example: "arm-bL-cpufreq-dt", + "cpufreq-dt", etc. A platform device will be created with this name by cpufreq + core. + +Examples: + +/ { + compatible = "samsung,exynos5250", "cpufreq-dt"; + + cpus { + #address-cells = <1>; + #size-cells = <0>; + + cpu@0 { + compatible = "arm,cortex-a9"; + reg = <0>; + next-level-cache = <&L2>; + operating-points = < + /* kHz uV */ + 792000 1100000 + 396000 950000 + 198000 850000 + >; + }; + + ... + + }; + + ... + +}