From patchwork Fri Mar 14 19:25:35 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dave Gerlach X-Patchwork-Id: 3834811 Return-Path: X-Original-To: patchwork-linux-pm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 2CB26BF540 for ; Fri, 14 Mar 2014 19:26:56 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 2787E2034C for ; Fri, 14 Mar 2014 19:26:55 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 487C920351 for ; Fri, 14 Mar 2014 19:26:53 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755962AbaCNT0t (ORCPT ); Fri, 14 Mar 2014 15:26:49 -0400 Received: from comal.ext.ti.com ([198.47.26.152]:40406 "EHLO comal.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755998AbaCNT0q (ORCPT ); Fri, 14 Mar 2014 15:26:46 -0400 Received: from dlelxv90.itg.ti.com ([172.17.2.17]) by comal.ext.ti.com (8.13.7/8.13.7) with ESMTP id s2EJPuhs003675; Fri, 14 Mar 2014 14:25:56 -0500 Received: from DFLE72.ent.ti.com (dfle72.ent.ti.com [128.247.5.109]) by dlelxv90.itg.ti.com (8.14.3/8.13.8) with ESMTP id s2EJPuia023129; Fri, 14 Mar 2014 14:25:56 -0500 Received: from dlep32.itg.ti.com (157.170.170.100) by DFLE72.ent.ti.com (128.247.5.109) with Microsoft SMTP Server id 14.3.174.1; Fri, 14 Mar 2014 14:25:56 -0500 Received: from legion.dal.design.ti.com (legion.dal.design.ti.com [128.247.22.53]) by dlep32.itg.ti.com (8.14.3/8.13.8) with ESMTP id s2EJPu0Y010187; Fri, 14 Mar 2014 14:25:56 -0500 Received: from localhost (lta0274052.am.dhcp.ti.com [128.247.71.78]) by legion.dal.design.ti.com (8.11.7p1+Sun/8.11.7) with ESMTP id s2EJPtt19008; Fri, 14 Mar 2014 14:25:55 -0500 (CDT) From: Dave Gerlach To: , , CC: , , , "Rafael J. Wysocki" , Jisheng Zhang , Anson Huang , Shawn Guo , Viresh Kumar , Nishanth Menon , Dave Gerlach Subject: [RFC 9/9] ARM: dts: imx6q: Add opp-modifier device entry Date: Fri, 14 Mar 2014 14:25:35 -0500 Message-ID: <1394825135-60110-10-git-send-email-d-gerlach@ti.com> X-Mailer: git-send-email 1.9.0 In-Reply-To: <1394825135-60110-1-git-send-email-d-gerlach@ti.com> References: <1394825135-60110-1-git-send-email-d-gerlach@ti.com> MIME-Version: 1.0 Sender: linux-pm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, 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 Add an entry for opp_modifier which configures OPPs on imx6q. Within this nodes are defined with opp-modifier propety that are defined as a list of frequency, offset from base register, and efuse value. This is an untested example patch to show how opp-modifier could be used for this platform. Signed-off-by: Dave Gerlach --- arch/arm/boot/dts/imx6q.dtsi | 18 ++++++++++++++++++ include/dt-bindings/opp/imx.h | 17 +++++++++++++++++ 2 files changed, 35 insertions(+) create mode 100644 include/dt-bindings/opp/imx.h diff --git a/arch/arm/boot/dts/imx6q.dtsi b/arch/arm/boot/dts/imx6q.dtsi index f024ef2..4cc48ef 100644 --- a/arch/arm/boot/dts/imx6q.dtsi +++ b/arch/arm/boot/dts/imx6q.dtsi @@ -10,6 +10,7 @@ #include "imx6q-pinfunc.h" #include "imx6qdl.dtsi" +#include / { cpus { @@ -36,6 +37,8 @@ arm-supply = <®_arm>; pu-supply = <®_pu>; soc-supply = <®_soc>; + + platform-opp-modifier = <&mpu_opp_modifier>; }; cpu@1 { @@ -140,6 +143,21 @@ clock-names = "bus", "di0", "di1"; resets = <&src 4>; }; + + opp_modifier: opp_modifier@0x021bc440 { + compatible = "opp-modifier-reg-val"; + reg = <0x021bc440 0x04>; + opp,reg-mask = <0x00030000>; + + mpu_opp_modifier: mpu_opp_modifier { + opp-modifier = < + /* kHz offset value */ + 1200000 0 OPP_OCOTP_CFG3_SPEED_1P2GHZ + 996000 0 OPP_OCOTP_CFG3_SPEED_996MHZ + >; + }; + }; + }; }; diff --git a/include/dt-bindings/opp/imx.h b/include/dt-bindings/opp/imx.h new file mode 100644 index 0000000..2700ab9 --- /dev/null +++ b/include/dt-bindings/opp/imx.h @@ -0,0 +1,17 @@ +/* + * This header provides constants for iMX SoC OPP bindings. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + * + */ + +#ifndef __DT_BINDINGS_OPP_IMX_H__ +#define __DT_BINDINGS_OPP_IMX_H__ + +#define OPP_OCOTP_CFG3_SPEED_1P2GHZ (0x3 << 16) +#define OPP_OCOTP_CFG3_SPEED_996MHZ (0x2 << 16) +#define OPP_OCOTP_CFG3_SPEED_852MHZ (0x1 << 16) + +#endif /* __DT_BINDINGS_OPP_IMX_H__ */