From patchwork Wed Apr 15 08:17:48 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hongtao Jia X-Patchwork-Id: 461412 Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from lists.ozlabs.org (lists.ozlabs.org [103.22.144.68]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id E44EE1401AB for ; Wed, 15 Apr 2015 18:40:20 +1000 (AEST) Received: from ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) by lists.ozlabs.org (Postfix) with ESMTP id CAD0B1A0FE4 for ; Wed, 15 Apr 2015 18:40:20 +1000 (AEST) X-Original-To: linuxppc-dev@lists.ozlabs.org Delivered-To: linuxppc-dev@lists.ozlabs.org X-Greylist: delayed 954 seconds by postgrey-1.35 at bilbo; Wed, 15 Apr 2015 18:37:08 AEST Received: from na01-bn1-obe.outbound.protection.outlook.com (mail-bn1bon0119.outbound.protection.outlook.com [157.56.111.119]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id AE37D1A1885 for ; Wed, 15 Apr 2015 18:37:08 +1000 (AEST) Received: from BN3PR0301CA0074.namprd03.prod.outlook.com (0.160.152.170) by BLUPR03MB1473.namprd03.prod.outlook.com (0.163.81.158) with Microsoft SMTP Server (TLS) id 15.1.136.25; Wed, 15 Apr 2015 08:21:05 +0000 Received: from BN1AFFO11FD026.protection.gbl (2a01:111:f400:7c10::146) by BN3PR0301CA0074.outlook.office365.com (2a01:111:e400:401e::42) with Microsoft SMTP Server (TLS) id 15.1.136.25 via Frontend Transport; Wed, 15 Apr 2015 08:21:05 +0000 Authentication-Results: spf=fail (sender IP is 192.88.168.50) smtp.mailfrom=freescale.com; freescale.mail.onmicrosoft.com; dkim=none (message not signed) header.d=none; Received-SPF: Fail (protection.outlook.com: domain of freescale.com does not designate 192.88.168.50 as permitted sender) receiver=protection.outlook.com; client-ip=192.88.168.50; helo=tx30smr01.am.freescale.net; Received: from tx30smr01.am.freescale.net (192.88.168.50) by BN1AFFO11FD026.mail.protection.outlook.com (10.58.52.86) with Microsoft SMTP Server (TLS) id 15.1.142.12 via Frontend Transport; Wed, 15 Apr 2015 08:21:05 +0000 Received: from titan.ap.freescale.net ([10.192.208.233]) by tx30smr01.am.freescale.net (8.14.3/8.14.0) with ESMTP id t3F8L1JU026617; Wed, 15 Apr 2015 01:21:02 -0700 From: Jia Hongtao To: Subject: [PATCH V2] QorIQ/TMU: add TMU node to device tree for QorIQ T104x Date: Wed, 15 Apr 2015 16:17:48 +0800 Message-ID: <1429085868-47577-1-git-send-email-hongtao.jia@freescale.com> X-Mailer: git-send-email 2.1.0.27.g96db324 X-EOPAttributedMessage: 0 X-Forefront-Antispam-Report: CIP:192.88.168.50; CTRY:US; IPV:NLI; EFV:NLI; BMV:1; SFV:NSPM; SFS:(10019020)(6009001)(339900001)(199003)(189002)(6806004)(50466002)(87936001)(48376002)(19580395003)(19580405001)(85426001)(86362001)(575784001)(46102003)(77096005)(62966003)(77156002)(105606002)(106466001)(2351001)(33646002)(110136001)(229853001)(104016003)(92566002)(2371004)(50986999)(47776003)(36756003)(50226001)(4001430100001)(4001450100001); DIR:OUT; SFP:1102; SCL:1; SRVR:BLUPR03MB1473; H:tx30smr01.am.freescale.net; FPR:; SPF:Fail; MLV:sfv; A:1; MX:1; LANG:en; MIME-Version: 1.0 X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:;SRVR:BLUPR03MB1473; X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(601004)(5005006)(5002010); SRVR:BLUPR03MB1473; BCL:0; PCL:0; RULEID:; SRVR:BLUPR03MB1473; X-Forefront-PRVS: 0547116B72 X-OriginatorOrg: freescale.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 15 Apr 2015 08:21:05.5099 (UTC) X-MS-Exchange-CrossTenant-Id: 710a03f5-10f6-4d38-9ff4-a80b81da590d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=710a03f5-10f6-4d38-9ff4-a80b81da590d; Ip=[192.88.168.50]; Helo=[tx30smr01.am.freescale.net] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: BLUPR03MB1473 Cc: hongtao.jia@freescale.com, devicetree@vger.kernel.org, rui.zhang@intel.com, robh+dt@kernel.org, linuxppc-dev@lists.ozlabs.org X-BeenThere: linuxppc-dev@lists.ozlabs.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: linuxppc-dev-bounces+patchwork-incoming=ozlabs.org@lists.ozlabs.org Sender: "Linuxppc-dev" This is Thermal Monitoring Unit for QorIQ platform. Signed-off-by: Jia Hongtao --- Changes from V1: * Provide more details on compatible and calibration properties. .../devicetree/bindings/thermal/qoriq-thermal.txt | 68 ++++++++++++++++++ arch/powerpc/boot/dts/fsl/qoriq-tmu-t104xsi.dtsi | 82 ++++++++++++++++++++++ arch/powerpc/boot/dts/fsl/t1040si-post.dtsi | 1 + 3 files changed, 151 insertions(+) create mode 100644 Documentation/devicetree/bindings/thermal/qoriq-thermal.txt create mode 100644 arch/powerpc/boot/dts/fsl/qoriq-tmu-t104xsi.dtsi diff --git a/Documentation/devicetree/bindings/thermal/qoriq-thermal.txt b/Documentation/devicetree/bindings/thermal/qoriq-thermal.txt new file mode 100644 index 0000000..48e7fff --- /dev/null +++ b/Documentation/devicetree/bindings/thermal/qoriq-thermal.txt @@ -0,0 +1,68 @@ +* Thermal Monitoring Unit (TMU) on Freescale QorIQ SoCs + +Required properties: +- compatible : Must include "fsl,qoriq-tmu". The version of the device is + determined by the TMU IP Block Revision Register (IPBRR0) at + offset 0x0BF8. + Table of correspondences between IPBRR0 values and example chips: + Value Device + ---------- ----- + 0x01900102 T1040 +- reg : Address range of TMU registers. +- interrupts : Contains the interrupt for TMU. +- calibration : Calibration table for TMU. This is required to determine + what a specific sensor reading translates to in degrees Celsius. + There are four calibration config ranges, for each range we need + a couple of calibration data formatted like . + Freescale provides the data required. + +Example: + +tmu@f0000 { + compatible = "fsl,qoriq-tmu"; + reg = <0xf0000 0x1000>; + interrupts = <18 2 0 0>; + calibration = <0x00000000 0x0000000f + 0x00000001 0x00000017 + 0x00000002 0x0000001e + 0x00000003 0x00000026 + 0x00000004 0x0000002e + 0x00000005 0x00000035 + 0x00000006 0x0000003d + 0x00000007 0x00000044 + 0x00000008 0x0000004c + 0x00000009 0x00000053 + 0x0000000a 0x0000005b + 0x0000000b 0x00000062 + + 0x00010000 0x00000011 + 0x00010001 0x00000019 + 0x00010002 0x00000021 + 0x00010003 0x0000002a + 0x00010004 0x00000032 + 0x00010005 0x0000003a + 0x00010006 0x00000042 + 0x00010007 0x0000004b + 0x00010008 0x00000053 + 0x00010009 0x0000005b + 0x0001000a 0x00000063 + + 0x00020000 0x00000012 + 0x00020001 0x0000001b + 0x00020002 0x00000024 + 0x00020003 0x0000002c + 0x00020004 0x00000035 + 0x00020005 0x0000003d + 0x00020006 0x00000046 + 0x00020007 0x0000004e + 0x00020008 0x00000057 + + 0x00030000 0x00000009 + 0x00030001 0x00000011 + 0x00030002 0x00000019 + 0x00030003 0x00000021 + 0x00030004 0x00000029 + 0x00030005 0x00000031 + 0x00030006 0x00000039 + 0x00030007 0x00000041>; +}; diff --git a/arch/powerpc/boot/dts/fsl/qoriq-tmu-t104xsi.dtsi b/arch/powerpc/boot/dts/fsl/qoriq-tmu-t104xsi.dtsi new file mode 100644 index 0000000..d85c77d --- /dev/null +++ b/arch/powerpc/boot/dts/fsl/qoriq-tmu-t104xsi.dtsi @@ -0,0 +1,82 @@ +/* + * QorIQ TMU device tree stub [ controller @ offset 0xf0000 ] + * + * Copyright 2015 Freescale Semiconductor Inc. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * * Neither the name of Freescale Semiconductor nor the + * names of its contributors may be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * + * ALTERNATIVELY, this software may be distributed under the terms of the + * GNU General Public License ("GPL") as published by the Free Software + * Foundation, either version 2 of that License or (at your option) any + * later version. + * + * THIS SOFTWARE IS PROVIDED BY Freescale Semiconductor ``AS IS'' AND ANY + * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL Freescale Semiconductor BE LIABLE FOR ANY + * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +tmu@f0000 { + compatible = "fsl,qoriq-tmu"; + reg = <0xf0000 0x1000>; + interrupts = <18 2 0 0>; + calibration = <0x00000000 0x0000000f + 0x00000001 0x00000017 + 0x00000002 0x0000001e + 0x00000003 0x00000026 + 0x00000004 0x0000002e + 0x00000005 0x00000035 + 0x00000006 0x0000003d + 0x00000007 0x00000044 + 0x00000008 0x0000004c + 0x00000009 0x00000053 + 0x0000000a 0x0000005b + 0x0000000b 0x00000062 + + 0x00010000 0x00000011 + 0x00010001 0x00000019 + 0x00010002 0x00000021 + 0x00010003 0x0000002a + 0x00010004 0x00000032 + 0x00010005 0x0000003a + 0x00010006 0x00000042 + 0x00010007 0x0000004b + 0x00010008 0x00000053 + 0x00010009 0x0000005b + 0x0001000a 0x00000063 + + 0x00020000 0x00000012 + 0x00020001 0x0000001b + 0x00020002 0x00000024 + 0x00020003 0x0000002c + 0x00020004 0x00000035 + 0x00020005 0x0000003d + 0x00020006 0x00000046 + 0x00020007 0x0000004e + 0x00020008 0x00000057 + + 0x00030000 0x00000009 + 0x00030001 0x00000011 + 0x00030002 0x00000019 + 0x00030003 0x00000021 + 0x00030004 0x00000029 + 0x00030005 0x00000031 + 0x00030006 0x00000039 + 0x00030007 0x00000041>; +}; diff --git a/arch/powerpc/boot/dts/fsl/t1040si-post.dtsi b/arch/powerpc/boot/dts/fsl/t1040si-post.dtsi index 15ae462..bb9f792 100644 --- a/arch/powerpc/boot/dts/fsl/t1040si-post.dtsi +++ b/arch/powerpc/boot/dts/fsl/t1040si-post.dtsi @@ -345,6 +345,7 @@ reg = <0xea000 0x4000>; }; +/include/ "qoriq-tmu-t104xsi.dtsi" /include/ "elo3-dma-0.dtsi" /include/ "elo3-dma-1.dtsi" /include/ "qoriq-espi-0.dtsi"