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?TGzscNunlLznHEwEfXPN8mHRazhp9VgoxIp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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>; + }; + }; + }; + }; };