From patchwork Mon Jan 22 07:25:48 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anson Huang X-Patchwork-Id: 10178273 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 45BEC60224 for ; Mon, 22 Jan 2018 11:25:11 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 3999D26212 for ; Mon, 22 Jan 2018 11:25:11 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 2B16A26E54; Mon, 22 Jan 2018 11:25:11 +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 8DDA626212 for ; Mon, 22 Jan 2018 11:25:10 +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=smIrl6sQw082zP9Rrpl+DlfVvATPLB2CW4Xph9RrqNo=; b=NUOSuudm0IvLqp HpKq5vRJZbrVMBoJW1UIVfLm+LNfv6pxBd01l2Oyc+TF+aNfSjB0f6oIYjFKU9iRhCmG0t59DAdJp YOpZFzWnaP6+Ask/RLQ7ee5cVgZoWw7OMrshag8eW6ONgPd/eyup9OMqZlDLTYF9Bjyr+0V0W3tR1 uANq1x2uKUU5kveen4C3Ns3rjKj3ewRDYGn8KUjKVviRkQUeYJ3lVltMNAZk1tgXfzDNmnDAbqLgR 3HwonFEbgbj1ZyxzGCPgpJeXug46elco/00/AvcS3wV+NbOlOqjK6Aj4PSqkPcoNzojDNA5AAR1ip zmpkRE3bbUHHHI2Yo3Mw==; 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 1edaDq-0007nH-DF; Mon, 22 Jan 2018 11:25:06 +0000 Received: from mail-by2nam01on0057.outbound.protection.outlook.com ([104.47.34.57] helo=NAM01-BY2-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.89 #1 (Red Hat Linux)) id 1edaDl-00074H-Ia for linux-arm-kernel@lists.infradead.org; Mon, 22 Jan 2018 11:25:04 +0000 Received: from MWHPR03CA0022.namprd03.prod.outlook.com (2603:10b6:300:117::32) by SN2PR03MB2368.namprd03.prod.outlook.com (2603:10b6:804:e::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.428.17; Mon, 22 Jan 2018 11:24:47 +0000 Received: from BN1AFFO11FD014.protection.gbl (2a01:111:f400:7c10::106) by MWHPR03CA0022.outlook.office365.com (2603:10b6:300:117::32) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.428.17 via Frontend Transport; Mon, 22 Jan 2018 11:24:47 +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 BN1AFFO11FD014.mail.protection.outlook.com (10.58.52.74) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_RSA_WITH_AES_256_CBC_SHA) id 15.20.428.12 via Frontend Transport; Mon, 22 Jan 2018 11:24:46 +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 w0M7QR72021564; Mon, 22 Jan 2018 00:26:28 -0700 From: Anson Huang To: , , , , , , , , Subject: [PATCH 1/2] ARM: dts: imx7s: add temperature monitor support Date: Mon, 22 Jan 2018 15:25:48 +0800 Message-ID: <1516605949-14663-1-git-send-email-Anson.Huang@nxp.com> X-Mailer: git-send-email 1.9.1 X-EOPAttributedMessage: 0 X-Matching-Connectors: 131610938878523456; (91ab9b29-cfa4-454e-5278-08d120cd25b8); () X-Forefront-Antispam-Report: CIP:192.88.168.50; IPV:NLI; CTRY:US; EFV:NLI; SFV:NSPM; SFS:(10009020)(39860400002)(346002)(376002)(396003)(39380400002)(2980300002)(1110001)(1109001)(339900001)(189003)(199004)(104016004)(4326008)(316002)(305945005)(72206003)(36756003)(336011)(50466002)(498600001)(51416003)(106466001)(48376002)(105606002)(47776003)(2906002)(356003)(26005)(6666003)(6636002)(86362001)(5660300001)(97736004)(53936002)(2201001)(81166006)(8676002)(81156014)(68736007)(50226002)(16586007)(54906003)(77096007)(85426001)(110136005)(8936002); DIR:OUT; SFP:1101; SCL:1; SRVR:SN2PR03MB2368; H:tx30smr01.am.freescale.net; FPR:; SPF:Fail; PTR:InfoDomainNonexistent; MX:1; A:1; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; BN1AFFO11FD014; 1:UxYitF8zIK7Lw5psTFGRCdzNiX+FF906RECjSkrjTVE17n0N4g6rJcn8iF7E2kHsC8WCGiCT0zC/Q1u6o3VgxyANWzHsOBpBFxWS4LWUsKENKI2JofYwZIh6tcgvKDs0 MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 4a90245b-a82d-422a-ed40-08d5618abecc X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(7020095)(5600026)(4604075)(2017052603307); SRVR:SN2PR03MB2368; X-Microsoft-Exchange-Diagnostics: 1; SN2PR03MB2368; 3:4JLTC4LiC3UZdjXlVCVva4PjlwLLFe0OrbU64mLkvMoRXC7V4CsvQ39l2Bdecngmt7sGI7Gg/lFhcUWyPizxuJabh5asQH7hofzMdX0n1usvKwfQ6GNbi8yOp/zf0utUR7er9xkO96huqOnDxw6V46JpuduQ56leFPnrtxlMyrNqtYHxJtpWn1GY+4jOkD2uMVTorafKwkSulpm1KtSaGfizAFvqmGPnQByeef24X0wmypuvMU9EMH7eRx5h7EFD5JkMfSOuATZyvtM20hsMQMyAPP+uS3myqBLvm+PM7fHtyvqNhAZq89yQSmTH9uV90nnuJoZv6TS8VOUefnzEfrns4zTX63xAxst743R7Yzc=; 25:uqs611Cwl3KWgfDFotg6gSXbdRDA0L+UoN1PmRHDCOaLrNnXICDKKK28IINZHO55uHChgDDg0i3aWbRkadD0W0JgCoBcYrKGSmYOyhZuqp0c99khpH0bjWc64fpR9IAw3c66cIxdc2Zsd3CABf7+iE3KMuN29OtXZAZVnxlW9lIdgCVVH8ItL5p+PK9c+kZa8ps2BU2mNc1E3A9Ti9cOf9Npv4X/Yxd/AfNPSwqJP0oked2FladT2/sCLmI0X1cRVZ0HDoEySomIqdpyzbcxpcBqE6X6wFCXmpZSkCAg3zLX3d4jF1YeP0CSeZnBZBdxv3dmebcKBxZNtDHh9D2zpQ== X-MS-TrafficTypeDiagnostic: SN2PR03MB2368: X-Microsoft-Exchange-Diagnostics: 1; SN2PR03MB2368; 31:QFccOZl0BXS7PLijVbuYWsx1UV0j5v11nROcGJxFzvS7n0ZBG7Tjlyw2sl3b/O4Bg2ywbBQhBewTzgcOgP5Pb+giQKGS6j8OlO6WwUXHV+7MiQ5XxmBO6KIc06n8CEaO1s9LbEvlyV2YMYGRhd39kwSaRs9ytEIDpQETHz3EZsEjBXzUTmBr83NiIhBPCAeYcLInvNLvhWIg3o/ePUX3l6EPyE2WuQpPSEV5eGXfLSE=; 4:toY5/5EIOfoz1zJbe3so/AEGUQ+F6oKhO46+cfaH1mge9zin5hyJLeyHUufaXp9LfJWLiPtRT+RKcRaj5ZCIP1FzFYOfe2KeRC7tLvfwPwKLLiMxTQTLClmC1gofre9J8SCtxmyR0ElfW2FFUR1VSHEGVebu85FD1v5In9q9PpIj5+vt/7OjWy4Nps0fwPf+UCh55yA7p/kzr+k0XicXb+eFEijfVMP7ig570KeisqQ4sXhuzXG/+a+QImAB57rwlyOq/gc+41hmTb7xC2aBXXz1E6fuGBg8ookQzGW22myaUfOLGTI01g1REttGSqyb X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(185117386973197); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6095135)(2401047)(8121501046)(5005006)(3231023)(2400081)(944501161)(93006095)(93001095)(10201501046)(3002001)(6055026)(6096035)(201703131430075)(201703131433075)(201703131448075)(201703151042153)(20161123561025)(20161123563025)(20161123559100)(20161123556025)(20161123565025)(201708071742011); SRVR:SN2PR03MB2368; BCL:0; PCL:0; RULEID:(100000803101)(100110400095)(400006); SRVR:SN2PR03MB2368; X-Forefront-PRVS: 0560A2214D X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; SN2PR03MB2368; 23:/k/mC2+G+APRmr8GMlZDYPcPLs+kjP9a5Enxpp5xi?= =?us-ascii?Q?kMj4Bvg93jH8IXfzQYEiALUhvo/7fUKXLouoccNMRdxmvj4E2zGJtegWfYQ1?= =?us-ascii?Q?bRqwEaTlKgM5bDmbhTfD9aIK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 1:99 SpamDiagnosticMetadata: NSPM X-MS-Exchange-CrossTenant-OriginalArrivalTime: 22 Jan 2018 11:24:46.7291 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 4a90245b-a82d-422a-ed40-08d5618abecc 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: SN2PR03MB2368 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: aisheng.dong@nxp.com, devicetree@vger.kernel.org, linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org, Linux-imx@nxp.com, linux-arm-kernel@lists.infradead.org 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 --- .../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 {