From patchwork Tue Jul 21 11:33:40 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lee Jones X-Patchwork-Id: 6834861 Return-Path: X-Original-To: patchwork-linux-pm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 2982B9F380 for ; Tue, 21 Jul 2015 11:33:54 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 2DB7A20499 for ; Tue, 21 Jul 2015 11:33:53 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 26FBA204A2 for ; Tue, 21 Jul 2015 11:33:52 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751322AbbGULdr (ORCPT ); Tue, 21 Jul 2015 07:33:47 -0400 Received: from mail-wi0-f171.google.com ([209.85.212.171]:34332 "EHLO mail-wi0-f171.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750973AbbGULdq (ORCPT ); Tue, 21 Jul 2015 07:33:46 -0400 Received: by wibud3 with SMTP id ud3so111515376wib.1 for ; Tue, 21 Jul 2015 04:33:45 -0700 (PDT) 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; bh=Kbkrtt1+qbcIUFfGskK1WqP9ZN5CuWFNX1qtyc2e61I=; b=g8pQVeUmLwR/Yh9gnSIiPRVaB0KgSS6slGk/RfK6ijBPTrziUFJgy7Ey63IRPABZy2 kiT/ljEIDVYXHwtPq94mYsQG7EAJJ017Tp6N/eDOUdnOGbV20/VwcNkhD+3Si3i2sn+9 IyLLWQsPEe2r83oXmbKE3rYcNwwezb8o61RkdEvUZVicPxAIV+YcVusI7aGbQHO6MEaZ lQXMSRWL1azswsibcbSqC1/va//YBDP01Dh6sbGq1OndrbXvun4Mk8Z/KV/8t00r1ebM w+difiTWyi4MNuCZlugCBu64pXGBoxYFAmReQbGNV/buFhE1Gnu0kCt0EMlgs+N4VJIo fBhw== X-Gm-Message-State: ALoCoQm+5YIBjqXfKmxNAj9BP+7lBJVnWHac6LzG1IUJ08HRCEi7NlH5Yh1cm5XxyQ1epCANobym X-Received: by 10.194.100.42 with SMTP id ev10mr62701167wjb.50.1437478425145; Tue, 21 Jul 2015 04:33:45 -0700 (PDT) Received: from localhost.localdomain (host81-129-173-55.range81-129.btcentralplus.com. [81.129.173.55]) by smtp.gmail.com with ESMTPSA id h9sm36589788wjx.20.2015.07.21.04.33.43 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 21 Jul 2015 04:33:43 -0700 (PDT) From: Lee Jones To: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, rjw@rjwysocki.net, viresh.kumar@linaro.org, linux-pm@vger.kernel.org, devicetree@vger.kernel.org, ajitpal.singh@st.com Cc: kernel@stlinux.com, Lee Jones Subject: [PATCH v3 1/1] dt: cpufreq: st: Provide bindings for ST's CPUFreq implementation Date: Tue, 21 Jul 2015 12:33:40 +0100 Message-Id: <1437478420-26419-1-git-send-email-lee.jones@linaro.org> X-Mailer: git-send-email 1.9.1 Sender: linux-pm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org X-Spam-Status: No, score=-8.1 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, 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 Cc: devicetree@vger.kernel.org Signed-off-by: Lee Jones --- Only submitting the binding document as requested by Viresh. v2 => v3: - Using OPP v2 - Moved OPPs out of the CPU node into their own one - Using generic 'opp-hz' property .../devicetree/bindings/cpufreq/cpufreq-st.txt | 77 ++++++++++++++++++++++ 1 file changed, 77 insertions(+) create mode 100644 Documentation/devicetree/bindings/cpufreq/cpufreq-st.txt diff --git a/Documentation/devicetree/bindings/cpufreq/cpufreq-st.txt b/Documentation/devicetree/bindings/cpufreq/cpufreq-st.txt new file mode 100644 index 0000000..a478eec --- /dev/null +++ b/Documentation/devicetree/bindings/cpufreq/cpufreq-st.txt @@ -0,0 +1,77 @@ +Binding for ST's CPUFreq driver +=============================== + +Required properties [for working voltage scaling]: +------------------------------------------------- + +Located in CPU's node: + +- st,syscfg : Phandle to Major number register + First cell: offset to major number +- st,syscfg-eng : Phandle to Minor number and Pcode registers + First cell: offset to process code + Second cell: offset to minor number + +Located in 'cpu0-opp-list' node [to be provided ONLY by the bootloader]: + + - opp{1..N} : Each 'oppX' subnode will contain the following properties: + - opp-hz : CPU frequency [Hz] for this OPP + - st,avs : List of available voltages [uV] indexed by process code + - st,cuts : Cut version this OPP is suitable for [0xFF means ALL] + - st,substrate : Substrate version this OPP is suitable for [0xFF means ALL] + +WARNING: The cpu0-opp-list will be provided by the bootloader. Do not attempt to + artificially synthesise the cpu0-opp-list node or any of its descendants. + They are very platform specific and may damage the hardware if created + incorrectly. + +Required properties [if voltage scaling properties are missing]: +------------------------------------------------------------------- + +Located in CPU's node: + +- operating-points : [See: ../power/opp.txt] + +Example [safe]: +-------------- + +cpus { + cpu@0 { + /* kHz uV */ + operating-points = <1500000 0 + 1200000 0 + 800000 0 + 500000 0>; + }; +}; + +Example [unsafe]: +---------------- + +cpus { + cpu@0 { + st,syscfg = <&syscfg [major_offset]>; + st,syscfg-eng = <&syscfg_eng [pcode_offset] [minor_offset]>; + operating-points-v2 = <&cpu0_opp_list>; + }; +}; + +/* ############################################################ */ +/* # WARNING: Do not attempt to copy/replicate this node, # */ +/* # it is only to be supplied by the bootloader !!! # */ +/* ############################################################ */ +cpu0-opp-list { + compatible = "operating-points-v2-sti"; + opp0 { + opp-hz = <1200000000>; + st,avs = <1110 1150 1100 1080 1040 1020 980 930>; + st,substrate = <0xff>; + st,cuts = <0xff>; + }; + opp1 { + opp-hz = <1500000000>; + st,avs = <1200 1200 1200 1200 1170 1140 1100 1070>; + st,substrate = <0xff>; + st,cuts = <0x2>; + }; +};