From patchwork Thu Dec 20 09:08:23 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anson Huang X-Patchwork-Id: 10738695 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 88D1E13A4 for ; Thu, 20 Dec 2018 09:08:58 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 52017205F7 for ; Thu, 20 Dec 2018 09:08:56 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 403C1206AF; Thu, 20 Dec 2018 09:08:56 +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=-5.2 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.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 CF56F205F7 for ; Thu, 20 Dec 2018 09:08:55 +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:In-Reply-To:References: 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: List-Owner; bh=rCUTRqY61FoHAcs/4kHuqj9/G9TXGWKjeSPzEc4weVs=; b=txl1Xj0UtXB6iT Rougc+MuseTGXhZVgqpwQ0IimSuQp6q22OYgDEhao0zW86WfsE1AiY/CYqdcsx42XGVVNx7805Gy4 qEF5y5wOsiVSSaTLF1/VOQlgk1n+MxTZSdJrVSiWKoT5qjsSHJ6qPc4u26b3RwitPS2ukMmeqxr3L sglT55EKPrzPyX5j2IKQZ5eHT7YtLnqYsWYtiGdT1QGl5oQe4sLzabFsYmtqRzRwt6/gCX31FNyCc O9erRdR4FZyJQDOptQU86nD0pw83M071z2CfgJ6Vaj39/m+VIFTfVUQF7L1O+DLjWb38s3xFZdisD vsFzSbEsEdSuKCwuubYA==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1gZuK0-0000xG-QY; Thu, 20 Dec 2018 09:08:48 +0000 Received: from mail-eopbgr00085.outbound.protection.outlook.com ([40.107.0.85] helo=EUR02-AM5-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1gZuJp-0000fA-S9 for linux-arm-kernel@lists.infradead.org; Thu, 20 Dec 2018 09:08:41 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nxp.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=gGuHUoUnaH1q6eTv/YPgEEZgyfaGT3QF3UcKsuHgOM0=; b=GDpgcCzBP7dHPBD15ZkCToSWkSz/06hN7FUUS+zinGkP9oacgRpjSi1hyfI+8g5Fd+wKcHHxZCHWpr95DF3IMX+M6hr5xsBWBZvjMRzEVArDM361LztHut04kWkskHn8u3wA3arlN08Xi45/rUaMJ5xxU+d+yqFnZBu+teNg1nA= Received: from AM6PR0402MB3911.eurprd04.prod.outlook.com (52.133.30.10) by AM6PR0402MB3797.eurprd04.prod.outlook.com (52.133.29.28) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1446.17; Thu, 20 Dec 2018 09:08:23 +0000 Received: from AM6PR0402MB3911.eurprd04.prod.outlook.com ([fe80::987c:cb59:96c9:6b71]) by AM6PR0402MB3911.eurprd04.prod.outlook.com ([fe80::987c:cb59:96c9:6b71%2]) with mapi id 15.20.1425.025; Thu, 20 Dec 2018 09:08:23 +0000 From: Anson Huang To: "robh+dt@kernel.org" , "mark.rutland@arm.com" , "catalin.marinas@arm.com" , "will.deacon@arm.com" , "rui.zhang@intel.com" , "edubezval@gmail.com" , "daniel.lezcano@linaro.org" , Aisheng Dong , "s.hauer@pengutronix.de" , "shawnguo@kernel.org" , Andy Gross , "arnd@arndb.de" , "horms+renesas@verge.net.au" , "heiko@sntech.de" , "bjorn.andersson@linaro.org" , "enric.balletbo@collabora.com" , "amit.kucheria@linaro.org" , "ezequiel@collabora.com" , "olof@lixom.net" , "devicetree@vger.kernel.org" , "linux-kernel@vger.kernel.org" , "linux-arm-kernel@lists.infradead.org" , "linux-pm@vger.kernel.org" Subject: [PATCH V5 1/4] dt-bindings: fsl: scu: add thermal binding Thread-Topic: [PATCH V5 1/4] dt-bindings: fsl: scu: add thermal binding Thread-Index: AQHUmEOPzVgmR6I/g0KdtfEFFiArMg== Date: Thu, 20 Dec 2018 09:08:23 +0000 Message-ID: <1545296609-20477-2-git-send-email-Anson.Huang@nxp.com> References: <1545296609-20477-1-git-send-email-Anson.Huang@nxp.com> In-Reply-To: <1545296609-20477-1-git-send-email-Anson.Huang@nxp.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-mailer: git-send-email 2.7.4 x-clientproxiedby: HK0PR03CA0091.apcprd03.prod.outlook.com (2603:1096:203:72::31) To AM6PR0402MB3911.eurprd04.prod.outlook.com (2603:10a6:209:1c::10) authentication-results: spf=none (sender IP is ) smtp.mailfrom=anson.huang@nxp.com; x-ms-exchange-messagesentrepresentingtype: 1 x-originating-ip: [119.31.174.66] x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1; AM6PR0402MB3797; 6:+XksBlP+FRgeqruHPUQVemPq2hULuIapFk2FPnCnQ8Ic/FhzbGyRMgX3hZ64R2SHg27MNaqNTWv8pB0StuUw4S8tebpFn/DawuRr3ck4xgBWQblG4p3pLK6Os7R+iinlsi2/s9RJhmdDGKShC9CV0qfv2IfkhzJe/br8waW9jQ8CQLTKbcQYfj80MeOHrWdJN1HwRtucohvs0GHmV5SExfchfYsoDHi/zNC2YKVYReeK7YRWeO4KzH8mu0O1vm96q1/4VSQMJmZJRR0SWDvx3BP9fO30Nj/TxTAWe0vK0/Vj+oAiSd1Q4sdPUNURXJfFkl7AAcgaXOeKU77dKyHRr752LtsmJVT2Qw8wh1DelkT51aW9ZIHNr36ZGdhuls4LEiu2vmOFNGITF2R68oVaCS+AH/kwgUw2BaPjCL4QxW5ZhQWsdwsXhM9+G6SSO3rkTrmF1dcydJZND3VcVPer1w==; 5:VLgA9MIFy7VB8CjS+CCCA64f6R58Q9q+qAqkDumlfEdOAo79ZWzn5A1NiwohKJ7A2/7BV9hBL0OZKUL3t20S4j3jctJRwjtWAJTDVLcKA955oRzTfXGXEvgi3xkXlm8mD4zTiJGWB3VM64PtZbj5CUYe9KrqSzhsvPtWui+lRL8=; 7:johmWB4b07ndPrpWCy1wm1IHEonL1WzB8dI7aciBPbxC2wGjAVuC4qJ21JBIhGq4xcdjsY0IWKrltp2nDY/HUHkf3Tj8YEffkBTN8QyrgLCbWFhpimRMf8f1B/NkFIn0QIKrQT8SW/eGBmlXgPFMVg== x-ms-office365-filtering-correlation-id: 0fbe9c6c-2553-47b3-0b90-08d6665ab1b9 x-ms-office365-filtering-ht: Tenant x-microsoft-antispam: BCL:0; PCL:0; RULEID:(2390118)(7020095)(4652040)(8989299)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(5600074)(711020)(4618075)(2017052603328)(7153060)(7193020); SRVR:AM6PR0402MB3797; x-ms-traffictypediagnostic: AM6PR0402MB3797: x-ld-processed: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635,ExtAddr x-microsoft-antispam-prvs: x-ms-exchange-senderadcheck: 1 x-exchange-antispam-report-cfa-test: BCL:0; PCL:0; RULEID:(8211001083)(3230021)(999002)(5005026)(6040522)(2401047)(8121501046)(3002001)(10201501046)(93006095)(93001095)(3231475)(944501520)(52105112)(6055026)(149066)(150057)(6041310)(20161123558120)(20161123562045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123560045)(20161123564045)(201708071742011)(7699051)(76991095); SRVR:AM6PR0402MB3797; BCL:0; PCL:0; RULEID:; SRVR:AM6PR0402MB3797; x-forefront-prvs: 0892FA9A88 x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(366004)(376002)(39860400002)(346002)(136003)(396003)(189003)(199004)(6116002)(39060400002)(3846002)(476003)(2616005)(7416002)(5660300001)(66066001)(99286004)(386003)(4326008)(6506007)(446003)(478600001)(50226002)(53936002)(2501003)(2906002)(11346002)(97736004)(256004)(6512007)(305945005)(25786009)(7736002)(8936002)(14454004)(71200400001)(71190400001)(8676002)(81156014)(81166006)(6486002)(486006)(6436002)(106356001)(86362001)(105586002)(110136005)(186003)(102836004)(36756003)(2201001)(52116002)(68736007)(316002)(76176011)(26005)(921003)(1121003); DIR:OUT; SFP:1101; SCL:1; SRVR:AM6PR0402MB3797; H:AM6PR0402MB3911.eurprd04.prod.outlook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; MX:1; A:1; received-spf: None (protection.outlook.com: nxp.com does not designate permitted sender hosts) x-microsoft-antispam-message-info: 150ZmRTVVv5sUsJrVem5bYblurQnDM8F5eFIyVGtWmmrU74/3S3Zs1topCTP17afqO4ANihRIVaFwFXMk/ITbBaWMvfGxEgwLWLUbM0G3cXm2jkCw1hmMjzmcAYx4l5cD3KlVR70xzx5y7PoM/5ZCgdII5zbSdq3e2bMeK5pC6Vaj0sonrsf0EEG41rSYO5inmCsV0H7I3jy9+BOTmD67XDgc1/vxvBvgJvoufQc2CG3ToNTOfdjpDfVuWntb9sL+bjLqomlhkKcSQxkemU5FV3zwLrkoHS0/XkpGWIpHQQ3B+mV3x5NAZ4xl/9rlpvs spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM MIME-Version: 1.0 X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 0fbe9c6c-2553-47b3-0b90-08d6665ab1b9 X-MS-Exchange-CrossTenant-originalarrivaltime: 20 Dec 2018 09:08:23.6509 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM6PR0402MB3797 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20181220_010838_574642_8AE772DB X-CRM114-Status: GOOD ( 12.27 ) 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: dl-linux-imx 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 NXP i.MX8QXP is an ARMv8 SoC with a Cortex-M4 core inside as system controller, the system controller is in charge of system power, clock and thermal sensors etc. management, Linux kernel has to communicate with system controller via MU (message unit) IPC to get temperature from thermal sensors, this patch adds binding doc for i.MX system controller thermal driver. Signed-off-by: Anson Huang Reviewed-by: Rob Herring --- No change since V4. --- .../devicetree/bindings/arm/freescale/fsl,scu.txt | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/Documentation/devicetree/bindings/arm/freescale/fsl,scu.txt b/Documentation/devicetree/bindings/arm/freescale/fsl,scu.txt index 3f3d697..b77ec29 100644 --- a/Documentation/devicetree/bindings/arm/freescale/fsl,scu.txt +++ b/Documentation/devicetree/bindings/arm/freescale/fsl,scu.txt @@ -112,6 +112,16 @@ RTC bindings based on SCU Message Protocol Required properties: - compatible: should be "fsl,imx8qxp-sc-rtc"; +Thermal bindings based on SCU Message Protocol +------------------------------------------------------------ + +Required properties: +- compatible : Must be "fsl,imx8qxp-sc-thermal"; +- tsens-num : Total number of thermal sensors supported; +- #thermal-sensor-cells : Should be 1. See + Documentation/devicetree/bindings/thermal/thermal.txt + for a description. + Example (imx8qxp): ------------- lsio_mu1: mailbox@5d1c0000 { @@ -158,6 +168,12 @@ firmware { rtc: rtc { compatible = "fsl,imx8qxp-sc-rtc"; }; + + tsens: thermal-sensor { + compatible = "fsl,imx8qxp-sc-thermal"; + tsens-num = <1>; + #thermal-sensor-cells = <1>; + }; }; }; From patchwork Thu Dec 20 09:08:32 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anson Huang X-Patchwork-Id: 10738699 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id E48506C2 for ; Thu, 20 Dec 2018 09:09:10 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id D14032434C for ; Thu, 20 Dec 2018 09:09:10 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id C26BE24B48; Thu, 20 Dec 2018 09:09:10 +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=-5.2 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.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 574032434C for ; Thu, 20 Dec 2018 09:09: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:In-Reply-To:References: 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: List-Owner; bh=3MPcGhaxSCM0XVimaUQ4NcSJKBnY2P3vVjio+FMSSw8=; b=LN+cIlboZ+sTd2 4KOqQiHQ6gZ33Blhb0SIxLiCb6q92dzXi+GztdrwBa3mQzZPD+gIKl2Oc79JXVUMvu+NcLEQ6S+jS j1rXeIwInClCP+l9Q4nYwQJZ5UjpIGZqNYqaCSuxdqyfBKhneMwxp5QKFGnhkBaBBmARjrGuRL3OO X9fro9i5FJ6elX1sm2/UivocyHybjiRgGLjUhOHgwIWbS6hQJ7by5/BNAT4P0x/1WqhulBaQHMR+U cHQm0yA3EMdbSBkQg91XPQmVN+HzMp5dDMpD8PSO2tavqc3sPWjQL50PYuByj6+MoF5YL8EsiVf5y xuyJkAMnGrXdzFxq5R3g==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1gZuKE-0001Bv-Mn; Thu, 20 Dec 2018 09:09:02 +0000 Received: from mail-eopbgr00085.outbound.protection.outlook.com ([40.107.0.85] helo=EUR02-AM5-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1gZuJt-0000fA-CA for linux-arm-kernel@lists.infradead.org; Thu, 20 Dec 2018 09:08:43 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nxp.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=KvwJB+Jdo193scJQK2l1siIS1m5ghgNIYOT9cKViA6A=; b=YbMW8MrrMBVR+V75pFgxlsgHTXfUugA3r9DuCAdaV2xr2IZJWNl5Caho09TtEPOjLoxiGc5/trLB/y3kDybe83mgY96uTD8IzDBD+yXiUheoFp3ULWAr8fbuCxM6fJsHPNHUyRTBTdVOo1ddk/ZtiAWVCKGHIGYrX/UnFPN0m6g= Received: from AM6PR0402MB3911.eurprd04.prod.outlook.com (52.133.30.10) by AM6PR0402MB3797.eurprd04.prod.outlook.com (52.133.29.28) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1446.17; Thu, 20 Dec 2018 09:08:32 +0000 Received: from AM6PR0402MB3911.eurprd04.prod.outlook.com ([fe80::987c:cb59:96c9:6b71]) by AM6PR0402MB3911.eurprd04.prod.outlook.com ([fe80::987c:cb59:96c9:6b71%2]) with mapi id 15.20.1425.025; Thu, 20 Dec 2018 09:08:32 +0000 From: Anson Huang To: "robh+dt@kernel.org" , "mark.rutland@arm.com" , "catalin.marinas@arm.com" , "will.deacon@arm.com" , "rui.zhang@intel.com" , "edubezval@gmail.com" , "daniel.lezcano@linaro.org" , Aisheng Dong , "s.hauer@pengutronix.de" , "shawnguo@kernel.org" , Andy Gross , "arnd@arndb.de" , "horms+renesas@verge.net.au" , "heiko@sntech.de" , "bjorn.andersson@linaro.org" , "enric.balletbo@collabora.com" , "amit.kucheria@linaro.org" , "ezequiel@collabora.com" , "olof@lixom.net" , "devicetree@vger.kernel.org" , "linux-kernel@vger.kernel.org" , "linux-arm-kernel@lists.infradead.org" , "linux-pm@vger.kernel.org" Subject: [PATCH V5 2/4] thermal: imx_sc: add i.MX system controller thermal support Thread-Topic: [PATCH V5 2/4] thermal: imx_sc: add i.MX system controller thermal support Thread-Index: AQHUmEOUhX3p60YUY0CljElNLNFaiw== Date: Thu, 20 Dec 2018 09:08:32 +0000 Message-ID: <1545296609-20477-3-git-send-email-Anson.Huang@nxp.com> References: <1545296609-20477-1-git-send-email-Anson.Huang@nxp.com> In-Reply-To: <1545296609-20477-1-git-send-email-Anson.Huang@nxp.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-mailer: git-send-email 2.7.4 x-clientproxiedby: HK0PR03CA0091.apcprd03.prod.outlook.com (2603:1096:203:72::31) To AM6PR0402MB3911.eurprd04.prod.outlook.com (2603:10a6:209:1c::10) authentication-results: spf=none (sender IP is ) smtp.mailfrom=anson.huang@nxp.com; x-ms-exchange-messagesentrepresentingtype: 1 x-originating-ip: [119.31.174.66] x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1; AM6PR0402MB3797; 6:o5mOUYl15U3HSlx/K8TkLfFsejQRyySLHzxkyVRIcrHcOnz7u0/8PbuftMoD2DewJFjU2X3na/3IXvtTep2acwoDx299jCSsnp00SBQXK18g1NxTKdSgAyXhzytyBD4WL0kehmJTGBUwDux/Fy8v/s2php5LKdbNWE+/SFHIjeXZ1APdlwmKjY/rcFuoQRHnxjz8/rBfJC3UeCrcesuO3kU6gIaBXMO1DIlvduBn10PQZchSoDoxR3emMi8aQlygfxvpW29AxJEzRFRvFUC4DglF0q1l6v2An7cTcxPb9dTrAxCxKPBE+wj20LC3TzVwCwgE4if6GyF53j75rQfZ1ou/BfvUBFAGo+mPKqR6yt2VJlnknFMhdmPIvStZV0UAfC5nN3kUm5+7TzBgrCcHYc/G+kPUW7iYZ6/ip2RHC4EGSBt0mwlFsEJjtv7IqW1tVDS64A/s4VrsQbQLTprjSQ==; 5:SwwU5Dg4m/sEW8nWbTldtOKFUZRxI0VSzMksiVjrE8toR85xyqPclg4rFqddftkZmvEW7PFK5WQkb163BG2TvVY99oZCgVJklWccGOfZB3VRu2Zs0eVsDCGg89c7rSAo1N58qRNfMEwg/Pna+IaX1EOml7qA/uQdnG2lka+ns6g=; 7:7H/fcGj0BnlOOucUnsR0N5QDIW623rT6VJwCdUxGn/yH3cUUuxC54xKbPIC7wTUj3oqOVoAMikSXyc3puEkPOunJMXxUG1WttxbbqT81De9+clF+gsL//GXMIxhvPwKYh6gJWpN/yba83r0/zeqcKw== x-ms-office365-filtering-correlation-id: 4d087b22-bef1-4904-f62a-08d6665ab708 x-ms-office365-filtering-ht: Tenant x-microsoft-antispam: BCL:0; PCL:0; RULEID:(2390118)(7020095)(4652040)(8989299)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(5600074)(711020)(4618075)(2017052603328)(7153060)(7193020); SRVR:AM6PR0402MB3797; x-ms-traffictypediagnostic: AM6PR0402MB3797: x-ld-processed: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635,ExtAddr x-microsoft-antispam-prvs: x-ms-exchange-senderadcheck: 1 x-exchange-antispam-report-cfa-test: BCL:0; PCL:0; RULEID:(8211001083)(3230021)(999002)(5005026)(6040522)(2401047)(8121501046)(3002001)(10201501046)(93006095)(93001095)(3231475)(944501520)(52105112)(6055026)(149066)(150057)(6041310)(20161123558120)(20161123562045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123560045)(20161123564045)(201708071742011)(7699051)(76991095); SRVR:AM6PR0402MB3797; BCL:0; PCL:0; RULEID:; SRVR:AM6PR0402MB3797; x-forefront-prvs: 0892FA9A88 x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(366004)(376002)(39860400002)(346002)(136003)(396003)(54534003)(189003)(199004)(6116002)(39060400002)(3846002)(476003)(2616005)(7416002)(5660300001)(66066001)(99286004)(386003)(4326008)(6506007)(446003)(478600001)(50226002)(53936002)(2501003)(2906002)(11346002)(97736004)(256004)(6512007)(305945005)(25786009)(7736002)(8936002)(14454004)(71200400001)(71190400001)(8676002)(81156014)(81166006)(6486002)(486006)(6436002)(106356001)(86362001)(105586002)(110136005)(186003)(102836004)(36756003)(2201001)(52116002)(68736007)(316002)(76176011)(26005)(921003)(1121003); DIR:OUT; SFP:1101; SCL:1; SRVR:AM6PR0402MB3797; H:AM6PR0402MB3911.eurprd04.prod.outlook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; MX:1; A:1; received-spf: None (protection.outlook.com: nxp.com does not designate permitted sender hosts) x-microsoft-antispam-message-info: tFCimm41iZoSYWFdTipRm3GduC/khNRwVc/JeLRPrbmQ//aeN+0vzN5mCu94G0I6XCCYPNYjM4yzfp3qIdw4afEjdDvI3DKFQuCaaRpX70DALKaDsaWe0G+6lKY5IF2nj5BEyavhVr0gBlI/41tU8A3f+IxeGWFEOyqvWg1JQLY7769YgLEwjPCtr01KkE4xWKl0HRino4ZxW0Yvq0OWtWHjrCplhx1XqjpRu+AQgg0uf9IC/pBUGCGAQ60/3aoMJ2Z0xXAMJnNd952AC3moLXT/VlohJM1Hs6lgiQNlimBiBYs7qkdY2Ce04SnkkD+V spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM MIME-Version: 1.0 X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 4d087b22-bef1-4904-f62a-08d6665ab708 X-MS-Exchange-CrossTenant-originalarrivaltime: 20 Dec 2018 09:08:32.6743 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM6PR0402MB3797 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20181220_010841_555902_8BAC08FE X-CRM114-Status: GOOD ( 23.81 ) 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: dl-linux-imx 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 i.MX8QXP is an ARMv8 SoC which has a Cortex-M4 system controller inside, the system controller is in charge of controlling power, clock and thermal sensors etc.. This patch adds i.MX system controller thermal driver support, Linux kernel has to communicate with system controller via MU (message unit) IPC to get each thermal sensor's temperature, it supports multiple sensors which are passed from device tree, please see the binding doc for details. Signed-off-by: Anson Huang --- ChangeLog since V4: - Add driver dependency on IMX_SCU to avoid compile error when IMX_SCU is NOT selected; - Remove unnecessary of different errors handle for imx_scu_get_handle, already included in API. --- drivers/thermal/Kconfig | 11 +++ drivers/thermal/Makefile | 1 + drivers/thermal/imx_sc_thermal.c | 200 +++++++++++++++++++++++++++++++++++++++ 3 files changed, 212 insertions(+) create mode 100644 drivers/thermal/imx_sc_thermal.c diff --git a/drivers/thermal/Kconfig b/drivers/thermal/Kconfig index 0e69edc..8d4601d 100644 --- a/drivers/thermal/Kconfig +++ b/drivers/thermal/Kconfig @@ -222,6 +222,17 @@ config IMX_THERMAL cpufreq is used as the cooling device to throttle CPUs when the passive trip is crossed. +config IMX_SC_THERMAL + tristate "Temperature sensor driver for NXP i.MX SoCs with System Controller" + depends on (ARCH_MXC && IMX_SCU) || COMPILE_TEST + depends on OF + help + Support for Temperature Monitor (TEMPMON) found on NXP i.MX SoCs with + system controller inside, Linux kernel has to communicate with system + controller via MU (message unit) IPC to get temperature from thermal + sensor. It supports one critical trip point and one + passive trip point for each thermal sensor. + config MAX77620_THERMAL tristate "Temperature sensor driver for Maxim MAX77620 PMIC" depends on MFD_MAX77620 diff --git a/drivers/thermal/Makefile b/drivers/thermal/Makefile index 610344e..1b13f6a 100644 --- a/drivers/thermal/Makefile +++ b/drivers/thermal/Makefile @@ -41,6 +41,7 @@ obj-$(CONFIG_DB8500_THERMAL) += db8500_thermal.o obj-$(CONFIG_ARMADA_THERMAL) += armada_thermal.o obj-$(CONFIG_TANGO_THERMAL) += tango_thermal.o obj-$(CONFIG_IMX_THERMAL) += imx_thermal.o +obj-$(CONFIG_IMX_SC_THERMAL) += imx_sc_thermal.o obj-$(CONFIG_MAX77620_THERMAL) += max77620_thermal.o obj-$(CONFIG_QORIQ_THERMAL) += qoriq_thermal.o obj-$(CONFIG_DA9062_THERMAL) += da9062-thermal.o diff --git a/drivers/thermal/imx_sc_thermal.c b/drivers/thermal/imx_sc_thermal.c new file mode 100644 index 0000000..1030a31 --- /dev/null +++ b/drivers/thermal/imx_sc_thermal.c @@ -0,0 +1,200 @@ +// SPDX-License-Identifier: GPL-2.0+ +/* + * Copyright 2018 NXP. + */ + +#include +#include +#include +#include +#include +#include +#include +#include + +#include "thermal_core.h" + +#define IMX_SC_MISC_FUNC_GET_TEMP 13 +#define IMX_SC_C_TEMP 0 + +static struct imx_sc_ipc *thermal_ipc_handle; + +struct imx_sc_sensor { + struct thermal_zone_device *tzd; + u32 resource_id; +}; + +struct imx_sc_thermal_data { + struct imx_sc_sensor *sensor; +}; + +struct req_get_temp { + u16 resource_id; + u8 type; +} __packed; + +struct resp_get_temp { + u16 celsius; + u8 tenths; +} __packed; + +struct imx_sc_msg_misc_get_temp { + struct imx_sc_rpc_msg hdr; + union { + struct req_get_temp req; + struct resp_get_temp resp; + } data; +} __packed; + +static int imx_sc_thermal_get_temp(void *data, int *temp) +{ + struct imx_sc_msg_misc_get_temp msg; + struct imx_sc_rpc_msg *hdr = &msg.hdr; + struct imx_sc_sensor *sensor = data; + int ret; + + msg.data.req.resource_id = sensor->resource_id; + msg.data.req.type = IMX_SC_C_TEMP; + + hdr->ver = IMX_SC_RPC_VERSION; + hdr->svc = IMX_SC_RPC_SVC_MISC; + hdr->func = IMX_SC_MISC_FUNC_GET_TEMP; + hdr->size = 2; + + ret = imx_scu_call_rpc(thermal_ipc_handle, &msg, true); + if (ret) { + pr_err("read temp sensor %d failed, ret %d\n", + sensor->resource_id, ret); + return ret; + } + + *temp = msg.data.resp.celsius * 1000 + msg.data.resp.tenths * 100; + + return 0; +} + +static const struct thermal_zone_of_device_ops imx_sc_thermal_ops = { + .get_temp = imx_sc_thermal_get_temp, +}; + +static int imx_sc_thermal_register_sensor(struct platform_device *pdev, + struct imx_sc_sensor *sensor) +{ + struct thermal_zone_device *tzd; + + tzd = devm_thermal_zone_of_sensor_register(&pdev->dev, + sensor->resource_id, + sensor, + &imx_sc_thermal_ops); + if (IS_ERR(tzd)) { + dev_err(&pdev->dev, "failed to register sensor: %d\n", + sensor->resource_id); + return PTR_ERR(tzd); + } + + sensor->tzd = tzd; + + return 0; +} + +static int imx_sc_thermal_get_sensor_id(struct device_node *sensor_np, u32 *id) +{ + struct of_phandle_args sensor_specs; + int ret; + + ret = of_parse_phandle_with_args(sensor_np, "thermal-sensors", + "#thermal-sensor-cells", + 0, &sensor_specs); + if (ret) + return ret; + + if (sensor_specs.args_count >= 1) { + *id = sensor_specs.args[0]; + WARN(sensor_specs.args_count > 1, + "%pOFn: too many cells in sensor specifier %d\n", + sensor_specs.np, sensor_specs.args_count); + } else { + return -EINVAL; + } + + return 0; +} + +static int imx_sc_thermal_probe(struct platform_device *pdev) +{ + struct device_node *np = pdev->dev.of_node; + struct device_node *sensor_np = NULL; + struct imx_sc_thermal_data *data; + struct imx_sc_sensor *sensors; + u32 sensor_num; + int ret, i; + + ret = imx_scu_get_handle(&thermal_ipc_handle); + if (ret) + return ret; + + data = devm_kzalloc(&pdev->dev, sizeof(*data), GFP_KERNEL); + if (!data) + return -ENOMEM; + + ret = of_property_read_u32(np, "tsens-num", &sensor_num); + if (ret || !sensor_num) { + dev_err(&pdev->dev, "failed to get valid temp sensor number!\n"); + return -EINVAL; + } + + sensors = devm_kzalloc(&pdev->dev, sizeof(*data->sensor) * sensor_num, + GFP_KERNEL); + if (!sensors) + return -ENOMEM; + + data->sensor = sensors; + + np = of_find_node_by_name(NULL, "thermal-zones"); + if (!np) + return -ENODEV; + + for (i = 0; i < sensor_num; i++) { + struct imx_sc_sensor *sensor = &data->sensor[i]; + + sensor_np = of_get_next_child(np, sensor_np); + ret = imx_sc_thermal_get_sensor_id(sensor_np, &sensor->resource_id); + if (ret < 0) { + dev_err(&pdev->dev, + "failed to get valid sensor resource id: %d\n", + ret); + break; + } + + ret = imx_sc_thermal_register_sensor(pdev, sensor); + if (ret) { + dev_err(&pdev->dev, "failed to register thermal sensor: %d\n", + ret); + break; + } + } + + of_node_put(np); + of_node_put(sensor_np); + + return ret; +} + +static const struct of_device_id imx_sc_thermal_table[] = { + { .compatible = "fsl,imx8qxp-sc-thermal", }, + {} +}; +MODULE_DEVICE_TABLE(of, imx_sc_thermal_table); + +static struct platform_driver imx_sc_thermal_driver = { + .probe = imx_sc_thermal_probe, + .driver = { + .name = "imx-sc-thermal", + .of_match_table = imx_sc_thermal_table, + }, +}; +module_platform_driver(imx_sc_thermal_driver); + +MODULE_AUTHOR("Anson Huang "); +MODULE_DESCRIPTION("Thermal driver for NXP i.MX SoCs with system controller"); +MODULE_LICENSE("GPL v2"); From patchwork Thu Dec 20 09:08:42 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anson Huang X-Patchwork-Id: 10738701 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 4C0F76C2 for ; Thu, 20 Dec 2018 09:09:35 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 38A662465D for ; Thu, 20 Dec 2018 09:09:35 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 2BF902522B; Thu, 20 Dec 2018 09:09:35 +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=-5.2 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.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 C5C7324B48 for ; Thu, 20 Dec 2018 09:09:34 +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:In-Reply-To:References: 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: List-Owner; bh=r00xBBEIJziAph7xwDBSLpwAGfM7/91pTMZ93ei8D4Q=; b=o9cbs1BZBO7Cqx L8cqHmxRR28tn+saM3UGVPiWj6F0E5T507jN7w6Ckl9SDXqpjLGxvpgAoH1GkegumI1arM6aQXbya Ar024tUUgDN1xCO3/CxMw+1oadVCk/REyNf6XaT0FOeTClcYJYtzQUh4VRQjZIo3AI2kTBtbhqXq/ YXBv+FflRdMkVzWV8V5Bbjo1ItvOUaAgQ6qxaye/5AaYLdQ2PCFujBlRkawfd15qVPIVzVohCh6gV uxOKiKxZvOZ61mfFYvLAP67XG14YbW9KWsJWTJr2cg763LzbM/7sCs5a2OkQRaS/6UPqb0HfTekZo EdK8S+hikkkkz8qjKsGw==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1gZuKg-0001Yf-LU; Thu, 20 Dec 2018 09:09:30 +0000 Received: from mail-eopbgr00043.outbound.protection.outlook.com ([40.107.0.43] helo=EUR02-AM5-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1gZuK7-0000tq-3x for linux-arm-kernel@lists.infradead.org; Thu, 20 Dec 2018 09:09:11 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nxp.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=FMZlIFyE6Jpw8uI60bP2HEes0nmZBEhykr7NcKm0BPU=; b=diQk1i4gGtUTYgg4e2oUBdU5TCHAjvPkABeIxd22lANO+/iJd+T5aNfLot4DlrMI1cJV0Wf3FcNWwe8izaJYthzQUoZyQ8P0+E2+uz+rgU4ol2J97NTQMrmu1RqDWe0cuVo+sUiRLLd/O4BAkGG3g/IOXistqBYnJqpSknV4qYE= Received: from AM6PR0402MB3911.eurprd04.prod.outlook.com (52.133.30.10) by AM6PR0402MB3687.eurprd04.prod.outlook.com (52.133.28.154) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1446.19; Thu, 20 Dec 2018 09:08:42 +0000 Received: from AM6PR0402MB3911.eurprd04.prod.outlook.com ([fe80::987c:cb59:96c9:6b71]) by AM6PR0402MB3911.eurprd04.prod.outlook.com ([fe80::987c:cb59:96c9:6b71%2]) with mapi id 15.20.1425.025; Thu, 20 Dec 2018 09:08:42 +0000 From: Anson Huang To: "robh+dt@kernel.org" , "mark.rutland@arm.com" , "catalin.marinas@arm.com" , "will.deacon@arm.com" , "rui.zhang@intel.com" , "edubezval@gmail.com" , "daniel.lezcano@linaro.org" , Aisheng Dong , "s.hauer@pengutronix.de" , "shawnguo@kernel.org" , Andy Gross , "arnd@arndb.de" , "horms+renesas@verge.net.au" , "heiko@sntech.de" , "bjorn.andersson@linaro.org" , "enric.balletbo@collabora.com" , "amit.kucheria@linaro.org" , "ezequiel@collabora.com" , "olof@lixom.net" , "devicetree@vger.kernel.org" , "linux-kernel@vger.kernel.org" , "linux-arm-kernel@lists.infradead.org" , "linux-pm@vger.kernel.org" Subject: [PATCH V5 3/4] defconfig: arm64: add i.MX system controller thermal support Thread-Topic: [PATCH V5 3/4] defconfig: arm64: add i.MX system controller thermal support Thread-Index: AQHUmEOa6G8xdVf9OE6By+RevjrMkQ== Date: Thu, 20 Dec 2018 09:08:42 +0000 Message-ID: <1545296609-20477-4-git-send-email-Anson.Huang@nxp.com> References: <1545296609-20477-1-git-send-email-Anson.Huang@nxp.com> In-Reply-To: <1545296609-20477-1-git-send-email-Anson.Huang@nxp.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-mailer: git-send-email 2.7.4 x-clientproxiedby: HK0PR03CA0091.apcprd03.prod.outlook.com (2603:1096:203:72::31) To AM6PR0402MB3911.eurprd04.prod.outlook.com (2603:10a6:209:1c::10) x-ms-exchange-messagesentrepresentingtype: 1 x-originating-ip: [119.31.174.66] x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1; AM6PR0402MB3687; 6:Pk8m/+zopApEW4um/QFyfHxg/JGV+i3lEVxQjYWk6axSPDKO1O733M0Uc8UhX/9mgp7N+CsScP7/pWX6svjf/xkpwFbzWQyhjvYv3Ktxqv18JdrtwrGyj4NXkqjF7DAjCg0WovO06ZP6LBpPIyF9lH/hKIDwE90j7rT2VelqEdPYc0odi3OFm/qCEQUIdzrkcha9aqy8NWHULDcUXcSezpw/rl43dJn7QqBRrtmNXja95wR6Hb8H1CGLv4/d00vTGh2DZHg4LLl56kDhl8l/E6qO30AAxCw0j0TI9+ZcBQmF9yFvoA5nUd88OD1xqYeC7lEqyi4xTJHKv5ILIhluWGN47/ul4Psmn5VB6QPhAOASijGciSFhiL5M44YpWa92dNtcuNtiU09pdw7eQCSpa8ufVmrenm6Sr8JwltGWXhjPnCY8gkJ/P/c32XmyBr6XijVyO1yoHFMSwBW/Y8hMPA==; 5:rzXxc96kJJewrIr+C+o71EJQPdLCPbsySSO4VCB8kr2c+N0irflFeJBU4uphx0AziTl91Q8cx+0Fb+9q5kGqO02xsmO8cCUfx0ae0SEIg0OZdcwkMxVx4zGZzsqjFjh0zVz4xM3MtuzgnvGI8Ygcb0lxJn9cpHHTAkEC+sBHRWg=; 7:wTt381GTtl3wDVTacD3ybJzkJ1QAlM8yYQSkXHS7wndhVu6gZytwR1eLzzHzEqxBqnih46NQymoJineXcC1Cr6APhUJflYZzB9fvkvj3G9PMAVcO7RxG6jY0nmtUK8IzkQwutkb5WjV/qwCKnfhrZg== x-ms-office365-filtering-correlation-id: 923f4275-6cac-46cf-81c5-08d6665abc6b x-ms-office365-filtering-ht: Tenant x-microsoft-antispam: BCL:0; PCL:0; RULEID:(2390118)(7020095)(4652040)(8989299)(5600074)(711020)(4618075)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(2017052603328)(7153060)(7193020); SRVR:AM6PR0402MB3687; x-ms-traffictypediagnostic: AM6PR0402MB3687: x-ld-processed: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635,ExtAddr x-microsoft-antispam-prvs: x-ms-exchange-senderadcheck: 1 x-exchange-antispam-report-cfa-test: BCL:0; PCL:0; RULEID:(8211001083)(3230021)(999002)(5005026)(6040522)(2401047)(8121501046)(3231475)(944501520)(52105112)(93006095)(93001095)(3002001)(10201501046)(6055026)(149066)(150057)(6041310)(20161123558120)(20161123560045)(20161123562045)(20161123564045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(201708071742011)(7699051)(76991095); SRVR:AM6PR0402MB3687; BCL:0; PCL:0; RULEID:; SRVR:AM6PR0402MB3687; x-forefront-prvs: 0892FA9A88 x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(136003)(366004)(39860400002)(376002)(346002)(396003)(189003)(199004)(6512007)(316002)(66066001)(97736004)(110136005)(3846002)(106356001)(105586002)(5660300001)(478600001)(2201001)(476003)(4326008)(186003)(446003)(11346002)(39060400002)(486006)(14454004)(2616005)(7416002)(53936002)(256004)(86362001)(99286004)(50226002)(8676002)(6436002)(71200400001)(71190400001)(2501003)(386003)(6506007)(81166006)(36756003)(25786009)(2906002)(305945005)(26005)(52116002)(81156014)(6116002)(76176011)(7736002)(8936002)(6486002)(102836004)(68736007)(6346003)(921003)(1121003); DIR:OUT; SFP:1101; SCL:1; SRVR:AM6PR0402MB3687; H:AM6PR0402MB3911.eurprd04.prod.outlook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; MX:1; A:1; received-spf: None (protection.outlook.com: nxp.com does not designate permitted sender hosts) authentication-results: spf=none (sender IP is ) smtp.mailfrom=anson.huang@nxp.com; x-microsoft-antispam-message-info: ETG7LcAtduSdn4hrL4fR+RH6G5mAOatVJ0uLcTy+9ECgrYyc3sQlAhiWMDbBHu0c9R8HZFtIYyxOg2NXweq4MIrCgFQlQZ2qgzJOR34jcUAWVOAQA0LLiyOEwkUZ8kUZku9/FutmidsF77oD3KqwawtBBSZtNxWRjQw7qh2D6jZnu/kociYT9tl38+9YiKovgJ5LtTLYE8J8RWPtZ3wXO9uczRsZt+O0TOAX8ZfWdLzr2BsUEV5+/15napyd2yq4pbKqeIZtfQtBZM5HaA5AbUr4LSb6/wF8k8q1X9pFjhdAG1lxxIFIMspwOcLK97bB spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM MIME-Version: 1.0 X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 923f4275-6cac-46cf-81c5-08d6665abc6b X-MS-Exchange-CrossTenant-originalarrivaltime: 20 Dec 2018 09:08:42.0960 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM6PR0402MB3687 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20181220_010855_977117_E15EE0BE X-CRM114-Status: GOOD ( 12.10 ) 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: dl-linux-imx 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 This patch enables CONFIG_IMX_SC_THERMAL as module. Signed-off-by: Anson Huang --- No change since V4. --- arch/arm64/configs/defconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/arm64/configs/defconfig b/arch/arm64/configs/defconfig index abd80c5..9f12324 100644 --- a/arch/arm64/configs/defconfig +++ b/arch/arm64/configs/defconfig @@ -376,6 +376,7 @@ CONFIG_SENSORS_RASPBERRYPI_HWMON=m CONFIG_THERMAL_GOV_POWER_ALLOCATOR=y CONFIG_CPU_THERMAL=y CONFIG_THERMAL_EMULATION=y +CONFIG_IMX_SC_THERMAL=m CONFIG_ROCKCHIP_THERMAL=m CONFIG_RCAR_GEN3_THERMAL=y CONFIG_ARMADA_THERMAL=y From patchwork Thu Dec 20 09:08:51 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anson Huang X-Patchwork-Id: 10738703 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 8218313A4 for ; Thu, 20 Dec 2018 09:09:49 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 6F96B2465D for ; Thu, 20 Dec 2018 09:09:49 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 62D8A24BFE; Thu, 20 Dec 2018 09:09:49 +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=-5.2 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.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 0B0012465D for ; Thu, 20 Dec 2018 09:09:49 +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:In-Reply-To:References: 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: List-Owner; bh=NFrmwELcXuGU7m/0dvJ27qAy+Mp5Huxa3iVPSBYy1r4=; b=u67X+2fanxmrHR PsVxohhXQ83IVV8uYBOkNCmG4I6G8SwaZeND9LWu88HyXvyif8ffx70QfVLywXKe9hKrWnyNx4KFf OW9FimtmTedIgTQrYGzHYGa+GI4nk3QCObxqCMh5Mbgv8J8/YxNVK0/TSJu0ah0sGLQjrQRFSJItx YoDQCvKWShT2ARQpUFxQIK9XHuE/imLsaFsizJRDn7b/AvHgBYvfZiwzNRKwsFJeG+oIE0BecSShl R1CojFU9VrL5fl/uGwWGe70WhahR7aSidaYHFu3Lhcf0o1EK2KG1mMdFzvBVTxotBRML36qxVTXuG Xbx2Ixb52ObA+gbgyvzw==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1gZuKt-0001jq-Q6; Thu, 20 Dec 2018 09:09:43 +0000 Received: from mail-eopbgr00043.outbound.protection.outlook.com ([40.107.0.43] helo=EUR02-AM5-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1gZuKN-0000tq-Gc for linux-arm-kernel@lists.infradead.org; Thu, 20 Dec 2018 09:09:20 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nxp.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=S1rSEyn6q7CwN3d37p/rkghbsaXb0Fy33oZ+lBx6sDM=; b=ZydM2PQm1O5udcQ8y6XkMxiaawN/L3E1GejMNjdBiM9RuyPSW0tGat0YcvYjUDrsoQaS2r5fO7Bxnk4v44jZg/8uiGgDlaSBUE/HZ/B6u15gkZl1wThy3vmLnSVG2IAdU27k+1EDTlXdkTPuB3RLjaHIjsnB+7OUEcidGiScDhM= Received: from AM6PR0402MB3911.eurprd04.prod.outlook.com (52.133.30.10) by AM6PR0402MB3687.eurprd04.prod.outlook.com (52.133.28.154) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1446.19; Thu, 20 Dec 2018 09:08:52 +0000 Received: from AM6PR0402MB3911.eurprd04.prod.outlook.com ([fe80::987c:cb59:96c9:6b71]) by AM6PR0402MB3911.eurprd04.prod.outlook.com ([fe80::987c:cb59:96c9:6b71%2]) with mapi id 15.20.1425.025; Thu, 20 Dec 2018 09:08:52 +0000 From: Anson Huang To: "robh+dt@kernel.org" , "mark.rutland@arm.com" , "catalin.marinas@arm.com" , "will.deacon@arm.com" , "rui.zhang@intel.com" , "edubezval@gmail.com" , "daniel.lezcano@linaro.org" , Aisheng Dong , "s.hauer@pengutronix.de" , "shawnguo@kernel.org" , Andy Gross , "arnd@arndb.de" , "horms+renesas@verge.net.au" , "heiko@sntech.de" , "bjorn.andersson@linaro.org" , "enric.balletbo@collabora.com" , "amit.kucheria@linaro.org" , "ezequiel@collabora.com" , "olof@lixom.net" , "devicetree@vger.kernel.org" , "linux-kernel@vger.kernel.org" , "linux-arm-kernel@lists.infradead.org" , "linux-pm@vger.kernel.org" Subject: [PATCH V5 4/4] ARM64: dts: imx: add i.MX8QXP thermal support Thread-Topic: [PATCH V5 4/4] ARM64: dts: imx: add i.MX8QXP thermal support Thread-Index: AQHUmEOgvuU29LOpJkKytGq5wKJFBw== Date: Thu, 20 Dec 2018 09:08:51 +0000 Message-ID: <1545296609-20477-5-git-send-email-Anson.Huang@nxp.com> References: <1545296609-20477-1-git-send-email-Anson.Huang@nxp.com> In-Reply-To: <1545296609-20477-1-git-send-email-Anson.Huang@nxp.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-mailer: git-send-email 2.7.4 x-clientproxiedby: HK0PR03CA0091.apcprd03.prod.outlook.com (2603:1096:203:72::31) To AM6PR0402MB3911.eurprd04.prod.outlook.com (2603:10a6:209:1c::10) x-ms-exchange-messagesentrepresentingtype: 1 x-originating-ip: [119.31.174.66] x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1; AM6PR0402MB3687; 6:WwnwXerYnL77V+PPgxL7sjQULRy6OVvrkQXPajM0vaDa4mXuLgIaxpix/09I89Oevv7Yob9vf3I7UmWv6raXa6i14uxaPAJ39SX/xSV8A4UFZ25tWnIjmywma4ylmYdP7QAUGdyQxswMt/QuJiI828d5G8QHmLGkQQQOlNFkNldmV+5mpC9tp75Y1KrbYnjySaQ5cyBqteYIYbx0LW8JwMUd62rS/pryEISgKVgM+CgjDPkjwUGJ372nXJhvFKmFZhjNUgZRZ43i0qAPjPpg4DAMLpPCOcE/5zhhEq//3VWgS9XkWLEnS1bb2N5ums24tLclRFsljsvEwhzTK4uKfZuFmkNaVerOlhp6t2+SATb4uHr1hyyjiMtIO5JMNsNYIRUfZQNLq1k9VLOHQVoLmskZi0OVBqM4MZPxU0jwHOy2uW625dpNH90f8nTmA3HODrQWY9xJXkxbEsIjRL0S8Q==; 5:jb6276LG7k2YA9/ZTy5xyIBzOPTLHIocdeO1kuPJZSmNywaZXTkkR6bkgfnYbVgxTP/3XUbgnM4tWS785ArjMgYf7Rt4nbU/ngXBH53n3T0Izm6MMvz/UEufnT15DeocK+vDMu/EYzopfCkYSyMZHL3Zr7qAQJgrEjQavCHY3Yg=; 7:Cjm0vUHQ2t+KT9yyqildJzHiV+tEwvdM/PERorCiXUidkHMd5NmwZeSMIuYK+9IySedGn/hfCHTLOEcCTjrMFxJJ9SfIzv+oArASMpzYmL+rBpL7lhOd6+i7KfDVRB/IrM8PsalDDGykyNcpg7YZcg== x-ms-office365-filtering-correlation-id: 97cccc6f-3284-4dc4-834c-08d6665ac29a x-ms-office365-filtering-ht: Tenant x-microsoft-antispam: BCL:0; PCL:0; RULEID:(2390118)(7020095)(4652040)(8989299)(5600074)(711020)(4618075)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(2017052603328)(7153060)(7193020); SRVR:AM6PR0402MB3687; x-ms-traffictypediagnostic: AM6PR0402MB3687: x-ld-processed: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635,ExtAddr x-microsoft-antispam-prvs: x-ms-exchange-senderadcheck: 1 x-exchange-antispam-report-cfa-test: BCL:0; PCL:0; RULEID:(8211001083)(3230021)(999002)(5005026)(6040522)(2401047)(8121501046)(3231475)(944501520)(52105112)(93006095)(93001095)(3002001)(10201501046)(6055026)(149066)(150057)(6041310)(20161123558120)(20161123560045)(20161123562045)(20161123564045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(201708071742011)(7699051)(76991095); SRVR:AM6PR0402MB3687; BCL:0; PCL:0; RULEID:; SRVR:AM6PR0402MB3687; x-forefront-prvs: 0892FA9A88 x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(136003)(366004)(39860400002)(376002)(346002)(396003)(189003)(199004)(6512007)(316002)(66066001)(97736004)(110136005)(3846002)(106356001)(105586002)(5660300001)(478600001)(2201001)(476003)(4326008)(186003)(446003)(11346002)(39060400002)(486006)(14454004)(2616005)(7416002)(53936002)(256004)(86362001)(99286004)(50226002)(8676002)(6436002)(71200400001)(71190400001)(2501003)(386003)(6506007)(81166006)(36756003)(25786009)(2906002)(305945005)(26005)(52116002)(81156014)(6116002)(76176011)(7736002)(8936002)(6486002)(102836004)(68736007)(6346003)(921003)(1121003); DIR:OUT; SFP:1101; SCL:1; SRVR:AM6PR0402MB3687; H:AM6PR0402MB3911.eurprd04.prod.outlook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; MX:1; A:1; received-spf: None (protection.outlook.com: nxp.com does not designate permitted sender hosts) authentication-results: spf=none (sender IP is ) smtp.mailfrom=anson.huang@nxp.com; x-microsoft-antispam-message-info: u9CfbeyH3qPEFES41JaMGqUglYLHOwUFUP7r4uv6fZWJUa4rKuPf24QNyjMeTtOkXOvQFWYdS2crhU0f8zTBPFNuw/yOwlZ6UuJKV+N6FwIHIviOQTvlLa3zc7rZ+D/FUBhRmxHHoykncAmVtI9yXJw1YSm0gIBRDK4l+q/cYnshh0NZ7fXX/6AEkhQctDm23IjIvKhcPV9ABaSsxsF+8aW/lE4KQzl9ctOtDjPk3KcL2unrKW0Fm5q8gCQONnXoAwHHEUR+3VgLVxaWxZmftG38tju6SYndVRMzWciUbFzIWxolysLC1X2CoVs0tvgu spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM MIME-Version: 1.0 X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 97cccc6f-3284-4dc4-834c-08d6665ac29a X-MS-Exchange-CrossTenant-originalarrivaltime: 20 Dec 2018 09:08:52.0631 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM6PR0402MB3687 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20181220_010912_025924_34152248 X-CRM114-Status: GOOD ( 11.65 ) 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: dl-linux-imx 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.MX8QXP CPU thermal zone support. Signed-off-by: Anson Huang --- No change since V4. --- arch/arm64/boot/dts/freescale/imx8qxp.dtsi | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/arch/arm64/boot/dts/freescale/imx8qxp.dtsi b/arch/arm64/boot/dts/freescale/imx8qxp.dtsi index 9b08688..48f622c 100644 --- a/arch/arm64/boot/dts/freescale/imx8qxp.dtsi +++ b/arch/arm64/boot/dts/freescale/imx8qxp.dtsi @@ -9,6 +9,7 @@ #include #include #include +#include #include "imx8-ca35.dtsi" @@ -87,6 +88,12 @@ rtc: rtc { compatible = "fsl,imx8qxp-sc-rtc"; }; + + tsens: thermal-sensor { + compatible = "fsl,imx8qxp-sc-thermal"; + tsens-num = <1>; + #thermal-sensor-cells = <1>; + }; }; adma_subsys: bus@59000000 { @@ -410,4 +417,24 @@ #size-cells = <1>; ranges = <0x5f000000 0x0 0x5f000000 0x1000000>; }; + + thermal_zones: thermal-zones { + cpu-thermal0 { + polling-delay-passive = <250>; + polling-delay = <2000>; + thermal-sensors = <&tsens 355>; + trips { + cpu_alert0: trip0 { + temperature = <107000>; + hysteresis = <2000>; + type = "passive"; + }; + cpu_crit0: trip1 { + temperature = <127000>; + hysteresis = <2000>; + type = "critical"; + }; + }; + }; + }; };