From patchwork Thu Jun 11 07:53:08 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hongtao Jia X-Patchwork-Id: 482987 X-Patchwork-Delegate: scottwood@freescale.com Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id B172C14012C for ; Thu, 11 Jun 2015 17:58:26 +1000 (AEST) Received: from ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) by lists.ozlabs.org (Postfix) with ESMTP id 96C641A0CFF for ; Thu, 11 Jun 2015 17:58:26 +1000 (AEST) X-Original-To: linuxppc-dev@lists.ozlabs.org Delivered-To: linuxppc-dev@lists.ozlabs.org Received: from na01-by2-obe.outbound.protection.outlook.com (mail-by2on0129.outbound.protection.outlook.com [207.46.100.129]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 49F621A09BF for ; Thu, 11 Jun 2015 17:57:29 +1000 (AEST) Received: from BLUPR0301CA0018.namprd03.prod.outlook.com (10.162.113.156) by BL2PR03MB145.namprd03.prod.outlook.com (10.255.230.13) with Microsoft SMTP Server (TLS) id 15.1.184.17; Thu, 11 Jun 2015 07:57:22 +0000 Received: from BY2FFO11FD024.protection.gbl (2a01:111:f400:7c0c::109) by BLUPR0301CA0018.outlook.office365.com (2a01:111:e400:5259::28) with Microsoft SMTP Server (TLS) id 15.1.190.14 via Frontend Transport; Thu, 11 Jun 2015 07:57:22 +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 BY2FFO11FD024.mail.protection.outlook.com (10.1.15.213) with Microsoft SMTP Server (TLS) id 15.1.190.9 via Frontend Transport; Thu, 11 Jun 2015 07:57:20 +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 t5B7vH4T006524; Thu, 11 Jun 2015 00:57:17 -0700 From: Jia Hongtao To: Subject: [PATCH V3] QorIQ/TMU: add TMU node to device tree for QorIQ T1040 Date: Thu, 11 Jun 2015 15:53:08 +0800 Message-ID: <1434009188-25644-1-git-send-email-hongtao.jia@freescale.com> X-Mailer: git-send-email 2.1.0.27.g96db324 X-EOPAttributedMessage: 0 X-Microsoft-Exchange-Diagnostics: 1; BY2FFO11FD024; 1:jh/uHd8dbW8I5A7CLdQV+uBNqruU4FlCDmZ8CLkt17NQrt5bpFLIs4+gSSG5AKwhQ8uK+9a4HtcZ9VEW//P28n8uF2Ki5dbWm48FA/QHBaHDK+jNKQTkUsy1FJY/TstS7PD7voWqAkdaHMRq7pZ+cI2xzBNK7PNipPsAgiSwHp4PG2l+NhiQK3W/jp6Hv5M3h9DynaMVIenB+gLXo2Fp4of8GZOtt+buIahJ+xmT93FFc6f8y5MoahpvhOCkGhzM00Z3pbme34pxENKeFjccGS66MoCMLxnwFexTsupWpcSOhpwPll4Th1AQOWdKjNUT8twPkHb0LoQ2wFo/sxFJbIMtwP15a6uO66jsxZfzSgI= X-Forefront-Antispam-Report: CIP:192.88.168.50; CTRY:US; IPV:NLI; EFV:NLI; SFV:NSPM; SFS:(10019020)(6009001)(339900001)(189002)(199003)(105606002)(87936001)(19580395003)(50466002)(47776003)(229853001)(107886002)(110136002)(5001960100002)(189998001)(2351001)(575784001)(48376002)(104016003)(36756003)(85426001)(33646002)(86362001)(19580405001)(50986999)(106466001)(6806004)(2371004)(77096005)(46102003)(62966003)(92566002)(50226001)(77156002)(4001450100001)(4001430100001); DIR:OUT; SFP:1102; SCL:1; SRVR:BL2PR03MB145; H:tx30smr01.am.freescale.net; FPR:; SPF:Fail; MLV:sfv; MX:1; A:1; LANG:en; MIME-Version: 1.0 X-Microsoft-Exchange-Diagnostics: 1; BL2PR03MB145; 2:BMFb20gzy2P07BcFmtltwOxgpOUMM8bJHvSgj90FN40zX6wgOSuMa7yJN6RLDrqc; 2:/uTtFUoE7YkAsyvb6KtgTg54FxPBfC3midOKryF1Hxkbah79omUJQ2QnawPxwqtK970WpvSGzk/jq0+HzXXqY5k6y4rIKSajbhIcJsOEFlOtnPN7AbZiKJKKnAEMPzdjR7tkWbMzkiFwNFnXHF0g33XbHJmH2j9Svw3J/dyh0Kw3KpUo84rzclkkuxQO0cnPuXRDcQ8lVUDyFzJaEF7bx7E65OTddqwUQ4AvNEGjRS4=; 6:oup6xXI9kOVQLCo02M5pZB9VEZt9xj64JXvv/INePVTkBl8rZjLx45P6PvdWwzspMTgw7K3ubt6EonRPzQKxpo/pQbI+uwPNRZSEvKcGZlUMKhLNfDHXkvBQL7isDzfcsQCNTBTV5wcqRBBpVIrhC6cxux1wjqBQoMh3w26qTx24X2mhPzKI7w0Nl2LeVy3vAvbD1tpeEH61IMAc8U9TyPUkLeMzVpYcte+mqt0gpw6SCdR8F05ui6Deq0kwReNvYfzVxWzMixquP6702MNVNBjsm5icqd8ErbadnWyGQgkiFQeMmdjd7ITkIAcugfKW5prmy3cc+C0ppgTZhN/roA==; 3:R7Gq8pk1370u/zRDIKwHanDVCe4EAAqfWTJt2WB5IRL9pr9vxvSy2yBvNG0YfHCEOOHo8vrBpaFdISp4CVVTndwBCj/4naNW5cb/lS4qdqB8vIhglvolvHwjOk9HURv/8EqG4FvNKoTe1DRK5ml1qzGFs3GvlfyD9V6l//3fGky66Iex6qFxphZdjHNJ4cCXRu8tBtpo92ACi1CKijMA8J07bmesbZORYkSJIBdfo68zHOU+iovQA8ALDGKEmDD2xBgRNl9PtlQ/Nmn01xpYTOgou9tWaWKhkRwCwEq1ZMPUThW6GDKyHybnPbWpoEAH X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:;SRVR:BL2PR03MB145; X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(601004)(5005006)(520003)(3002001); SRVR:BL2PR03MB145; BCL:0; PCL:0; RULEID:; SRVR:BL2PR03MB145; X-Forefront-PRVS: 0604AFA86B X-Microsoft-Exchange-Diagnostics: 1; BL2PR03MB145; 9:kEJzz/N3oEfUPgkEDdJarizgc6Zuh0AGk7Id4sFiPGCu7eM8wzznAblMkk0phQZaAFuaZFwPDPwNuh3maGxl8kiMy9EmJqXi5ZZX8RnPY361jFdv7G2RqQRS/KS5dix05X1sTiShOIsoB89hQitVxIcQ4AutlZA/DkAnR+Y5PPCO0St4Gy3W8ny5jFH1izF4sKRiJ5R/IqXpw00oTgom+P15Sf0KVg7EFxNFM59FGV44+OPALG0F0W1PMwcz3ZDnPR1D1onnAlz52z5LYUQSljh3b8SH8qiOTH2pPAWfY/gMzSSfUMjsTpbYF7g0GLnzh8U4Z5lSoawqp5ZSObpTFb4MVLXNjspDXH6v2r8JLR8zYZw/IeaPVjEc3hG7+OKA8wDij5gtiEK9ocYWYo7YjnmRg5JqlyrQyQ2YlKqxmzfmAu+mSSrQfJecjPeXhWErOVzeGNBxnRiIp4bwVUxQ0D76YFHbn4cXIEIHgyjIaE9xA+M3MTsX20vpjkhfXSzPf86WB+NV7jcFvTOBb9eenQtmGFDrAxDrdcfRUDZ/gPjTAbhY4X94OjpslrXdb6t9ACwU0RErIFPwM9gYz5P9XEweWeo7f3UzMCdw/iOIRJzp0H5F26uht4GA5PRYFz7nJLPosuCmIFMTPT9nlpAXnk0qNXBcj5AlP1bhnDTWRw6YT/UfXO3PTC5koF9QU7jueB7aMuZRxVxk/DBMfjQsIBBlmOmrnaBKOnkzWtulnPIccs/BUJ+uHRWhnfpXRhlCs5wHx4sgwEM+TabEq2XpZOVyjQuWlpHg1BsH2cdRtcHnM2M2MYoMsyZC8p86N8KEPkKTGL60hMEodfoSirdHFTyUyY5yn68Ef6cYXHVSilpP7b3cmheGSRjMCTFMC4g/UBJSKbGxhvgNHO2TgzRlNCMm0/6aJIqAa/5lS8jR0Os= X-Microsoft-Exchange-Diagnostics: 1; BL2PR03MB145; 3:vIjLg1uIBGSN6jonERs9QmmPw6h8zPIseNyCPHZZ/0V44MA9SetILnWCUM71q0zFIqBwQ1VvPo4MMnr26kqRfet0YowzV1cAWAVzNiLNdrTUkb2i3N9UIPBO946AOaRNquljBay7qiRK2TYq5kOj3A==; 10:UA2Yl/LvPoJ9Uw3YoMfBjj3WncGy1frvQutB6rH7bbyPwEaeO3/w3pPaxl6kjaWq8s/FV7CItmSlvs/vE0clwGaQrIX3H7lxvUwvkZzyqxc=; 6:EgfAt7OHDLhwxgwfDOD9sg0KetwrBnCwlLzvt+m4KHU/0U7WjrgguvtPNgMKv4hf X-OriginatorOrg: freescale.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 11 Jun 2015 07:57:20.9892 (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: BL2PR03MB145 X-BeenThere: linuxppc-dev@lists.ozlabs.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: edubezval@gmail.com, devicetree@vger.kernel.org, hongtao.jia@freescale.com, robh+dt@kernel.org, linuxppc-dev@lists.ozlabs.org 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 of V3: * Put TMU node directly into t1040si-post.dtsi file. * Add "fsl,tmu-range" property. * Change "calibration" property to "fsl,tmu-calibration". * Update the calibration data. Changes of V2: * Provide more details on compatible and calibration properties. .../devicetree/bindings/thermal/qoriq-thermal.txt | 63 ++++++++++++++++++++++ arch/powerpc/boot/dts/fsl/t1040si-post.dtsi | 42 +++++++++++++++ 2 files changed, 105 insertions(+) create mode 100644 Documentation/devicetree/bindings/thermal/qoriq-thermal.txt diff --git a/Documentation/devicetree/bindings/thermal/qoriq-thermal.txt b/Documentation/devicetree/bindings/thermal/qoriq-thermal.txt new file mode 100644 index 0000000..2bc9cb3 --- /dev/null +++ b/Documentation/devicetree/bindings/thermal/qoriq-thermal.txt @@ -0,0 +1,63 @@ +* 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. +- fsl,tmu-range : Temperature range for TMU. Including the starting + temperature and number of calibration points for each range. +- fsl,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 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>; + fsl,tmu-range = <0x000a0000 0x00090026 0x0008004a 0x0001006a>; + fsl,tmu-calibration = <0x00000000 0x00000025 + 0x00000001 0x00000028 + 0x00000002 0x0000002d + 0x00000003 0x00000031 + 0x00000004 0x00000036 + 0x00000005 0x0000003a + 0x00000006 0x00000040 + 0x00000007 0x00000044 + 0x00000008 0x0000004a + 0x00000009 0x0000004f + 0x0000000a 0x00000054 + + 0x00010000 0x0000000d + 0x00010001 0x00000013 + 0x00010002 0x00000019 + 0x00010003 0x0000001f + 0x00010004 0x00000025 + 0x00010005 0x0000002d + 0x00010006 0x00000033 + 0x00010007 0x00000043 + 0x00010008 0x0000004b + 0x00010009 0x00000053 + + 0x00020000 0x00000010 + 0x00020001 0x00000017 + 0x00020002 0x0000001f + 0x00020003 0x00000029 + 0x00020004 0x00000031 + 0x00020005 0x0000003c + 0x00020006 0x00000042 + 0x00020007 0x0000004d + 0x00020008 0x00000056 + + 0x00030000 0x00000012 + 0x00030001 0x0000001d>; +}; diff --git a/arch/powerpc/boot/dts/fsl/t1040si-post.dtsi b/arch/powerpc/boot/dts/fsl/t1040si-post.dtsi index 5cc01be..6d9ca4d 100644 --- a/arch/powerpc/boot/dts/fsl/t1040si-post.dtsi +++ b/arch/powerpc/boot/dts/fsl/t1040si-post.dtsi @@ -407,6 +407,48 @@ reg = <0xea000 0x4000>; }; + tmu@f0000 { + compatible = "fsl,qoriq-tmu"; + reg = <0xf0000 0x1000>; + interrupts = <18 2 0 0>; + fsl,tmu-range = <0x000a0000 0x00090026 0x0008004a 0x0001006a>; + fsl,tmu-calibration = <0x00000000 0x00000025 + 0x00000001 0x00000028 + 0x00000002 0x0000002d + 0x00000003 0x00000031 + 0x00000004 0x00000036 + 0x00000005 0x0000003a + 0x00000006 0x00000040 + 0x00000007 0x00000044 + 0x00000008 0x0000004a + 0x00000009 0x0000004f + 0x0000000a 0x00000054 + + 0x00010000 0x0000000d + 0x00010001 0x00000013 + 0x00010002 0x00000019 + 0x00010003 0x0000001f + 0x00010004 0x00000025 + 0x00010005 0x0000002d + 0x00010006 0x00000033 + 0x00010007 0x00000043 + 0x00010008 0x0000004b + 0x00010009 0x00000053 + + 0x00020000 0x00000010 + 0x00020001 0x00000017 + 0x00020002 0x0000001f + 0x00020003 0x00000029 + 0x00020004 0x00000031 + 0x00020005 0x0000003c + 0x00020006 0x00000042 + 0x00020007 0x0000004d + 0x00020008 0x00000056 + + 0x00030000 0x00000012 + 0x00030001 0x0000001d>; + }; + /include/ "elo3-dma-0.dtsi" /include/ "elo3-dma-1.dtsi" /include/ "qoriq-espi-0.dtsi"