From patchwork Thu Feb 21 06:38:30 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anson Huang X-Patchwork-Id: 10823171 X-Patchwork-Delegate: eduardo.valentin@ti.com 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 CD8D41399 for ; Thu, 21 Feb 2019 06:38:50 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id B8B762EEEF for ; Thu, 21 Feb 2019 06:38:50 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id A993B2EF0E; Thu, 21 Feb 2019 06:38:50 +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=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 205132EEEF for ; Thu, 21 Feb 2019 06:38:50 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1725891AbfBUGit (ORCPT ); Thu, 21 Feb 2019 01:38:49 -0500 Received: from mail-eopbgr50052.outbound.protection.outlook.com ([40.107.5.52]:48404 "EHLO EUR03-VE1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1725932AbfBUGis (ORCPT ); Thu, 21 Feb 2019 01:38:48 -0500 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=5uIf5/BCzdYmNrHTzX4wEXj81QQkIXzS9ewzSz75O6k=; b=lXy2vKnl1VdGBgtxULcHtz0XLVv1wCrVgvZCfWBW9OWvocHX5Gr/ofUlBdqTT2J08RNwGmKjyKiw3Pw0pquKHybVbmEl1//tEJpQb0inC6OwnEuzsd7101tXaWfMmIA6DQ1W26fofL0hfEucji8d9gR/cLgC+wIwr5EJgy+xSM0= Received: from AM6PR0402MB3911.eurprd04.prod.outlook.com (52.133.30.10) by AM6PR0402MB3863.eurprd04.prod.outlook.com (52.133.29.150) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1622.18; Thu, 21 Feb 2019 06:38:30 +0000 Received: from AM6PR0402MB3911.eurprd04.prod.outlook.com ([fe80::6c94:4ad8:e9f3:cf1]) by AM6PR0402MB3911.eurprd04.prod.outlook.com ([fe80::6c94:4ad8:e9f3:cf1%4]) with mapi id 15.20.1622.018; Thu, 21 Feb 2019 06:38:30 +0000 From: Anson Huang To: "robh+dt@kernel.org" , "mark.rutland@arm.com" , "shawnguo@kernel.org" , "s.hauer@pengutronix.de" , "kernel@pengutronix.de" , "festevam@gmail.com" , "catalin.marinas@arm.com" , "will.deacon@arm.com" , "rui.zhang@intel.com" , "edubezval@gmail.com" , "daniel.lezcano@linaro.org" , Aisheng Dong , "ulf.hansson@linaro.org" , "sboyd@kernel.org" , Daniel Baluta , Andy Gross , "horms+renesas@verge.net.au" , "heiko@sntech.de" , "arnd@arndb.de" , "maxime.ripard@bootlin.com" , "bjorn.andersson@linaro.org" , "jagan@amarulasolutions.com" , "enric.balletbo@collabora.com" , "marc.w.gonzalez@free.fr" , "olof@lixom.net" , "devicetree@vger.kernel.org" , "linux-kernel@vger.kernel.org" , "linux-arm-kernel@lists.infradead.org" , "linux-pm@vger.kernel.org" CC: dl-linux-imx Subject: [PATCH V8 1/4] dt-bindings: fsl: scu: add thermal binding Thread-Topic: [PATCH V8 1/4] dt-bindings: fsl: scu: add thermal binding Thread-Index: AQHUybAPUmnoI6Ce/UqIMDTlZO/oOg== Date: Thu, 21 Feb 2019 06:38:30 +0000 Message-ID: <1550730831-14995-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: HK0PR03CA0069.apcprd03.prod.outlook.com (2603:1096:203:52::33) 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-ms-office365-filtering-correlation-id: a0567e44-a19b-49de-e90d-08d697c73148 x-ms-office365-filtering-ht: Tenant x-microsoft-antispam: BCL:0;PCL:0;RULEID:(2390118)(7020095)(4652040)(8989299)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(5600110)(711020)(4605104)(4618075)(2017052603328)(7153060)(7193020);SRVR:AM6PR0402MB3863; x-ms-traffictypediagnostic: AM6PR0402MB3863: x-ld-processed: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635,ExtAddr x-microsoft-exchange-diagnostics: =?iso-8859-1?q?1=3BAM6PR0402MB3863=3B23=3A?= =?iso-8859-1?q?mMtUhZy1XLYnwGPhlj836SUdvyQtOiiYt3nxCZTvIU9bhg/IT1gLElBEbWbD?= =?iso-8859-1?q?569LcjkQNrN37rBmq1IZ2AJPRJB1FHje3j1w7/qx6tD0g0QlimyUm9NX4MRC?= =?iso-8859-1?q?P0GqKUUOuxucGtRhS8RnLzCOm/x6fLCAtr47NFbCR/tGBAkjnuqqcp6iSvkE?= =?iso-8859-1?q?Tzm55gtVfqNBy3riHnnhMu1JEmlZI8syQk3MwSq3xzzJunoXFkEsJp63AOWv?= =?iso-8859-1?q?OKoyHSk8hiJO2+jruaj4l+AL7x6zDbQUo42JsN/Qq1i2QPgOm1ZjCzXdjlEZ?= =?iso-8859-1?q?rhJUfDMlfETJ70eYS/fGvqIc58C/scdgi2L9MaiZptqU86ybslnB+KMqIbK8?= =?iso-8859-1?q?CSIHKDgkPSNKeX/EoUdNmiJhEd5v1iQ2QrzsiKAIhW9CY0K3TEpUKbO7Ng9Y?= =?iso-8859-1?q?fvQGLb0vMGZB8XGmgLXBnpn1t0SpZ021MAjY+w5//bkEn5+1nxlxnMxAMzRH?= =?iso-8859-1?q?Kkz89ZYPo/ICMO9JgZkdHSOGhpjlHeZiYIii4/RAzRCCe7qNQUn7nquiuNT3?= =?iso-8859-1?q?txzc7PKH7MMSIx+m/hc82J2QvjqNdw4zxSW9W///VKar0jQ+TXozL+TA/gkK?= =?iso-8859-1?q?a8Eg0BhHkf4YB2jKrDgp2Ef4e7+j/Psk6J6y29tU5wJ/UBoooOy4CmdMKcLn?= =?iso-8859-1?q?st3dIUe0itoHq0LBK19EbxfFSD2NPniVrBV+/xhhs7RX1cioPsWE6liLAjHA?= =?iso-8859-1?q?Z1Q7GmoMNSPPC5Dm8QSj9apoQeHKizOsm12dk0iwk/yQeW0clHChcExz+d2+?= =?iso-8859-1?q?aOKcdM6lNaRiVBCYS8PpEgjDRbZaQ8fGiOwDV5ld/UZk8Ffx7zlv10OryGlH?= =?iso-8859-1?q?Je8VO5+3F6LaQcOqTZDRxceD+ZABN1sdhcqrFe3hmNZBLR6wHOrUlvXMwfw7?= =?iso-8859-1?q?pdhsBVihBRB9VQBVF8FhjfX5mNNuw5knU0Io+jv5OcLuvdiDnRy5tzAcnKa4?= =?iso-8859-1?q?OtKRLfnfvHgRPI/hhVtDkypeUKrGid4hCCj/s/mqyFwGRMxKIyeVEBsAZUkl?= =?iso-8859-1?q?uQM5LX0JJxUIyMgI/Y5YMxMIo0tZHs3pg87CZRVPrmDpuoe53cLqTd1FNVRI?= =?iso-8859-1?q?j7MJabccGSaaSCSxy0UL8TTY4JTP/iu5MWPDkbsKjqrtMZcR1ynGKVfDEjFZ?= =?iso-8859-1?q?kiUYmKqYSDBnQzPvsrBlBjib7RWmSup3aKVxc6munRaO52BaKYx6XZueWssk?= =?iso-8859-1?q?c4VYqMzytF8AGUV9eDS4d2csPdpezfCJXigh2w=3D=3D?= x-microsoft-antispam-prvs: x-forefront-prvs: 09555FB1AD x-forefront-antispam-report: SFV:NSPM;SFS:(10009020)(39860400002)(366004)(136003)(376002)(346002)(396003)(199004)(189003)(478600001)(71200400001)(5660300002)(6486002)(97736004)(6512007)(2906002)(86362001)(36756003)(66066001)(2201001)(71190400001)(53936002)(4326008)(486006)(25786009)(68736007)(305945005)(14454004)(6436002)(316002)(386003)(8676002)(6116002)(3846002)(110136005)(186003)(7736002)(2616005)(26005)(256004)(81166006)(102836004)(50226002)(7416002)(14444005)(476003)(2501003)(81156014)(8936002)(6506007)(52116002)(106356001)(99286004)(105586002)(921003)(1121003);DIR:OUT;SFP:1101;SCL:1;SRVR:AM6PR0402MB3863;H:AM6PR0402MB3911.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-ms-exchange-senderadcheck: 1 x-microsoft-antispam-message-info: wEEgAq0a6i5lalWkd4zfvsrl0Nvjkan9wEsBkxI7YFJHqOzRB1BKDXoE/NmvQptva6mzFcvey+OsPMV3HWFzZmtiTgDn0nFnrtfWPYWaIxS96Zu6HlFPANStojCC9HrS1u+GLI7jq2O2Iu6sNuD88QaWrUv1wz7S+dYksII5DtUfbtYyy7d4EZYbFpL84G53zb8LwDxafd8jxokpweKQme41jMxjYk6ABD5FJ39tTfPPrSTQi+Tj03HdqY6c9oY2i2dt68QamQKWZXuB2l12l1f5Qic5q6xEiYvJ7dVBDWUxUE1x9La5AuQJmjz9c7Vd/BMSNjubjqo8zIlV6u9oKVsASO872msEZ0VwnCYvwNtY7GcmI1AR7iqKiT/t/KfUIl2BSzxeEeEGGbBXR3hcGLfUedzOA0MFNdeWZB/VJgw= MIME-Version: 1.0 X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: a0567e44-a19b-49de-e90d-08d697c73148 X-MS-Exchange-CrossTenant-originalarrivaltime: 21 Feb 2019 06:38:21.8202 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM6PR0402MB3863 Sender: linux-pm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.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 --- Changes since V7: - remove unused property "tsens-num"; - improve the compatible description; - update examples according to latest dts file. --- .../devicetree/bindings/arm/freescale/fsl,scu.txt | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/Documentation/devicetree/bindings/arm/freescale/fsl,scu.txt b/Documentation/devicetree/bindings/arm/freescale/fsl,scu.txt index 72d481c..d89147e 100644 --- a/Documentation/devicetree/bindings/arm/freescale/fsl,scu.txt +++ b/Documentation/devicetree/bindings/arm/freescale/fsl,scu.txt @@ -122,6 +122,19 @@ 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: Should be : + "fsl,imx8qxp-sc-thermal" + followed by "fsl,imx-sc-thermal"; + +- #thermal-sensor-cells: See Documentation/devicetree/bindings/thermal/thermal.txt + for a description. + +- imx,sensor-resource-id: Property array to specify each thermal zone's sensor resource ID. + Example (imx8qxp): ------------- lsio_mu1: mailbox@5d1c0000 { @@ -168,6 +181,12 @@ firmware { rtc: rtc { compatible = "fsl,imx8qxp-sc-rtc"; }; + + tsens: thermal-sensor { + compatible = "fsl,imx8qxp-sc-thermal", "fsl,imx-sc-thermal"; + #thermal-sensor-cells = <0>; + imx,sensor-resource-id = ; + }; }; }; From patchwork Thu Feb 21 06:38:39 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anson Huang X-Patchwork-Id: 10823177 X-Patchwork-Delegate: eduardo.valentin@ti.com 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 AC8141399 for ; Thu, 21 Feb 2019 06:39:03 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 979412E37B for ; Thu, 21 Feb 2019 06:39:03 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 85CBC2E369; Thu, 21 Feb 2019 06:39:03 +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=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id BDEC42E369 for ; Thu, 21 Feb 2019 06:39:02 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726885AbfBUGi5 (ORCPT ); Thu, 21 Feb 2019 01:38:57 -0500 Received: from mail-eopbgr50052.outbound.protection.outlook.com ([40.107.5.52]:48404 "EHLO EUR03-VE1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726680AbfBUGi4 (ORCPT ); Thu, 21 Feb 2019 01:38:56 -0500 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=Ze5IIe1T6c4EkSzmcmLV1l3QESc8WF7FBLxcdcb36UU=; b=uWvBOH6yfPAirPHmVlO7qLIEonFrcitHX4KeGwM2SS0jckvgKooTr7m5pjTlbQpRDezVivFwx96783joUJUNbSRBt+BthE3QRMuYhfURlF4os4E9qNVcX1M0ITODLRDzCcZiNYGwS1OjVAQUP//QGZhpu02DwiGOSY71DweF/CA= Received: from AM6PR0402MB3911.eurprd04.prod.outlook.com (52.133.30.10) by AM6PR0402MB3863.eurprd04.prod.outlook.com (52.133.29.150) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1622.18; Thu, 21 Feb 2019 06:38:39 +0000 Received: from AM6PR0402MB3911.eurprd04.prod.outlook.com ([fe80::6c94:4ad8:e9f3:cf1]) by AM6PR0402MB3911.eurprd04.prod.outlook.com ([fe80::6c94:4ad8:e9f3:cf1%4]) with mapi id 15.20.1622.018; Thu, 21 Feb 2019 06:38:39 +0000 From: Anson Huang To: "robh+dt@kernel.org" , "mark.rutland@arm.com" , "shawnguo@kernel.org" , "s.hauer@pengutronix.de" , "kernel@pengutronix.de" , "festevam@gmail.com" , "catalin.marinas@arm.com" , "will.deacon@arm.com" , "rui.zhang@intel.com" , "edubezval@gmail.com" , "daniel.lezcano@linaro.org" , Aisheng Dong , "ulf.hansson@linaro.org" , "sboyd@kernel.org" , Daniel Baluta , Andy Gross , "horms+renesas@verge.net.au" , "heiko@sntech.de" , "arnd@arndb.de" , "maxime.ripard@bootlin.com" , "bjorn.andersson@linaro.org" , "jagan@amarulasolutions.com" , "enric.balletbo@collabora.com" , "marc.w.gonzalez@free.fr" , "olof@lixom.net" , "devicetree@vger.kernel.org" , "linux-kernel@vger.kernel.org" , "linux-arm-kernel@lists.infradead.org" , "linux-pm@vger.kernel.org" CC: dl-linux-imx Subject: [PATCH V8 2/4] thermal: imx_sc: add i.MX system controller thermal support Thread-Topic: [PATCH V8 2/4] thermal: imx_sc: add i.MX system controller thermal support Thread-Index: AQHUybAULnz4bMD1zUS0pt2wSf6zwA== Date: Thu, 21 Feb 2019 06:38:39 +0000 Message-ID: <1550730831-14995-2-git-send-email-Anson.Huang@nxp.com> References: <1550730831-14995-1-git-send-email-Anson.Huang@nxp.com> In-Reply-To: <1550730831-14995-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: HK0PR03CA0069.apcprd03.prod.outlook.com (2603:1096:203:52::33) 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-ms-office365-filtering-correlation-id: 1d3a3118-761b-4e87-41e2-08d697c7369d x-ms-office365-filtering-ht: Tenant x-microsoft-antispam: BCL:0;PCL:0;RULEID:(2390118)(7020095)(4652040)(8989299)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(5600110)(711020)(4605104)(4618075)(2017052603328)(7153060)(7193020);SRVR:AM6PR0402MB3863; x-ms-traffictypediagnostic: AM6PR0402MB3863: x-ld-processed: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635,ExtAddr x-microsoft-exchange-diagnostics: =?iso-8859-1?q?1=3BAM6PR0402MB3863=3B23=3A?= =?iso-8859-1?q?i8NpIJ3e9MhIan5EXXmQ+o8CbTjyYYxWSci1KCdo9ynuWfvL8w7eNOuEzrYR?= =?iso-8859-1?q?VGaxCQHC7aboMD+Kecu2XB1w3s1ULzryMnvuwcYWznqdx95BFhjfoEbzbRtP?= =?iso-8859-1?q?2876uNXo3QDNiprl/CR0JsgDO/FJ8bS2UKPmu3BizNIUKRdJpVGgxPNsedWn?= =?iso-8859-1?q?hn5EdYDwS9tYy9iWHir04iaidBF7HWVFiync+aUKcD6ro9nDRe0UYI3+y+CO?= =?iso-8859-1?q?c0eqmI/e1SANb6KANLfQUaFSrpHJu8ujz+EzklrQgzyYDnvUfzyZqIMIfhTb?= =?iso-8859-1?q?REjtIqf5qwBKCdbGHQD/dQ0vjfW711EYVi+uGJp9ZSOjyQ/bmCcTpVStLsTJ?= =?iso-8859-1?q?MFSeiKhapWpU9NRoeRrEIHina43JEPUjEaFJUfyO3R0mjgUywZ5VVJvA6FiL?= =?iso-8859-1?q?fy8ty90Kbhn+Ns9dhjG6AZym3qQ9sjOUhE2vERIKzmO+FFzd0HWSSRWyNLqs?= =?iso-8859-1?q?44jImZ4EeX3NrBSMAMyWTsVNdXpGezY3iylPLenUQFKOlnKFef1sjd2YNuY+?= =?iso-8859-1?q?Mi9ich1B7zKE2iOTUl9u98QE7Jc3kMXOY+Yx80ZCoumwfTKeTyrhu7T/VPRL?= =?iso-8859-1?q?I0jZ2p45ZyPi9+i/SPHqA5LBcj/8x9VrFRTBVp6uQUqtIEEGJfh+WHYdOYxR?= =?iso-8859-1?q?i3z0GpM8zbEcNwipjGbTwXDNuYgT0NlPq+xmvYmDcB7UqszGipnycCu1LEeW?= =?iso-8859-1?q?YRNdJPOjxvekPhQpPUZl+GgD75mP/2RhNmFLVpWUQ2XFxs4jeK4HqTcwUgOb?= =?iso-8859-1?q?L2vZrehX5YL9cHB9eOekMsp7fwcntDyKmQy8pE4gn1h9DF7TmLeiUKulOLmL?= =?iso-8859-1?q?jsWMhYTSoD6OvOnluTvRba050ve3oD6PC3UDhmkIEllQ5h/ijUQzUzmb6OfI?= =?iso-8859-1?q?ZSB3rgZAcfWujIE8g8OAG1qx9u6uK6Dsyns0n+qPw84zzg26RvjLtQl8Fxs9?= =?iso-8859-1?q?QZffZ69YU50pRm3TG8Ipwq9oUnZWiMs6JeaIc+Ahh+WsTQUz3v9zVHhDLvSu?= =?iso-8859-1?q?tfYTec5cJa9mzZv6ZCFjG9l4kbPnQb9tgAY1CwKWcNQ5/+7CidG9jwZVNLDF?= =?iso-8859-1?q?qk+AYqhJQwez031AeKbaJWhkPbWBFXmofMHxSJ1iKoszjvCS7R93nrqDAEjU?= =?iso-8859-1?q?vZU98WnCKQp2RPF/6gxZkGvj5KFzBO9e0HpqZajw+t/MetnzybQ4lbPwQIyk?= =?iso-8859-1?q?2wGN3lQeJJ9z7BmIhRre07VwBYAiGWQ1QBD0QZIca8odsdULCIBK1zGzZuw?= =?iso-8859-1?q?=3D?= x-microsoft-antispam-prvs: x-forefront-prvs: 09555FB1AD x-forefront-antispam-report: SFV:NSPM;SFS:(10009020)(39860400002)(366004)(136003)(376002)(346002)(396003)(199004)(189003)(478600001)(71200400001)(5660300002)(6486002)(97736004)(6512007)(2906002)(86362001)(36756003)(66066001)(2201001)(71190400001)(53936002)(4326008)(486006)(25786009)(68736007)(305945005)(14454004)(6436002)(316002)(386003)(8676002)(6116002)(3846002)(446003)(110136005)(186003)(7736002)(2616005)(76176011)(26005)(256004)(81166006)(102836004)(50226002)(7416002)(476003)(2501003)(81156014)(8936002)(6506007)(52116002)(106356001)(99286004)(105586002)(11346002)(921003)(1121003);DIR:OUT;SFP:1101;SCL:1;SRVR:AM6PR0402MB3863;H:AM6PR0402MB3911.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-ms-exchange-senderadcheck: 1 x-microsoft-antispam-message-info: Tve+XdrNd0ulrSKhAH2FuFQ7IhyLD2+Z1JjPuyltnvJidmH0OSN0gyQKXTPpqZrNjD1syy32v0itoHz2q4Ye/O+hqqL4NWtyGRjzoHMw5vM9XjMJh15kJu853vr3ks3VqeOf66+JhrJczlM7O0WWti5MC1J6D+fFIGmKM0NPoxw8b3LPP4hAM0SRcT09wh5oRP9irhX85yUf05TnGEI5yTOLEysZvP/3BjaCqIqokVZQUhtpU1eoTXVPyiFM+dm6/ZofF11M54MOIJxW1oxQ/srkpTQFLJoNVLopUvwccXn6nBwyY2xakQ5YKUQG/8Z9+B3wh1HFpuBEEHkYTouZ9aXSG6ya3F/PJRxRK0vvPQQ3pFPupopYsfODF8fQ9vvwC87dtRDPClO//V8ug8U2+6fE69bYsA2pfx8PGgKMGeM= MIME-Version: 1.0 X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 1d3a3118-761b-4e87-41e2-08d697c7369d X-MS-Exchange-CrossTenant-originalarrivaltime: 21 Feb 2019 06:38:30.7416 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM6PR0402MB3863 Sender: linux-pm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.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 V7: - remove unused structure imx_sc_thermal_data to simply the driver; - move the "imx,sensor-resource-id" property from thermal zone node to scu tsens node, and get this property using phandle; - remove unused sensor number got from dts, now it is not needed. --- drivers/thermal/Kconfig | 11 +++ drivers/thermal/Makefile | 1 + drivers/thermal/imx_sc_thermal.c | 144 +++++++++++++++++++++++++++++++++++++++ 3 files changed, 156 insertions(+) create mode 100644 drivers/thermal/imx_sc_thermal.c diff --git a/drivers/thermal/Kconfig b/drivers/thermal/Kconfig index 58bb7d7..fec0ef5 100644 --- a/drivers/thermal/Kconfig +++ b/drivers/thermal/Kconfig @@ -223,6 +223,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 486d682..4062627 100644 --- a/drivers/thermal/Makefile +++ b/drivers/thermal/Makefile @@ -40,6 +40,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..145e73b --- /dev/null +++ b/drivers/thermal/imx_sc_thermal.c @@ -0,0 +1,144 @@ +// SPDX-License-Identifier: GPL-2.0+ +/* + * Copyright 2018-2019 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 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_probe(struct platform_device *pdev) +{ + struct device_node *np, *sensor_np; + int ret, i = 0; + + ret = imx_scu_get_handle(&thermal_ipc_handle); + if (ret) + return ret; + + np = of_find_node_by_name(NULL, "thermal-zones"); + if (!np) + return -ENODEV; + + for_each_available_child_of_node(np, sensor_np) { + struct of_phandle_args tsens_args; + struct imx_sc_sensor *sensor = + devm_kzalloc(&pdev->dev, sizeof(*sensor), GFP_KERNEL); + if (!sensor) + return -ENOMEM; + + ret = of_parse_phandle_with_args(sensor_np, "thermal-sensors", + "#thermal-sensor-cells", i, &tsens_args); + if (ret < 0) + return ret; + + ret = of_property_read_u32_index(tsens_args.np, + "imx,sensor-resource-id", i, &sensor->resource_id); + if (ret) { + dev_err(&pdev->dev, + "failed to get valid sensor resource id: %d\n", + ret); + break; + } + + sensor->tzd = devm_thermal_zone_of_sensor_register(&pdev->dev, + i++, + sensor, + &imx_sc_thermal_ops); + if (IS_ERR(sensor->tzd)) { + dev_err(&pdev->dev, "failed to register thermal zone\n"); + ret = PTR_ERR(sensor->tzd); + break; + } + } + + of_node_put(np); + of_node_put(sensor_np); + + return ret; +} + +static const struct of_device_id imx_sc_thermal_table[] = { + { .compatible = "fsl,imx-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 Feb 21 06:38:48 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anson Huang X-Patchwork-Id: 10823179 X-Patchwork-Delegate: eduardo.valentin@ti.com 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 1A02E180E for ; Thu, 21 Feb 2019 06:39:04 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 07DC52E369 for ; Thu, 21 Feb 2019 06:39:04 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id EFBD22E37B; Thu, 21 Feb 2019 06:39:03 +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=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 8F3EC2E374 for ; Thu, 21 Feb 2019 06:39:03 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726784AbfBUGix (ORCPT ); Thu, 21 Feb 2019 01:38:53 -0500 Received: from mail-eopbgr30048.outbound.protection.outlook.com ([40.107.3.48]:13952 "EHLO EUR03-AM5-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1725932AbfBUGiw (ORCPT ); Thu, 21 Feb 2019 01:38:52 -0500 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=jK0792C1pJU6XghGsPQVntLzuXdgz0/ZqsnOMV/Z6xo=; b=v2sPYRn+jH6ykCh91gn9YU5c/QL6c1pLsoSgOZwfpoGSmFTLQA/EHolmguVM3CiCIy3BHQF2WFVa/ZdkW6W0QQCX1la48Mt8JaKpwQDB5ydAigATcbWxS8hqGYFIHZiN5E42bgycK7U3XmMsGi4DtEnlp0fXq/chvNw09L6xdjg= Received: from AM6PR0402MB3911.eurprd04.prod.outlook.com (52.133.30.10) by AM6PR0402MB3734.eurprd04.prod.outlook.com (52.133.29.13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1622.19; Thu, 21 Feb 2019 06:38:48 +0000 Received: from AM6PR0402MB3911.eurprd04.prod.outlook.com ([fe80::6c94:4ad8:e9f3:cf1]) by AM6PR0402MB3911.eurprd04.prod.outlook.com ([fe80::6c94:4ad8:e9f3:cf1%4]) with mapi id 15.20.1622.018; Thu, 21 Feb 2019 06:38:48 +0000 From: Anson Huang To: "robh+dt@kernel.org" , "mark.rutland@arm.com" , "shawnguo@kernel.org" , "s.hauer@pengutronix.de" , "kernel@pengutronix.de" , "festevam@gmail.com" , "catalin.marinas@arm.com" , "will.deacon@arm.com" , "rui.zhang@intel.com" , "edubezval@gmail.com" , "daniel.lezcano@linaro.org" , Aisheng Dong , "ulf.hansson@linaro.org" , "sboyd@kernel.org" , Daniel Baluta , Andy Gross , "horms+renesas@verge.net.au" , "heiko@sntech.de" , "arnd@arndb.de" , "maxime.ripard@bootlin.com" , "bjorn.andersson@linaro.org" , "jagan@amarulasolutions.com" , "enric.balletbo@collabora.com" , "marc.w.gonzalez@free.fr" , "olof@lixom.net" , "devicetree@vger.kernel.org" , "linux-kernel@vger.kernel.org" , "linux-arm-kernel@lists.infradead.org" , "linux-pm@vger.kernel.org" CC: dl-linux-imx Subject: [PATCH V8 3/4] defconfig: arm64: add i.MX system controller thermal support Thread-Topic: [PATCH V8 3/4] defconfig: arm64: add i.MX system controller thermal support Thread-Index: AQHUybAZacUv2up9EkynheNHIDhcqA== Date: Thu, 21 Feb 2019 06:38:48 +0000 Message-ID: <1550730831-14995-3-git-send-email-Anson.Huang@nxp.com> References: <1550730831-14995-1-git-send-email-Anson.Huang@nxp.com> In-Reply-To: <1550730831-14995-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: HK0PR03CA0069.apcprd03.prod.outlook.com (2603:1096:203:52::33) 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-ms-office365-filtering-correlation-id: 1ebc525f-ebcb-4517-f9ac-08d697c73bde x-ms-office365-filtering-ht: Tenant x-microsoft-antispam: BCL:0;PCL:0;RULEID:(2390118)(7020095)(4652040)(8989299)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(5600110)(711020)(4605104)(4618075)(2017052603328)(7153060)(7193020);SRVR:AM6PR0402MB3734; x-ms-traffictypediagnostic: AM6PR0402MB3734: x-ld-processed: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635,ExtAddr x-microsoft-exchange-diagnostics: =?iso-8859-1?q?1=3BAM6PR0402MB3734=3B23=3A?= =?iso-8859-1?q?KTaeBNzrdQVxAM56R3h5NqDzgTbiK5L2HDmepjTeWHBBPHWeex+gblof3iHD?= =?iso-8859-1?q?OsAy3YDC1EDYmo8NgBTsyXpzdkODiMhHy9lGyo1cELdWur6cVbjViOl8/8zm?= =?iso-8859-1?q?UcZiZFlUcAayjA79qvH81rMOT4/WOXHb2w7rK/J5yC+5ypg1GSNQdeTwLdLF?= =?iso-8859-1?q?/3fZoJHml48k/w9zwMQ7KcJ52h9PhjtIVVpqBkxm61NzE/R3PmvGl/VqE0TY?= =?iso-8859-1?q?hGc2pHMs803jvCAynX+oKs5vgX45ezkiFRhoQO/b2whG9VYrTkgYERf9mgsk?= =?iso-8859-1?q?LE3pAPAVWDhZ+hRWiTieLC0Wsi+oR6S30oKPKolOaADTlrks/mPPUNULRFuO?= =?iso-8859-1?q?rm/A3ZaCqCbsBNVrZNVUaicbFlRw2+yjndauhxpgvKvoQtRh3Tmz5eOm1lJU?= =?iso-8859-1?q?8mZixeLSOIUlDaVp22SKNMObvDPWzcjgOabs5ijjozw6w44NBPHd8ch1YoLO?= =?iso-8859-1?q?GY973U7q7XdWxCn7GvAs8m0TBUrDuVD+qRFtVFlYFP6AnHkgcIqXGWUKxewH?= =?iso-8859-1?q?ui9lFGOLhHG6WLPHtXru2/mP/Hm7L0N0R4Y4P6j5WLph/uNvo07c9khIMHSC?= =?iso-8859-1?q?yYgiGrs4JapWTHm2bzsYy/c7n+bd02n7GuCeMU0sOVPekFavOaPCpdiszCJq?= =?iso-8859-1?q?qHu2fp0vjAnfcRztM/kto+eFHBgy0a6Cu70U+GR/Q/7oNlInM9FPfx0JLAnJ?= =?iso-8859-1?q?c9InHw5VBRsZjE7VvumS4K+4wlT8q1TeMo3QZvdt6OJAnNmvzVcIKjM6LrVT?= =?iso-8859-1?q?Q6Jq+C4Be4wc0feHPHUR2yCqG/U8K02ju4fK6tw2Lw599veW0KoZX85Xfq5J?= =?iso-8859-1?q?0hg87HKLuTw9ak18cx7iW52Gj6Ubkvw3jpTlqUTikbgDx/wLPLL90ByFd6RL?= =?iso-8859-1?q?wVcBMM2CkMfw+Tl3BgY0iqw7pDUiDI+rCiiiW5uWquPZf6R8s7qIvG66ksPf?= =?iso-8859-1?q?tVvnPc+XZ/rpkLumQ6YI5ujkdhEuR4qjhsrPKLk9375Pr4i5/mf2f7rP/UZv?= =?iso-8859-1?q?kHc/2yohaoxfH3Sm2BWmjKtb0E0K7boMGVhhG9SLCyYUBRg5HbM06T9DcBfE?= =?iso-8859-1?q?UBrLQ80hWa90TpITfjECGk3TKF43/UA+45ASUcDuc1XD++gJ4X3QSBzp8p/b?= =?iso-8859-1?q?9xEqnIHIZ/6dTqrbQBCBBR/n1wsJKnq4t3LwxV4pZi56GfFZ7AOkciuPHMf8?= =?iso-8859-1?q?QTsgnTu5rfczXo4xQ6keETuA3fNX9L7jwPcwO0VhHYHemhS2QnRxbDnaaapN?= =?iso-8859-1?q?0r7L8rTNFvW6TTiimV/u?= x-microsoft-antispam-prvs: x-forefront-prvs: 09555FB1AD x-forefront-antispam-report: SFV:NSPM;SFS:(10009020)(396003)(376002)(366004)(39860400002)(136003)(346002)(199004)(189003)(476003)(66066001)(76176011)(105586002)(486006)(52116002)(2501003)(36756003)(53936002)(14454004)(25786009)(50226002)(110136005)(6116002)(99286004)(3846002)(8676002)(2616005)(7416002)(186003)(7736002)(8936002)(81156014)(81166006)(26005)(106356001)(11346002)(102836004)(305945005)(6506007)(68736007)(386003)(316002)(6436002)(2906002)(4326008)(2201001)(6512007)(86362001)(97736004)(71200400001)(4744005)(71190400001)(478600001)(5660300002)(6486002)(256004)(446003)(921003)(1121003);DIR:OUT;SFP:1101;SCL:1;SRVR:AM6PR0402MB3734;H:AM6PR0402MB3911.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-ms-exchange-senderadcheck: 1 x-microsoft-antispam-message-info: OOkEztoUBvNYYwOSiB/C+JkjDzESxj3j/dDmMGn6ZIYGsv0A/rF042sjIxHEp2F5RVDzlSERdQJ0aoM9rIey9lif8yo715VDceA+nQivIsdKhEa7nZrmc6EYdUu51Gl76gI4x55H/ZVml8uM52lRpqoADKSAkPjM3hCPSZnsHrTwbj3kBU7bhvA94jw72iJtT/T0mbYYhYweA6dLgfjMs6j1OvqRHXSSU+G/ogxoyTp3Vq1tq30wFO2tR6nZOuWCq775RLGVVrSuvicDStVZPxXYfegf1Gqr56I4Xg2sVzr8iWo2+pVLfOae6Ct6kQKUrTsINB8Qmf4qo1VAorIwgN379bZs4s5ZfLkGvv/kHB90tBR+CldohVnVgerxrbucU3Zg/z89eEF6b/tArQVQoX+Bpf+MbqEn/oEzfX9Wk/w= MIME-Version: 1.0 X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 1ebc525f-ebcb-4517-f9ac-08d697c73bde X-MS-Exchange-CrossTenant-originalarrivaltime: 21 Feb 2019 06:38:39.5699 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM6PR0402MB3734 Sender: linux-pm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP This patch enables CONFIG_IMX_SC_THERMAL as module. Signed-off-by: Anson Huang --- No change. --- arch/arm64/configs/defconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/arm64/configs/defconfig b/arch/arm64/configs/defconfig index 2d9c390..52d503e 100644 --- a/arch/arm64/configs/defconfig +++ b/arch/arm64/configs/defconfig @@ -413,6 +413,7 @@ CONFIG_SENSORS_INA2XX=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_THERMAL=y CONFIG_RCAR_GEN3_THERMAL=y From patchwork Thu Feb 21 06:38:57 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anson Huang X-Patchwork-Id: 10823181 X-Patchwork-Delegate: eduardo.valentin@ti.com 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 88ECB1805 for ; Thu, 21 Feb 2019 06:39:05 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 74B072E369 for ; Thu, 21 Feb 2019 06:39:05 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 67F6A2E37B; Thu, 21 Feb 2019 06:39:05 +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=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 007D52E369 for ; Thu, 21 Feb 2019 06:39:04 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726644AbfBUGjE (ORCPT ); Thu, 21 Feb 2019 01:39:04 -0500 Received: from mail-eopbgr50077.outbound.protection.outlook.com ([40.107.5.77]:14792 "EHLO EUR03-VE1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1725986AbfBUGjD (ORCPT ); Thu, 21 Feb 2019 01:39:03 -0500 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=X/QPUIImObQcTA27E0/VuZ6dbxktCIr6Pzp/g16Sp9k=; b=GnddRqwSKCS9h5izFb5KcMCAks7s3UXxKu4i8OsuD4vgVDnmINTul7qk3rquEQD8n9FW6UTXb1dctEFj3wkYQC9AempvgnvTzBiPcFENSLHOehfZhppE5I566s2VYdj3jGh8Ol4nxIuuG/F3DtjbGofi3PZW6l1LN5nkrD0+5Qs= Received: from AM6PR0402MB3911.eurprd04.prod.outlook.com (52.133.30.10) by AM6PR0402MB3863.eurprd04.prod.outlook.com (52.133.29.150) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1622.18; Thu, 21 Feb 2019 06:38:57 +0000 Received: from AM6PR0402MB3911.eurprd04.prod.outlook.com ([fe80::6c94:4ad8:e9f3:cf1]) by AM6PR0402MB3911.eurprd04.prod.outlook.com ([fe80::6c94:4ad8:e9f3:cf1%4]) with mapi id 15.20.1622.018; Thu, 21 Feb 2019 06:38:57 +0000 From: Anson Huang To: "robh+dt@kernel.org" , "mark.rutland@arm.com" , "shawnguo@kernel.org" , "s.hauer@pengutronix.de" , "kernel@pengutronix.de" , "festevam@gmail.com" , "catalin.marinas@arm.com" , "will.deacon@arm.com" , "rui.zhang@intel.com" , "edubezval@gmail.com" , "daniel.lezcano@linaro.org" , Aisheng Dong , "ulf.hansson@linaro.org" , "sboyd@kernel.org" , Daniel Baluta , Andy Gross , "horms+renesas@verge.net.au" , "heiko@sntech.de" , "arnd@arndb.de" , "maxime.ripard@bootlin.com" , "bjorn.andersson@linaro.org" , "jagan@amarulasolutions.com" , "enric.balletbo@collabora.com" , "marc.w.gonzalez@free.fr" , "olof@lixom.net" , "devicetree@vger.kernel.org" , "linux-kernel@vger.kernel.org" , "linux-arm-kernel@lists.infradead.org" , "linux-pm@vger.kernel.org" CC: dl-linux-imx Subject: [PATCH V8 4/4] arm64: dts: imx: add i.MX8QXP thermal support Thread-Topic: [PATCH V8 4/4] arm64: dts: imx: add i.MX8QXP thermal support Thread-Index: AQHUybAeSo37+zULAUSf8sC6yKNW+w== Date: Thu, 21 Feb 2019 06:38:57 +0000 Message-ID: <1550730831-14995-4-git-send-email-Anson.Huang@nxp.com> References: <1550730831-14995-1-git-send-email-Anson.Huang@nxp.com> In-Reply-To: <1550730831-14995-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: HK0PR03CA0069.apcprd03.prod.outlook.com (2603:1096:203:52::33) 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-ms-office365-filtering-correlation-id: c06d5650-8a11-49f4-c64d-08d697c7413e x-ms-office365-filtering-ht: Tenant x-microsoft-antispam: BCL:0;PCL:0;RULEID:(2390118)(7020095)(4652040)(8989299)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(5600110)(711020)(4605104)(4618075)(2017052603328)(7153060)(7193020);SRVR:AM6PR0402MB3863; x-ms-traffictypediagnostic: AM6PR0402MB3863: x-ld-processed: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635,ExtAddr x-microsoft-exchange-diagnostics: =?iso-8859-1?q?1=3BAM6PR0402MB3863=3B23=3A?= =?iso-8859-1?q?dfRriVpXGNgblxuSkzkslAp9QD/otkBKLIM0mzBLUeQZR2/2k1pmKYLQVmjC?= =?iso-8859-1?q?ETHRjJ3GGUyO3ybJ3aX5hN35BeIffNfEwemaZBQCCPjW8sylPUw6Le/5VICJ?= =?iso-8859-1?q?vpCuEXQ6cPE2qojGbrx+vWQX6RGieGhuSPKlnHrRTS7vpF9H+dZCM2RE5rY3?= =?iso-8859-1?q?TGzscNunlLznHEwEfXPN8mHRazhp9VgoxIpPSLjwhUe7HtyuLDvOtRigAYWJ?= =?iso-8859-1?q?GUZN5UPX4nhMnKC4IcCwy0VKcgVsZwIj1joOjv+C1hw/bTrKXxmtDCA6YI+W?= =?iso-8859-1?q?lfytili6TE7XZFUCwiLYZYv5KW9Zy1W67QUUMcZX0e8O/rZBrB/d+lhHDAAX?= =?iso-8859-1?q?o3p7QbVeOC4ZhbWv/FvKsQQUTBDW1UnFV2FsdRCqQ8TtQJMQoDLPWqcNuZUH?= =?iso-8859-1?q?WF2UkRr4rrvcvgcV9zmJAqJ2SuYkjy3nXIC0Yst+K7NT87C/7OfBCdkCQbmf?= =?iso-8859-1?q?kEBUrWudsCY94N3ufyVdZkQfjsSqFaOMnO//8tBjfDi/IeuRCBeP+lQAx0ez?= =?iso-8859-1?q?6mf1pKQui2o5bbCw5Fg14o7MuczuP0ywHhX0bHvd49SLgeAYrzDYAw/FOTvT?= =?iso-8859-1?q?RpAc9C6NRSOlPHeeBJIjYoyh921YvRhXwnAChw2+aIFxrXou5YolNfEZRmd8?= =?iso-8859-1?q?lepvRon/dkuSmq/hV8eORW4u1bqBNKBMX54g1isY3ElszRetMSZce551aKTK?= =?iso-8859-1?q?0mTamOL+3wMJt7fDA6r94IJfJa9B6cN7bRC07Su4kOYnRpXprxKFyHcGMAM/?= =?iso-8859-1?q?r1fRnv+YlrcDw8nE5vVRFbY4jRDJqMT7KRnWqqUOAjf/uGrDlcWLhBkeecZz?= =?iso-8859-1?q?BwIS36iKdwqTsC0c7Q6s/G9LKGGSnqoswl4Oeu731zabV5Hav2Wh9/fkRdkp?= =?iso-8859-1?q?5mE3OaUSh3Rtc/QJXSc2qY0Cu56hvj/gljeDZNxvHsFdpmiNIknbWmtQ4+fo?= =?iso-8859-1?q?bczCeBZ2FLQE8XXh4a1semqp2Bek0/c5CY0p+zjTIaeqHYqmt/mZ+HlSaJJ2?= =?iso-8859-1?q?jlERipOkjdTI8sLyZgjXtQ/9i5kPC0e1LTTTtMwWyKN31Aw/JjuNG/v8tmdj?= =?iso-8859-1?q?8PbemHBLIgL6SguH6lY6Z2epSROg3O4FCx9j9biNiWxwndTJ9oU+IKHOw0Dl?= =?iso-8859-1?q?R5gV5/9d5+N+UgrpO/rKe+dAsHrANxRGsrIo9NaGjcd3z1FzUfmimTDwStuq?= =?iso-8859-1?q?c53f2SW2aEq6P76Pzs/vlxpVThGk/HXRsNo8FkrHqICnF/3yZS2obEcv2L1Q?= =?iso-8859-1?q?RiXQfIW8Eq0JFMQlvCWh?= x-microsoft-antispam-prvs: x-forefront-prvs: 09555FB1AD x-forefront-antispam-report: SFV:NSPM;SFS:(10009020)(39860400002)(366004)(136003)(376002)(346002)(396003)(199004)(189003)(478600001)(71200400001)(5660300002)(6486002)(97736004)(6512007)(2906002)(86362001)(36756003)(66066001)(2201001)(71190400001)(53936002)(4326008)(486006)(25786009)(68736007)(305945005)(14454004)(6436002)(316002)(386003)(8676002)(6116002)(3846002)(446003)(110136005)(186003)(7736002)(2616005)(76176011)(26005)(256004)(81166006)(102836004)(50226002)(7416002)(14444005)(476003)(2501003)(81156014)(8936002)(6506007)(52116002)(106356001)(99286004)(105586002)(11346002)(921003)(1121003);DIR:OUT;SFP:1101;SCL:1;SRVR:AM6PR0402MB3863;H:AM6PR0402MB3911.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-ms-exchange-senderadcheck: 1 x-microsoft-antispam-message-info: Z+aq3sGMUgSS81pm2/Zm4Ln5C0IfWSP6KkMj0PpoSLaZ7NRn577pB2xX9ffjlMCS1pLLOp2tRehomFkeVhZz48cGtqNxu1xP4d0M8qksqYQRbH/77t7k6t5kD4/UrRHGCZyau10pfqkNXIGvoML86LUlv2hoYDT9w0YZ81Yd2fp4c0OsfKigy8dxrMSjVKFo4zRTCU47dqUFsm9Qczu5HE4inTH7T83qg4iliSJZNOZf58LlPUXLP422aK7lgsC82a16k+5XoNBLUe/HVj+ghCyNRb5Ms7zTW7/y5giUiRdeMjxO0c9XrWdtWMHWr7xQ19AYXYYuO8S4HIGsFZXh493RkRJTyPbzDsoJqJglgK24pRsl7XBf9CTW4euedKn4DQQ/5otRGm/X5d/dmtgMXgWLSAz/GhTpHLzw+HwVdP0= MIME-Version: 1.0 X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: c06d5650-8a11-49f4-c64d-08d697c7413e X-MS-Exchange-CrossTenant-originalarrivaltime: 21 Feb 2019 06:38:48.5984 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM6PR0402MB3863 Sender: linux-pm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Add i.MX8QXP CPU thermal zone support. Signed-off-by: Anson Huang --- Changes since V7: - move the "imx,sensor-resource-id" to scu tsens node; - correct #thermal-sensor-cells value to be 0 as there is ONLY one thermal zone now; - add cooling map for passive mode. --- arch/arm64/boot/dts/freescale/imx8qxp.dtsi | 35 ++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) diff --git a/arch/arm64/boot/dts/freescale/imx8qxp.dtsi b/arch/arm64/boot/dts/freescale/imx8qxp.dtsi index 4c3dd95..eccdf28 100644 --- a/arch/arm64/boot/dts/freescale/imx8qxp.dtsi +++ b/arch/arm64/boot/dts/freescale/imx8qxp.dtsi @@ -10,6 +10,7 @@ #include #include #include +#include / { interrupt-parent = <&gic>; @@ -34,6 +35,7 @@ reg = <0x0 0x0>; enable-method = "psci"; next-level-cache = <&A35_L2>; + #cooling-cells = <2>; }; A35_1: cpu@1 { @@ -116,6 +118,12 @@ rtc: rtc { compatible = "fsl,imx8qxp-sc-rtc"; }; + + tsens: thermal-sensor { + compatible = "fsl,imx8qxp-sc-thermal", "fsl,imx-sc-thermal"; + #thermal-sensor-cells = <0>; + imx,sensor-resource-id = ; + }; }; timer { @@ -443,4 +451,31 @@ power-domains = <&pd IMX_SC_R_GPIO_7>; }; }; + + thermal_zones: thermal-zones { + cpu-thermal0 { + polling-delay-passive = <250>; + polling-delay = <2000>; + thermal-sensors = <&tsens 0>; + trips { + cpu_alert0: trip0 { + temperature = <107000>; + hysteresis = <2000>; + type = "passive"; + }; + cpu_crit0: trip1 { + temperature = <127000>; + hysteresis = <2000>; + type = "critical"; + }; + }; + cooling-maps { + map0 { + trip = <&cpu_alert0>; + cooling-device = + <&A35_0 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>; + }; + }; + }; + }; };