From patchwork Wed Nov 28 05:58:15 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anson Huang X-Patchwork-Id: 10701983 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 3E76A13A4 for ; Wed, 28 Nov 2018 05:58:56 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 2D2722C81F for ; Wed, 28 Nov 2018 05:58:56 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 200C72C8B8; Wed, 28 Nov 2018 05:58: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 B55A32C81F for ; Wed, 28 Nov 2018 05:58: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=ZGnKvKakeGycxv0Lm6DYyqt6Vi5zb8GKzJZEyo7xtAU=; b=KIojWTNy91CkuQ y8cK/K0SfjGzKLACbGa/GG0VBrRQ3KDvZtcyKTheybun4xDBjGl0paNST4u9ke2ePN7NQj91ulsu0 1F2iYQ5GQ64RVrOoRA2IF7BuRoJgvopfkRlnAwedxA57v0jXvuiWF86f8SpI8YNdC2c3chRyJn6N3 ZzHeoCat2lFB8I+zGUW8U8MEHSNtsTIe/Os9Lf21DmXpSFD2fqRYtiAH+hJa5NXvAbzBvePNvB/fE ZdA1rZp8tJqjtvkXp/TZaN7p1G0D8MZwYBolJDg7FNXt3JRAGpK/lhcW61UJG/Kp+CGnAPIKSeGsF RSFMsZdSlh6+XO/M4Xzg==; 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 1gRss3-00075f-RZ; Wed, 28 Nov 2018 05:58:47 +0000 Received: from mail-he1eur02on0605.outbound.protection.outlook.com ([2a01:111:f400:fe05::605] helo=EUR02-HE1-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1gRsrm-0006kF-H2 for linux-arm-kernel@lists.infradead.org; Wed, 28 Nov 2018 05:58:33 +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=GdA22i/JHn+4EXFZPF+bLvxmnKtV3zj0o610sysdsos=; b=Ly53zJik2hdIqD30Zsgu/raDwEa7XSLQZLeLwxnaukRhiDykVrIvriWErUkMf0acRiT/LAgBkN42mCKIjY5T79DRThg7vJNF7JvFvuKwncAG6nAGm8Xhq/I3YTHdf8xUnQAlCj/28jxqpTRqQvHVT/wfSGkkbjl4rBaqAzjJw9I= Received: from DB3PR0402MB3916.eurprd04.prod.outlook.com (52.134.72.18) by DB3PR0402MB3691.eurprd04.prod.outlook.com (52.134.66.150) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1361.19; Wed, 28 Nov 2018 05:58:15 +0000 Received: from DB3PR0402MB3916.eurprd04.prod.outlook.com ([fe80::adf8:f49d:deb4:58fd]) by DB3PR0402MB3916.eurprd04.prod.outlook.com ([fe80::adf8:f49d:deb4:58fd%2]) with mapi id 15.20.1361.019; Wed, 28 Nov 2018 05:58:15 +0000 From: Anson Huang To: "rui.zhang@intel.com" , "edubezval@gmail.com" , "daniel.lezcano@linaro.org" , "robh+dt@kernel.org" , "mark.rutland@arm.com" , "catalin.marinas@arm.com" , "will.deacon@arm.com" , Aisheng DONG , Andy Gross , "heiko@sntech.de" , "horms+renesas@verge.net.au" , "arnd@arndb.de" , "amit.kucheria@linaro.org" , "enric.balletbo@collabora.com" , "ezequiel@collabora.com" , "olof@lixom.net" , "bjorn.andersson@linaro.org" , "linux-pm@vger.kernel.org" , "devicetree@vger.kernel.org" , "linux-kernel@vger.kernel.org" , "linux-arm-kernel@lists.infradead.org" , "shawnguo@kernel.org" Subject: [PATCH V2 1/4] dt-bindings: thermal: add binding doc for i.MX system controller thermal driver Thread-Topic: [PATCH V2 1/4] dt-bindings: thermal: add binding doc for i.MX system controller thermal driver Thread-Index: AQHUht9a1xKkI1Q6d0KcGLr3GltEUQ== Date: Wed, 28 Nov 2018 05:58:15 +0000 Message-ID: <1543384349-2851-2-git-send-email-Anson.Huang@nxp.com> References: <1543384349-2851-1-git-send-email-Anson.Huang@nxp.com> In-Reply-To: <1543384349-2851-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: HK0PR03CA0010.apcprd03.prod.outlook.com (2603:1096:203:2e::22) To DB3PR0402MB3916.eurprd04.prod.outlook.com (2603:10a6:8:10::18) 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; DB3PR0402MB3691; 6:qG0a4ls9NmevarYhyAgLPBULorR+e8BT1XsJiXIiHips1qgSvqDwqdTe7SONpnqMz1hewZ9TOBL9y62pHm+YVozS5pMqogGYmOOvU34AJnEp82Uf5bnfyP+34O+PiNoQhYCeoUijkfEnEkv3NZKvYBLOKcCf6OjmBUm2h7ddCRZkGblQM0PCDliQlph9jc5U2HWlTliRk/YGs7CvJdyRodHQmRR4nPkjIqB12pFxR5P6fENjpvZCg9N9GrwyWuF1BQGD6Sij0qA/8rcvvhjGGVDxh3XsyXYV3qHzrpGVboKZpszRy4yun/d63i7Hk5DK573fY8TCqsD+5j2Uj9VgYQmHkV3yVVO4HRnK0h7uNw9GHSI1Tk9690T3ZXd1c95nNsWBYv6wnXu/t+grQj9l0dOIhxwBb7lPrWmuO52OXlKwOPKVfDyAFemQO1a4IIixqDBS+MWNPSnsbpzzA0sNiA==; 5:k11JhmrJcXFIPvdT+Gifrga/t4lX5ee5EsoZn5Ph8lWUVsooKRp0/m+vi52YwT4zDaj5KLK0leuigEc/NCQ9DOPKWzYbLJWkfkGNxySGBW/WmCFlbYozoJyDmi/arsgrqXGC35pdW0N8m2S7jLmV6419A6y9nMnaj3XcFm5j7hw=; 7:newb8pnkq9SIf1ZR5jyqi31i0Pi3FXOlhh8WAFVFrfDfTWlCyxu6gp9sP+qSax0I+cGVINc2efoxIqRoDQ26b6f8nFnqdA5vrLn2BNcZJukWv2UMI6tb+Qhf290eSli9CuqDubyQDIC3pW7AQV6W8Q== x-ms-office365-filtering-correlation-id: a2ae827b-320d-4907-e6a6-08d654f67cbf x-ms-office365-filtering-ht: Tenant x-microsoft-antispam: BCL:0; PCL:0; RULEID:(2390098)(7020095)(4652040)(8989299)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(5600074)(711020)(4618075)(2017052603328)(7153060)(7193020); SRVR:DB3PR0402MB3691; x-ms-traffictypediagnostic: DB3PR0402MB3691: 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)(6040522)(2401047)(5005006)(8121501046)(3231443)(944501410)(52105112)(3002001)(10201501046)(93006095)(93001095)(6055026)(148016)(149066)(150057)(6041310)(20161123560045)(20161123564045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123558120)(20161123562045)(201708071742011)(7699051)(76991095); SRVR:DB3PR0402MB3691; BCL:0; PCL:0; RULEID:; SRVR:DB3PR0402MB3691; x-forefront-prvs: 0870212862 x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(136003)(39860400002)(346002)(396003)(366004)(376002)(199004)(189003)(256004)(99286004)(36756003)(575784001)(81156014)(2201001)(2501003)(110136005)(86362001)(76176011)(97736004)(6436002)(14454004)(316002)(386003)(68736007)(50226002)(486006)(39060400002)(52116002)(8936002)(81166006)(6506007)(71200400001)(2906002)(11346002)(71190400001)(2616005)(476003)(6486002)(7736002)(305945005)(7416002)(102836004)(53936002)(186003)(478600001)(3846002)(6512007)(105586002)(5660300001)(106356001)(26005)(6116002)(446003)(25786009)(66066001)(8676002)(4326008)(921003)(1121003); DIR:OUT; SFP:1101; SCL:1; SRVR:DB3PR0402MB3691; H:DB3PR0402MB3916.eurprd04.prod.outlook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; A:1; MX:1; received-spf: None (protection.outlook.com: nxp.com does not designate permitted sender hosts) x-microsoft-antispam-message-info: V87dKD8tcf43kPgQZEYAEya+urV9rbBgOlcAOvXlRwkLNColTCaKmPhEQCt3sapaRQrofCXNsqn4eLcTpnkVAfWPTfcFL2HiG54dB5SUnMZ51uthLb9yfYtY5+0Hf22lwsvQA9wpU7TGmoqd71eupTWAhdM+dSgFDSsrr9GO2P9Nye+EoEo+FudCQqHEAvGCT4IIk4H2kd2KiXH1P2n+BluhUh9jQ20iBv8xEM279GbObkLdODtTYGj/onCOZDSX6KJ9h1xdBBe9J2sZz4aHt5dslwpET6ooGdax+8aWlbPExhBZzmGQ7DmSW1Y69TWmxx2SLyevvo0jHS607Gf7fEhjMc/rHFRPe9Lf85Tq43Q= spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM MIME-Version: 1.0 X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: a2ae827b-320d-4907-e6a6-08d654f67cbf X-MS-Exchange-CrossTenant-originalarrivaltime: 28 Nov 2018 05:58:15.3486 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB3PR0402MB3691 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20181127_215831_108458_D347E8B6 X-CRM114-Status: GOOD ( 14.49 ) 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 --- no change since V1. .../devicetree/bindings/thermal/imx-sc-thermal.txt | 33 ++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 Documentation/devicetree/bindings/thermal/imx-sc-thermal.txt diff --git a/Documentation/devicetree/bindings/thermal/imx-sc-thermal.txt b/Documentation/devicetree/bindings/thermal/imx-sc-thermal.txt new file mode 100644 index 0000000..2f5b0a2 --- /dev/null +++ b/Documentation/devicetree/bindings/thermal/imx-sc-thermal.txt @@ -0,0 +1,33 @@ +* Temperature Monitor (TEMPMON) on NXP i.MX SoCs with System Controller + +Required properties: +- compatible : Must be "nxp,imx8qxp-sc-thermal"; +- tsens-num : Total number of thermal sensors supported; +- #thermal-sensor-cells : Should be 1. See ./thermal.txt for a description. + +Example: +tsens: thermal-sensor { + compatible = "nxp,imx8qxp-sc-thermal"; + tsens-num = <1>; + #thermal-sensor-cells = <1>; +}; + +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"; + }; + }; + }; +}; From patchwork Wed Nov 28 05:58:22 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anson Huang X-Patchwork-Id: 10701997 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 E7108181D for ; Wed, 28 Nov 2018 06:09:41 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id D2D3A2C729 for ; Wed, 28 Nov 2018 06:09:41 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id C5CB32C83D; Wed, 28 Nov 2018 06:09:41 +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 265092C729 for ; Wed, 28 Nov 2018 06:09:41 +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=75M9o5ii9jNCvTKyMsylr8XKLKMlnfASSecj3TATY9A=; b=igf7ZkRbhiJixq l4nV95uOS5sJdcJdMVGRVVGhb7+YLCn5GIt3iMNwlI2a5o3gagQAlMg4J46WiskiFHz3SvH7Dum+/ OeZRk0xDyVNVOf+c5akIhxC80Dx4hoEOVrBs+lr8e3z9OLR1GfGouMjK1/OMiEEBroTRKmtE9qi/f 47Yf1pXjLImqSVExFbCJlvgcAk7clb1AyJ0j3YQMFO5BsMH1GdVszXOLjfHQxUtiI5Wiwt9jSw4AP fa6kTwzlAz0X3qnmhuy/zdF+7ogblESKDvR8bebuB/rFwFWm6O+JH4bQd2rpChQBVZwSu8tjBbStN oMqvRqeOoHKPJsN2zKXw==; 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 1gRt2Z-0003hs-RJ; Wed, 28 Nov 2018 06:09:39 +0000 Received: from mail-he1eur02on0605.outbound.protection.outlook.com ([2a01:111:f400:fe05::605] helo=EUR02-HE1-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1gRsrq-0006kF-Id for linux-arm-kernel@lists.infradead.org; Wed, 28 Nov 2018 05:58:42 +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=mXITK8zdpGCkd7+ESa1whia23Z7lsL/ZxE0F2GkzYGs=; b=AIe6w8T1s6R1J5SwlNEmNP3/pRYqpnXlOfUJDHTGriC5xrRdntyYy4G0tkmITFlMMglFveMKynFsGrE2O1wsDEic1E+QTv4rIC4H020YkLiepp7RL+ZftFmIjB26DE44053HGECUmblZrCxyUU/jKRK0wvRIOCnmiXmHJKhI7NI= Received: from DB3PR0402MB3916.eurprd04.prod.outlook.com (52.134.72.18) by DB3PR0402MB3691.eurprd04.prod.outlook.com (52.134.66.150) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1361.19; Wed, 28 Nov 2018 05:58:22 +0000 Received: from DB3PR0402MB3916.eurprd04.prod.outlook.com ([fe80::adf8:f49d:deb4:58fd]) by DB3PR0402MB3916.eurprd04.prod.outlook.com ([fe80::adf8:f49d:deb4:58fd%2]) with mapi id 15.20.1361.019; Wed, 28 Nov 2018 05:58:22 +0000 From: Anson Huang To: "rui.zhang@intel.com" , "edubezval@gmail.com" , "daniel.lezcano@linaro.org" , "robh+dt@kernel.org" , "mark.rutland@arm.com" , "catalin.marinas@arm.com" , "will.deacon@arm.com" , Aisheng DONG , Andy Gross , "heiko@sntech.de" , "horms+renesas@verge.net.au" , "arnd@arndb.de" , "amit.kucheria@linaro.org" , "enric.balletbo@collabora.com" , "ezequiel@collabora.com" , "olof@lixom.net" , "bjorn.andersson@linaro.org" , "linux-pm@vger.kernel.org" , "devicetree@vger.kernel.org" , "linux-kernel@vger.kernel.org" , "linux-arm-kernel@lists.infradead.org" , "shawnguo@kernel.org" Subject: [PATCH V2 2/4] thermal: imx_sc: add i.MX system controller thermal support Thread-Topic: [PATCH V2 2/4] thermal: imx_sc: add i.MX system controller thermal support Thread-Index: AQHUht9eRTVB30Mg4kO37c4HVmgbQQ== Date: Wed, 28 Nov 2018 05:58:22 +0000 Message-ID: <1543384349-2851-3-git-send-email-Anson.Huang@nxp.com> References: <1543384349-2851-1-git-send-email-Anson.Huang@nxp.com> In-Reply-To: <1543384349-2851-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: HK0PR03CA0010.apcprd03.prod.outlook.com (2603:1096:203:2e::22) To DB3PR0402MB3916.eurprd04.prod.outlook.com (2603:10a6:8:10::18) 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; DB3PR0402MB3691; 6:qcysw8PBSo8pMKFT7U67QOJBkbBq5kQLJLpcIAHvGlcRB17RdblKO3TZLQj7GMNHAjfyE4Mwt0OSqT4pX6KbdGcPg3f2a+noPthQ3RkyOJfezsw8hrjWbHW8xUes7TSQR1MJkTzYab2926KRHpHDeWs+PeIvB3Fm3934s4AV8ydRmjyWHMQrvVpDjd6tGlelM80LDqxlZCeNsLe+bI4/dxV894d9jNbcxbq56chg2xmLtdVGjpbsJH/je3U+7cXJBFLaWQQ038qFy2vMYJ3uP7/nofTxUBkgmDG9gYwOwPxZsLohUmEf2DOssvdPDo25c1WjIowhmEW6g8cefs+9N5wnZ2SMpBK2Wkkf80W+8fIU2ustbYOqTy0mIGITaF/pqZztopuOfYvGTri/HXnQfGoKFNDUTPl71hkuyF17aLXfkfDcuaXZ0JcwWdjb+or/NuMtYhp/WPyHBO3T10gggA==; 5:OdYjaKsWy2DKkNBhBHdWfe0EARLSaG+Zc11mqNClYZY8vpK+/2PGIO/2sTsT3gMQCi2VLaPoIfDN0nDgiaiP+KqfBs1XgvAR4KJpCSjZchBLUiaSaQ5mgHXSr8dvjg4ZRnOjqC4Qz0JQodR3HywtFuErbmTbQLVs3RDFzTFONFQ=; 7:spkXV5Uvuvpgb6zzzBke4NQjxxHLfWf4+J3lfi5uu6ny3LiAY830CdDEPEb2uPKypSlLaz6jDnFodttGFCCNpefTFEaltV7TNi1HnVEskiRowxrr4HqnW47E5JMaV+fxm/LljP1hFqGpkHnr6n6f1Q== x-ms-office365-filtering-correlation-id: fc6f2ee4-839d-4c50-3ecd-08d654f68106 x-ms-office365-filtering-ht: Tenant x-microsoft-antispam: BCL:0; PCL:0; RULEID:(2390098)(7020095)(4652040)(8989299)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(5600074)(711020)(4618075)(2017052603328)(7153060)(7193020); SRVR:DB3PR0402MB3691; x-ms-traffictypediagnostic: DB3PR0402MB3691: 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)(6040522)(2401047)(5005006)(8121501046)(3231443)(944501410)(52105112)(3002001)(10201501046)(93006095)(93001095)(6055026)(148016)(149066)(150057)(6041310)(20161123560045)(20161123564045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123558120)(20161123562045)(201708071742011)(7699051)(76991095); SRVR:DB3PR0402MB3691; BCL:0; PCL:0; RULEID:; SRVR:DB3PR0402MB3691; x-forefront-prvs: 0870212862 x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(136003)(39860400002)(346002)(396003)(366004)(376002)(199004)(189003)(256004)(99286004)(14444005)(36756003)(81156014)(2201001)(2501003)(110136005)(86362001)(76176011)(97736004)(6436002)(14454004)(316002)(386003)(68736007)(50226002)(486006)(39060400002)(52116002)(8936002)(81166006)(6506007)(71200400001)(2906002)(11346002)(71190400001)(2616005)(476003)(6486002)(7736002)(305945005)(7416002)(102836004)(53936002)(186003)(478600001)(3846002)(6512007)(105586002)(5660300001)(106356001)(26005)(6116002)(446003)(25786009)(66066001)(8676002)(4326008)(921003)(1121003); DIR:OUT; SFP:1101; SCL:1; SRVR:DB3PR0402MB3691; H:DB3PR0402MB3916.eurprd04.prod.outlook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; A:1; MX:1; received-spf: None (protection.outlook.com: nxp.com does not designate permitted sender hosts) x-microsoft-antispam-message-info: pCgQvC4HJHYka9TP20bhAYgyt57lvAhEgIziAXld8YJ47WWL/mcpJyDMYLugrzksvJHXDqsuLO8GF0gYhG7Z9okO8jpR2QzckIFJg4up114QcFZq1c3WzQJiPHo+RPa0zQoEp1LbL5dC7taE7wgq0bxoig3i3DR3BytX5nzGmI4IAhuuq0kLWTWUftYdSPH2TKWb+HyajAnCDC23GvEpTly+CYg4fj1zJ7B2U3jFg07a4jjnNlDuAajXfIcg8b8Nx6KjPp183C15PBDG2FGThsF4vJSVWKvBQYvPlWWleCZ6O+yCSvqhtUgJTW3N8o8t2Kbn/+jMm5+PHcak+No8ceQksKS/ra1Vyxp3BgrX5w8= spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM MIME-Version: 1.0 X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: fc6f2ee4-839d-4c50-3ecd-08d654f68106 X-MS-Exchange-CrossTenant-originalarrivaltime: 28 Nov 2018 05:58:22.5362 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB3PR0402MB3691 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20181127_215835_010027_1E2024EB X-CRM114-Status: GOOD ( 22.90 ) 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 --- changes since V1: remove boiler plate license text; remove unnecessary kfree during probe; remove build warning of comparing unsigned int with < 0; drivers/thermal/Kconfig | 11 +++ drivers/thermal/Makefile | 1 + drivers/thermal/imx_sc_thermal.c | 201 +++++++++++++++++++++++++++++++++++++++ 3 files changed, 213 insertions(+) create mode 100644 drivers/thermal/imx_sc_thermal.c diff --git a/drivers/thermal/Kconfig b/drivers/thermal/Kconfig index 0e69edc..84e850c 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 || 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..890537f --- /dev/null +++ b/drivers/thermal/imx_sc_thermal.c @@ -0,0 +1,201 @@ +// 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 + +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 imx_sc_msg_req_misc_get_temp { + struct imx_sc_rpc_msg hdr; + u16 resource_id; + u8 type; +} __packed; + +struct imx_sc_msg_resp_misc_get_temp { + struct imx_sc_rpc_msg hdr; + u16 celsius; + u8 tenths; +} __packed; + +static int imx_sc_thermal_get_temp(void *data, int *temp) +{ + struct imx_sc_msg_resp_misc_get_temp *resp; + struct imx_sc_msg_req_misc_get_temp msg; + struct imx_sc_rpc_msg *hdr = &msg.hdr; + struct imx_sc_sensor *sensor = data; + int ret; + + msg.resource_id = sensor->resource_id; + msg.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; + } + + resp = (struct imx_sc_msg_resp_misc_get_temp *)&msg; + *temp = resp->celsius * 1000 + 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 -EINVAL; + } + + 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) { + if (ret == -EPROBE_DEFER) + return ret; + + dev_err(&pdev->dev, "failed to get ipc handle: %d!\n", 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 = "nxp,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 Wed Nov 28 05:58:29 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anson Huang X-Patchwork-Id: 10701989 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 D8D4213A4 for ; Wed, 28 Nov 2018 05:59:32 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id C780F2CBFA for ; Wed, 28 Nov 2018 05:59:32 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id BB0C82CC59; Wed, 28 Nov 2018 05:59:32 +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 7165B2CBFA for ; Wed, 28 Nov 2018 05:59:32 +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=MaZMSCvB8hYmhB06+qgW6rEUDaaKq/4BFPKelf3DavE=; b=NYLgue33uVB7pb LAsN4Kh3KW6ntevLvHN2zGOOF2JnCU2rxCUzivA8Sg8TAhWTWxV/2PYSTNCS79Z6dZvlO1Zz1+WXc L3qBQ/ct3SXn3f03SB2DR7TvRuP4vW7UWCWTWIlk+PAcQ4Zfyh5nLLS1/M3xY9NR6/po9yO2Bgeex 2kMgkYXiWjNPxMe268kacoiyBPsWBrbKM0pDJeW9isoAF4xpqUnw2GYbJjpBxw5CHawHVQG3sN9+b Cc0Dus1f8+ECKwuWr8tNJLDqj2odFvbNgTRf6M+ZkciHbXSsnapOgK0KyPSXIW9N4k6NR8QV2+yk7 X3GdO3C/fGSedKq1wjOg==; 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 1gRssj-0007k8-GI; Wed, 28 Nov 2018 05:59:29 +0000 Received: from mail-eopbgr10072.outbound.protection.outlook.com ([40.107.1.72] helo=EUR02-HE1-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1gRsrz-0006pS-CU for linux-arm-kernel@lists.infradead.org; Wed, 28 Nov 2018 05:58:45 +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=sqkwAEgWvhvnxmFTFIVywPlME1oqixxzGKxhU1FSNas=; b=xAZw+PIkv4PZkroxK4U5lZGZF9+KqK3omiNlZ3fzwk6o3n60lMknf1ju3i/wFbR73XWkS1Rggmwg9QylQcr1iuaUKrg+iQVClDcH2IcxLKZQ0x1yFXva9rTXk6W/3/op44z3LJNT4pW0OBw/If59vhlDSlzItEWBSULbSQ/ffpU= Received: from DB3PR0402MB3916.eurprd04.prod.outlook.com (52.134.72.18) by DB3PR0402MB3738.eurprd04.prod.outlook.com (52.134.70.145) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1294.27; Wed, 28 Nov 2018 05:58:29 +0000 Received: from DB3PR0402MB3916.eurprd04.prod.outlook.com ([fe80::adf8:f49d:deb4:58fd]) by DB3PR0402MB3916.eurprd04.prod.outlook.com ([fe80::adf8:f49d:deb4:58fd%2]) with mapi id 15.20.1361.019; Wed, 28 Nov 2018 05:58:29 +0000 From: Anson Huang To: "rui.zhang@intel.com" , "edubezval@gmail.com" , "daniel.lezcano@linaro.org" , "robh+dt@kernel.org" , "mark.rutland@arm.com" , "catalin.marinas@arm.com" , "will.deacon@arm.com" , Aisheng DONG , Andy Gross , "heiko@sntech.de" , "horms+renesas@verge.net.au" , "arnd@arndb.de" , "amit.kucheria@linaro.org" , "enric.balletbo@collabora.com" , "ezequiel@collabora.com" , "olof@lixom.net" , "bjorn.andersson@linaro.org" , "linux-pm@vger.kernel.org" , "devicetree@vger.kernel.org" , "linux-kernel@vger.kernel.org" , "linux-arm-kernel@lists.infradead.org" , "shawnguo@kernel.org" Subject: [PATCH V2 3/4] defconfig: arm64: add i.MX system controller thermal support Thread-Topic: [PATCH V2 3/4] defconfig: arm64: add i.MX system controller thermal support Thread-Index: AQHUht9jLUta/RsnpkWkiU5k9aqvsg== Date: Wed, 28 Nov 2018 05:58:29 +0000 Message-ID: <1543384349-2851-4-git-send-email-Anson.Huang@nxp.com> References: <1543384349-2851-1-git-send-email-Anson.Huang@nxp.com> In-Reply-To: <1543384349-2851-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: HK0PR03CA0010.apcprd03.prod.outlook.com (2603:1096:203:2e::22) To DB3PR0402MB3916.eurprd04.prod.outlook.com (2603:10a6:8:10::18) 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; DB3PR0402MB3738; 6:2KLgwMg9xpvu+Q74Wf2BEJq7NjaV04le6nVQGIwJ8za6yFSKJyyvliKAcsyYvOUu4Zd9VRRM5vNGY/TtTMG55I1ZOD1gZcu4qiFYPykf/nZ5Znjas0KLT+UXgBgnayhYZ1URfw7h4nvmquuIgYoUObeWX8nLy4yMCL2Kq6NhNCzCrqKXiri4154FKfZmIlbPzuFOhLP0/tuRzDN2SJQwBbARqgZ6cNGzKQARTDFVIgT7N4rGWWJ5OmlCUNHtECQhLuwGu9OGY3iGRnLjTXZV2m8VugPbn1PZp8cWabzOJGGtl+WzaA959vbutz+S4TUDDMYlxEzGg3ej0Zyd+U2cqTI/JRw2aK+dA8iG/vOituQhjtT2wBxHn4cWN3sovC/FK0m4DhqhCQKTFf4WsEoYxaV0OKzuIusKuYalxIMwlahSER3lx0Bj94XoA0GRW1gEX4d6U1SUh6aUsJ7o5yggJg==; 5:w79Ooy0sVy13pImRJ4kAojNJ0Q2XjS+//6ecZtZQ4LT6Nh1ElrI45VVTQaHNHvp2uBpxDNg6oVisYrn8LqWNbFHeWCUUXIvOPtIktjGI4QOIGyDPgeiuQX3aAbHZH8TLFqSAsNPSZMrGkMWVgRoh/wTNAR4VHyXlTceoXLsm+BQ=; 7:gIK3v6yTo9MvP93AB94NAhEdphkFXHqGnOn+JqDgFdyw7R7zZohdeC+QE4f5Svw6pr6iS/Ctmp0FGtJV8BC8C9+Mz/BJSQeGMWRc7pCYRu7leRwJxBPRdry1P4dh6D3HabGhgjvcXuW+eQbp+WoLqA== x-ms-office365-filtering-correlation-id: a2f0e082-55e4-4879-bdfc-08d654f68553 x-ms-office365-filtering-ht: Tenant x-microsoft-antispam: BCL:0; PCL:0; RULEID:(2390098)(7020095)(4652040)(8989299)(5600074)(711020)(4618075)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(2017052603328)(7153060)(7193020); SRVR:DB3PR0402MB3738; x-ms-traffictypediagnostic: DB3PR0402MB3738: x-ld-processed: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635,ExtAddr x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:(185117386973197); x-ms-exchange-senderadcheck: 1 x-exchange-antispam-report-cfa-test: BCL:0; PCL:0; RULEID:(8211001083)(6040522)(2401047)(8121501046)(5005006)(3231443)(944501410)(52105112)(93006095)(93001095)(10201501046)(3002001)(6055026)(148016)(149066)(150057)(6041310)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123560045)(20161123562045)(20161123558120)(20161123564045)(201708071742011)(7699051)(76991095); SRVR:DB3PR0402MB3738; BCL:0; PCL:0; RULEID:; SRVR:DB3PR0402MB3738; x-forefront-prvs: 0870212862 x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(39860400002)(346002)(396003)(366004)(136003)(376002)(199004)(189003)(305945005)(97736004)(2201001)(86362001)(6486002)(7416002)(106356001)(99286004)(6436002)(2906002)(105586002)(25786009)(4326008)(3846002)(6116002)(478600001)(110136005)(256004)(316002)(7736002)(8936002)(71200400001)(50226002)(5660300001)(81166006)(186003)(102836004)(66066001)(81156014)(68736007)(486006)(14454004)(53936002)(11346002)(386003)(6506007)(6512007)(76176011)(36756003)(52116002)(446003)(476003)(2616005)(71190400001)(8676002)(2501003)(26005)(39060400002)(921003)(1121003); DIR:OUT; SFP:1101; SCL:1; SRVR:DB3PR0402MB3738; H:DB3PR0402MB3916.eurprd04.prod.outlook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; A:1; MX:1; received-spf: None (protection.outlook.com: nxp.com does not designate permitted sender hosts) x-microsoft-antispam-message-info: RWxh03V21V+iPr6EdtBg9UDa/PXwfJczREh7MOnJWXXY05aSGF5tWY6MVAex69k5pxKpahOcaUPPMlhggXRKaHqL3b/bxY9r1MbmaYSk2AzENbGKZ7gyG0ND6afW00D2mbjoOF3CuO5BqLMbj4ZidSp+rvQIb8ougJE0iVP2O310DZZtJudyEzToQQug4XbVd//Ql6BsWFnBBPTl7P2Qm0A5TX8qmfoTy3PG9972X/zxLl1vk8/U32FCeEGWRY7tdO1dISH7E1E79qtWgnFt2drEIY1WJEFIo8qCDvgRE/7VsS8qw/IbMLOM3V+DQbynSCRNM3DvJ/qJmB0Yf78iWL/E29T0qPVdqN/0yggLmt4= spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM MIME-Version: 1.0 X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: a2f0e082-55e4-4879-bdfc-08d654f68553 X-MS-Exchange-CrossTenant-originalarrivaltime: 28 Nov 2018 05:58:29.8955 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB3PR0402MB3738 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20181127_215843_442753_45B49982 X-CRM114-Status: GOOD ( 12.45 ) 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 --- 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 Wed Nov 28 05:58:37 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anson Huang X-Patchwork-Id: 10701987 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 60787181D for ; Wed, 28 Nov 2018 05:59:23 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 4EA4E2CB4C for ; Wed, 28 Nov 2018 05:59:23 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 42C952CBFA; Wed, 28 Nov 2018 05:59:23 +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 E3A532CB4C for ; Wed, 28 Nov 2018 05:59:22 +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=lUu/KWTarBW+uARs10Uu+rA4B0Tngr+cROOrWOpdt9w=; b=PZce93L+/1GRJ/ wIKNEkBR8BO2J8a0mXC07+R27hAe92np140GPtNQNj2FmHP+2GwJ29u3ZlQdQCTLdSsp4LqqfCOUE j0zWsASiTxDZixrdv9D1QXt9F/3FNIB4DYHabqYDuZPysTtTwDQ/qfChRQ5RvR6DIlRqMtIX6eZDy /IHZETJeBs8Nt8EGsptQ9x/d0iZ22HTKPoRqOVDXlgR+J3GKGMWGcnB4Y8zyx1bx1HyADcCabmgZs ZCUV8o2D2IPt8jbljfsAioN9/D5R8d1k35u+VSGyZR+VTR3eRZT2fZHvJ9ikOYZXufshfO+xKMkFD /hJY5qGIGwLkhxl8CXqQ==; 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 1gRssU-0007Vf-Ar; Wed, 28 Nov 2018 05:59:14 +0000 Received: from mail-he1eur02on0605.outbound.protection.outlook.com ([2a01:111:f400:fe05::605] helo=EUR02-HE1-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1gRsrz-0006kF-1j for linux-arm-kernel@lists.infradead.org; Wed, 28 Nov 2018 05:58:44 +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=1oqxe7s4vGNNPngRHR5XMEZndCvHR7d+uhQLiDY9qPk=; b=bCXXCnj0v+hApaXQ8sqgphhrvURhLUsxPAlJtfn1Ia8jwKU8+DZv93a9sUiqAeH/dUXUN1scX/th3mHrDG3gViDMup1AK0C1VoC7kuiI7/12/yFpct65xgosUJWjcKQmtowlb9lC5RVFno5uwIBek5I5whE29XGYaezRZ82wsmY= Received: from DB3PR0402MB3916.eurprd04.prod.outlook.com (52.134.72.18) by DB3PR0402MB3691.eurprd04.prod.outlook.com (52.134.66.150) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1361.19; Wed, 28 Nov 2018 05:58:37 +0000 Received: from DB3PR0402MB3916.eurprd04.prod.outlook.com ([fe80::adf8:f49d:deb4:58fd]) by DB3PR0402MB3916.eurprd04.prod.outlook.com ([fe80::adf8:f49d:deb4:58fd%2]) with mapi id 15.20.1361.019; Wed, 28 Nov 2018 05:58:37 +0000 From: Anson Huang To: "rui.zhang@intel.com" , "edubezval@gmail.com" , "daniel.lezcano@linaro.org" , "robh+dt@kernel.org" , "mark.rutland@arm.com" , "catalin.marinas@arm.com" , "will.deacon@arm.com" , Aisheng DONG , Andy Gross , "heiko@sntech.de" , "horms+renesas@verge.net.au" , "arnd@arndb.de" , "amit.kucheria@linaro.org" , "enric.balletbo@collabora.com" , "ezequiel@collabora.com" , "olof@lixom.net" , "bjorn.andersson@linaro.org" , "linux-pm@vger.kernel.org" , "devicetree@vger.kernel.org" , "linux-kernel@vger.kernel.org" , "linux-arm-kernel@lists.infradead.org" , "shawnguo@kernel.org" Subject: [PATCH V2 4/4] ARM64: dts: imx: add i.MX8QXP thermal support Thread-Topic: [PATCH V2 4/4] ARM64: dts: imx: add i.MX8QXP thermal support Thread-Index: AQHUht9nQ3rqL9kbMEarCmiJf6cpTQ== Date: Wed, 28 Nov 2018 05:58:37 +0000 Message-ID: <1543384349-2851-5-git-send-email-Anson.Huang@nxp.com> References: <1543384349-2851-1-git-send-email-Anson.Huang@nxp.com> In-Reply-To: <1543384349-2851-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: HK0PR03CA0010.apcprd03.prod.outlook.com (2603:1096:203:2e::22) To DB3PR0402MB3916.eurprd04.prod.outlook.com (2603:10a6:8:10::18) 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; DB3PR0402MB3691; 6:iLR4BfFMHitUxfHh2L0UNoZ8EbNVBGE2oiQ+tJdfn2bLvLQcdeidNQKhDQiBsK6vPy9HJkCW7kHaRgPlw0y8rnkgXI1wD8YOW3Lp00q+GYyjTU+C2MBXxUgUOybQmEheAFUD+pzA783Ploethxslbvo+u17JYt1SCcNAj0+0bP6VjegVT9R4LvV5/EoSqp3Nzog7vXG65GkPY99SeKXhZbkt7mAthV/Hc/ncvztSNkOk7a+uuKoQgNF9e8l5fSRy8da83s9ZW+xpYNZ5P46VliRcmYHKDKDCFmH3zm3Tqd7WRbS2UAicZgvWqOLJTS7kCkRBFrBiJO7pggTQeSkwHwMtEnEMmh7orsGcvJzVUHRV6jcpdjfIz3wcpffcdJfAZDrKeem+sfEhxjw+tiMq8Hhr0n76EuUbVZnGfk7bN1TOkrrlxNzNC99hLzEs5rLyfviS7S5M9L5cfzO87rqE6Q==; 5:imtCQBOBhNg98BAcwqUvKKoxvS0q0s+Eur0/RNCFWhRxoJul8oPNHcu91EGJeBkM0XALt/ta7udkzxoivnAbauOVcyiRKY4Si16KDULdRpT2MD3nJCgx2f8sivwS//sFOBWcmrTlHthEgrGstH9ITIFRTSCnImfPPmp2W7KdIBc=; 7:nOCqjzZrkD0ulJHEl+OLpqL5fpjBYKWEsnq63f01X3OiK+r+w04Ex5J8nBOar5248BCiLNWHga7tRovkbZ8ZY/GJmZOnQJGYYX+x6viIpoUs3Eu55t0tx34T1yb5a2tcW0KoORO/NlbmA3Kz6csMwg== x-ms-office365-filtering-correlation-id: 7ae5092e-cdc1-4df9-14ad-08d654f689b9 x-ms-office365-filtering-ht: Tenant x-microsoft-antispam: BCL:0; PCL:0; RULEID:(2390098)(7020095)(4652040)(8989299)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(5600074)(711020)(4618075)(2017052603328)(7153060)(7193020); SRVR:DB3PR0402MB3691; x-ms-traffictypediagnostic: DB3PR0402MB3691: 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)(6040522)(2401047)(5005006)(8121501046)(3231443)(944501410)(52105112)(3002001)(10201501046)(93006095)(93001095)(6055026)(148016)(149066)(150057)(6041310)(20161123560045)(20161123564045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123558120)(20161123562045)(201708071742011)(7699051)(76991095); SRVR:DB3PR0402MB3691; BCL:0; PCL:0; RULEID:; SRVR:DB3PR0402MB3691; x-forefront-prvs: 0870212862 x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(136003)(39860400002)(346002)(396003)(366004)(376002)(199004)(189003)(256004)(99286004)(36756003)(81156014)(2201001)(2501003)(110136005)(86362001)(76176011)(97736004)(6436002)(14454004)(316002)(386003)(68736007)(50226002)(486006)(39060400002)(52116002)(8936002)(81166006)(6506007)(71200400001)(2906002)(11346002)(71190400001)(2616005)(476003)(6486002)(7736002)(305945005)(7416002)(102836004)(53936002)(186003)(478600001)(3846002)(6512007)(105586002)(5660300001)(106356001)(26005)(6116002)(446003)(25786009)(66066001)(8676002)(4326008)(921003)(1121003); DIR:OUT; SFP:1101; SCL:1; SRVR:DB3PR0402MB3691; H:DB3PR0402MB3916.eurprd04.prod.outlook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; A:1; MX:1; received-spf: None (protection.outlook.com: nxp.com does not designate permitted sender hosts) x-microsoft-antispam-message-info: OuTR40zCAsi9oUlX76Yd1vbJcD3CiW4LhFW1vbgEJL+/FGhkN9vdsP9RBGbp1hjU+SbDacy/YZdI5ni+3oajIPzQ8DQL/FqFH6zWABkz1YzdBlY+jkNFyQrMukcvK7W4neoYvdqxmw1DuAc3tA6x/tMCa785m2eweV6996uLLpkEJ6wwEcXXmj1u0VqNRRn4mdBixkmRryKuDEl7eoesf0TJs2zfSuZUDb7YHSFobI5xCRdZRXHtmcs9XR9J4oolJ5xIABT+Vv4J7THrWRpQwED/LqAy/Q1xFPgZufz8NuU7amR1NwtOyoqVI6Lpigm6UdTohomanpfeRV2W0dgL7Yr+ONeBJ4bVWHiMe8W/oao= spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM MIME-Version: 1.0 X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 7ae5092e-cdc1-4df9-14ad-08d654f689b9 X-MS-Exchange-CrossTenant-originalarrivaltime: 28 Nov 2018 05:58:37.3487 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB3PR0402MB3691 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20181127_215843_109893_C82FB248 X-CRM114-Status: GOOD ( 12.71 ) 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 --- 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 5e8b554..ef57db6 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" @@ -85,6 +86,32 @@ }; }; + tsens: thermal-sensor { + compatible = "nxp,imx8qxp-sc-thermal"; + tsens-num = <1>; + #thermal-sensor-cells = <1>; + }; + + 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"; + }; + }; + }; + }; + adma_subsys: bus@59000000 { compatible = "simple-bus"; #address-cells = <1>;