From patchwork Fri Jan 26 08:09:39 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anson Huang X-Patchwork-Id: 10185513 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id E573960383 for ; Fri, 26 Jan 2018 12:25:22 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id DD65028859 for ; Fri, 26 Jan 2018 12:25:22 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id D1FEA29179; Fri, 26 Jan 2018 12:25:22 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.2 required=2.0 tests=BAD_ENC_HEADER,BAYES_00, DKIM_SIGNED, DKIM_VALID, RCVD_IN_DNSWL_MED autolearn=unavailable version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [65.50.211.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 6112428859 for ; Fri, 26 Jan 2018 12:25:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-ID:Date:Subject:To :From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=dcoMmiM0ql1kAfbDkNz/8c5pV4Zifh06qV0PDQfnMo0=; b=enP3QTLwDDvoba O+VIFUF6s498QjB+JtGFTUKRoNDL2dk2j6eltrfE3FLbL0oF76lcCYjwylDLogk6PS4LflhwsZ3Ff cM+w4FtnEqdHnZ2XTu8nxXIvNB9N/2rnSTP3/jEPZa1ZndWkEVw52z4uQxIANdBY5CHbGbiwn3dYj 5NBKiG3gHbOwDaGTELKwOPCVXn33mApNET1zDVJd0li1mIp+lUA1pLvuAXz5HgKajr6HbeAWynxoW aRXD/PF9gRW9hmNsNvQNgmuYXbjls5cJ144JD6OkhAxl0fqjN12tfNPtxrV5SbtgCoSpXA028U+bW ItB3g6oSsdPgwh3bgu9w==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.89 #1 (Red Hat Linux)) id 1ef34K-0004al-JH; Fri, 26 Jan 2018 12:25:20 +0000 Received: from mail-dm3nam03on0630.outbound.protection.outlook.com ([2a01:111:f400:fe49::630] helo=NAM03-DM3-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.89 #1 (Red Hat Linux)) id 1ef34H-0003YK-44 for linux-arm-kernel@lists.infradead.org; Fri, 26 Jan 2018 12:25:19 +0000 Received: from BLUPR0301CA0038.namprd03.prod.outlook.com (10.162.113.176) by BN3PR03MB1414.namprd03.prod.outlook.com (10.163.34.21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.444.14; Fri, 26 Jan 2018 12:25:01 +0000 Received: from BN1BFFO11FD006.protection.gbl (2a01:111:f400:7c10::1:149) by BLUPR0301CA0038.outlook.office365.com (2a01:111:e400:5259::48) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.444.14 via Frontend Transport; Fri, 26 Jan 2018 12:25:01 +0000 Authentication-Results: spf=fail (sender IP is 192.88.168.50) smtp.mailfrom=nxp.com; lists.infradead.org; dkim=none (message not signed) header.d=none;lists.infradead.org; dmarc=fail action=none header.from=nxp.com; Received-SPF: Fail (protection.outlook.com: domain of nxp.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 BN1BFFO11FD006.mail.protection.outlook.com (10.58.144.69) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_RSA_WITH_AES_256_CBC_SHA) id 15.20.444.13 via Frontend Transport; Fri, 26 Jan 2018 12:24:58 +0000 Received: from shlinux2.ap.freescale.net (shlinux2.ap.freescale.net [10.192.224.44]) by tx30smr01.am.freescale.net (8.14.3/8.14.0) with ESMTP id w0Q8AV9W015557; Fri, 26 Jan 2018 01:10:32 -0700 From: Anson Huang To: , , , , , , , , , , , , Subject: [PATCH V2 1/2] ARM: dts: imx7s: add temperature monitor support Date: Fri, 26 Jan 2018 16:09:39 +0800 Message-ID: <1516954180-26029-1-git-send-email-Anson.Huang@nxp.com> X-Mailer: git-send-email 1.9.1 X-EOPAttributedMessage: 0 X-Matching-Connectors: 131614431017992917; (91ab9b29-cfa4-454e-5278-08d120cd25b8); () X-Forefront-Antispam-Report: CIP:192.88.168.50; IPV:NLI; CTRY:US; EFV:NLI; SFV:NSPM; SFS:(10009020)(376002)(39380400002)(346002)(396003)(39860400002)(2980300002)(1110001)(1109001)(339900001)(189003)(199004)(356003)(97736004)(305945005)(105606002)(26005)(316002)(16586007)(51416003)(72206003)(77096007)(336011)(8936002)(8676002)(2201001)(86362001)(81156014)(85426001)(50226002)(53936002)(68736007)(5660300001)(81166006)(6636002)(48376002)(50466002)(36756003)(4326008)(47776003)(110136005)(2906002)(498600001)(106466001)(104016004)(921003)(2101003)(83996005)(1121003); DIR:OUT; SFP:1101; SCL:1; SRVR:BN3PR03MB1414; H:tx30smr01.am.freescale.net; FPR:; SPF:Fail; PTR:InfoDomainNonexistent; MX:1; A:1; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; BN1BFFO11FD006; 1:KDNHgzzKu+4Q6jL/inOQwzzgfqTzxUVzKqMp92yIbepMdxbQeMEbAB/mhDqtRJHeYNfKxlOdJ4p19Zs80T42asspUj3SUn3ujWI4e4JfBoMsILTuspuN+wc+menWDeJT MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 897248ad-efbc-451f-2175-08d564b7d299 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(7020095)(5600026)(4604075)(2017052603307); SRVR:BN3PR03MB1414; X-Microsoft-Exchange-Diagnostics: 1; BN3PR03MB1414; 3:fD3BMPp8PicP5xblL02xvjWOWjk5o2TlKxbURuKEiW7pzHNzijDdNc64mA+fLs45gAJhfh4TyS01rv8p5XkkR1tjYtpmd4XpeKR+quKoDyMfzcuhdPADNVXlZyMcCG9Y2s7iWkvZIGtwmp28GjJ9SbwlvB7btxgd1SJvHlihF1XK8DSfOjeTFh4PAFoWIV0v5hC/xoVAg1DipMHkRG/GF7TPeEM6nHrRAREkFYX4NgxLTGQJdwNT3/K3WbT6sa1OiION7WX/VsU84hbAC7f1oeeoPEzVLHcLbwtsxLOd5Cz0OZdaDZqFxZkvYNQnZVu6zBG1+Z+iXjKUWN7QyqYw1YocwfGFdxKfoJa7T4iioFk=; 25:F3BlZ4YqO5gK6zDtSP3WhqToHkLVgH1dFMeKBkO+HdYBixgf34RdPspvHT3jnnCFDRsSUotbQ4NViYUQzqIPnyAV+0ByoXsJe23FaswFsxUTWMdXI4Ts9J49c3uCjMcX0XEjP2jk2JzoXjuQ526IozVodl0BK67d0+e+t0erkCDyLKbhs54FL4D1yaPYs/XxLsOrixpZfCsapgc6TVuqLfKJD+uj2z8Q8nJXCxMs6ucaZ37D1LwOyso7BijtK07V4o4vp6yYZHkrmYFI0G2pFKKeeQ+hxuIqm4Nnox9VakdsaXYz0UU0legdP6xNmMq7N2KrO02vfBGSgibKm1mHfw== X-MS-TrafficTypeDiagnostic: BN3PR03MB1414: X-Microsoft-Exchange-Diagnostics: 1; BN3PR03MB1414; 31:Y0E4c0X1yRE31XRL9tZRqrqQpHNE7fF89ALL4c1Obw6dx0tWqh3xcEER96DoNxZgrEGOJ+63zcIhM66jBbkfYNNuMm8pU49WSNZjU6xwTzyFOve1fDF6xtXQCGzjyKMRzdrtN69Mce78fnuTVI2FLXq9+VEqO3dl62DsUQvAAiCwZ/kxzfUmkTXJVk0HoqQOpzQi1IEObNqboJnBvg3vMnzbrcxy/rr+aZeSgNcMKUg=; 4:a7IXSWABzTv9Sh8JUt/W3FiShW68cTfBsg9cR8WORTkB6W3xS72CL55MeJloXXhytcA+ZBaYDNjZZLLnAXqWNrgUj/DEGMUChk8+FEU1rk1HYRyntfqXM73jwi1SqmGwSR5L95nUnsjhZpx7NsviMpJ+6Zxe525Q+gjwusmcjCzLm1cXMPrS+tZ/V6JR9Xn16js60otu7YSMfDZqYqp2Nhkye/ZvWN8jAT9zrSe+uTabDuKGIK62spYNpIZvp+9T79Fir5e8nyvzPbs0H2QXHM/NKVo2aQgDd4hsRqowI2PFDvD91LmNGEKFntjf/Nki X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(185117386973197); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6095135)(2401047)(5005006)(8121501046)(3002001)(10201501046)(3231023)(2400081)(944501161)(93006095)(93001095)(6055026)(6096035)(20161123556025)(20161123565025)(20161123561025)(201703131430075)(201703131448075)(201703131433075)(201703151042153)(20161123559100)(20161123563025)(201708071742011); SRVR:BN3PR03MB1414; BCL:0; PCL:0; RULEID:(400006); SRVR:BN3PR03MB1414; X-Forefront-PRVS: 05641FD966 X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; BN3PR03MB1414; 23:i6f9IRXPAytRuSFn9O5MnIFMDf+lTmftQm83fVawq?= =?us-ascii?Q?r9Rvk7Xb597yKqr3AaIVZrea65scKBIk8dVbrK1pQ1XEpj39Uhw4WsoWLEnA?= =?us-ascii?Q?a1Rn6tMRoW1C0rCsemdF9jBSbGfs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Z6yaEF17/ngTnatrNj+5mcN7MHGwxiB8/O61daodPR2IbiCR66 SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-MS-Exchange-CrossTenant-OriginalArrivalTime: 26 Jan 2018 12:24:58.5076 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 897248ad-efbc-451f-2175-08d564b7d299 X-MS-Exchange-CrossTenant-Id: 5afe0b00-7697-4969-b663-5eab37d5f47e X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=5afe0b00-7697-4969-b663-5eab37d5f47e; Ip=[192.88.168.50]; Helo=[tx30smr01.am.freescale.net] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN3PR03MB1414 X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Linux-imx@nxp.com Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP Add i.MX7 temperature monitor support. Signed-off-by: Anson Huang Acked-by: Dong Aisheng --- no changes since V1. .../devicetree/bindings/thermal/imx-thermal.txt | 5 +++-- arch/arm/boot/dts/imx7s.dtsi | 20 ++++++++++++++++++++ 2 files changed, 23 insertions(+), 2 deletions(-) diff --git a/Documentation/devicetree/bindings/thermal/imx-thermal.txt b/Documentation/devicetree/bindings/thermal/imx-thermal.txt index 28be51a..9575d45 100644 --- a/Documentation/devicetree/bindings/thermal/imx-thermal.txt +++ b/Documentation/devicetree/bindings/thermal/imx-thermal.txt @@ -1,8 +1,9 @@ * Temperature Monitor (TEMPMON) on Freescale i.MX SoCs Required properties: -- compatible : "fsl,imx6q-tempmon" for i.MX6Q, "fsl,imx6sx-tempmon" for i.MX6SX. - i.MX6SX has two more IRQs than i.MX6Q, one is IRQ_LOW and the other is IRQ_PANIC, +- compatible : "fsl,imx6q-tempmon" for i.MX6Q, "fsl,imx6sx-tempmon" for i.MX6SX, + "fsl,imx7-tempmon" for i.MX7S/D. + i.MX6SX and i.MX7S/D have two more IRQs than i.MX6Q, one is IRQ_LOW and the other is IRQ_PANIC, when temperature is below than low threshold, IRQ_LOW will be triggered, when temperature is higher than panic threshold, system will auto reboot by SRC module. - fsl,tempmon : phandle pointer to system controller that contains TEMPMON diff --git a/arch/arm/boot/dts/imx7s.dtsi b/arch/arm/boot/dts/imx7s.dtsi index 82ad26e..2e2eda53 100644 --- a/arch/arm/boot/dts/imx7s.dtsi +++ b/arch/arm/boot/dts/imx7s.dtsi @@ -497,9 +497,29 @@ }; ocotp: ocotp-ctrl@30350000 { + #address-cells = <1>; + #size-cells = <1>; compatible = "fsl,imx7d-ocotp", "syscon"; reg = <0x30350000 0x10000>; clocks = <&clks IMX7D_OCOTP_CLK>; + + tempmon_calib: calib@3c { + reg = <0x3c 0x4>; + }; + + tempmon_temp_grade: temp-grade@10 { + reg = <0x10 0x4>; + }; + }; + + tempmon: tempmon { + compatible = "fsl,imx7-tempmon"; + interrupts = ; + fsl,tempmon =<&anatop>; + nvmem-cells = <&tempmon_calib>, + <&tempmon_temp_grade>; + nvmem-cell-names = "calib", "temp_grade"; + clocks = <&clks IMX7D_PLL_SYS_MAIN_CLK>; }; anatop: anatop@30360000 {