From patchwork Fri Apr 12 07:55:09 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peng Fan X-Patchwork-Id: 1084463 X-Patchwork-Delegate: sbabic@denx.de Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=lists.denx.de (client-ip=81.169.180.215; helo=lists.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=nxp.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=nxp.com header.i=@nxp.com header.b="VGTpdh0w"; dkim-atps=neutral Received: from lists.denx.de (dione.denx.de [81.169.180.215]) by ozlabs.org (Postfix) with ESMTP id 44gVcp4T5Wz9s47 for ; Fri, 12 Apr 2019 17:58:02 +1000 (AEST) Received: by lists.denx.de (Postfix, from userid 105) id 42339C21CB6; Fri, 12 Apr 2019 07:56:44 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on lists.denx.de X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=SPF_HELO_PASS, T_DKIM_INVALID autolearn=unavailable autolearn_force=no version=3.4.0 Received: from lists.denx.de (localhost [IPv6:::1]) by lists.denx.de (Postfix) with ESMTP id 4B07AC21E2F; Fri, 12 Apr 2019 07:56:15 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id C8620C21E38; Fri, 12 Apr 2019 07:55:44 +0000 (UTC) Received: from EUR02-HE1-obe.outbound.protection.outlook.com (mail-eopbgr10062.outbound.protection.outlook.com [40.107.1.62]) by lists.denx.de (Postfix) with ESMTPS id A4F81C21DE8 for ; Fri, 12 Apr 2019 07:55:38 +0000 (UTC) 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=RbrWEhNuPq4zbMSW+DsitnbH0Op9HpR3nH4MXGEDm4o=; b=VGTpdh0wS/5T7eZd55q4TM82XmN3oBtT+MYkca9oR5/cU23cGJSh0a+YNazh29GVXa0czLrHQKRINkrXZz7NHkU79rtRjTpSEpSmbqwD4uzmYKInh9Yj9icrBrnjyHCpY1rzimdE5mMRQth4aMDUPOmXImEk3QqnGhzETKW2n1o= Received: from AM0PR04MB4481.eurprd04.prod.outlook.com (52.135.147.15) by AM0PR04MB6098.eurprd04.prod.outlook.com (20.179.34.148) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1792.18; Fri, 12 Apr 2019 07:55:37 +0000 Received: from AM0PR04MB4481.eurprd04.prod.outlook.com ([fe80::dc63:432c:eb4b:8d1b]) by AM0PR04MB4481.eurprd04.prod.outlook.com ([fe80::dc63:432c:eb4b:8d1b%3]) with mapi id 15.20.1792.016; Fri, 12 Apr 2019 07:55:37 +0000 From: Peng Fan To: "sbabic@denx.de" , "festevam@gmail.com" Thread-Topic: [PATCH 7/8] imx: imx8dx/qxp: enable thermal Thread-Index: AQHU8QUMDtBjNI+i00y6eVTVChZNdg== Date: Fri, 12 Apr 2019 07:55:09 +0000 Message-ID: <20190412080741.32412-7-peng.fan@nxp.com> References: <20190412080741.32412-1-peng.fan@nxp.com> In-Reply-To: <20190412080741.32412-1-peng.fan@nxp.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-mailer: git-send-email 2.16.4 x-clientproxiedby: HK2PR03CA0045.apcprd03.prod.outlook.com (2603:1096:202:17::15) To AM0PR04MB4481.eurprd04.prod.outlook.com (2603:10a6:208:70::15) authentication-results: spf=none (sender IP is ) smtp.mailfrom=peng.fan@nxp.com; x-ms-exchange-messagesentrepresentingtype: 1 x-originating-ip: [119.31.174.71] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 3d2a3e6d-7ee2-46d8-84c0-08d6bf1c2f19 x-ms-office365-filtering-ht: Tenant x-microsoft-antispam: BCL:0; PCL:0; RULEID:(2390118)(7020095)(4652040)(8989299)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(5600139)(711020)(4605104)(4618075)(2017052603328)(7193020); SRVR:AM0PR04MB6098; x-ms-traffictypediagnostic: AM0PR04MB6098: x-microsoft-antispam-prvs: x-forefront-prvs: 0005B05917 x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(136003)(346002)(39860400002)(376002)(366004)(396003)(189003)(199004)(71190400001)(386003)(71200400001)(6506007)(44832011)(6666004)(76176011)(105586002)(36756003)(186003)(106356001)(66066001)(26005)(102836004)(5660300002)(486006)(14444005)(446003)(256004)(476003)(2616005)(11346002)(3846002)(6116002)(52116002)(50226002)(68736007)(53936002)(6512007)(6486002)(25786009)(4326008)(54906003)(110136005)(316002)(97736004)(99286004)(2906002)(8936002)(478600001)(305945005)(7736002)(14454004)(86362001)(81166006)(81156014)(8676002)(2501003)(6436002)(1076003)(32563001); DIR:OUT; SFP:1101; SCL:1; SRVR:AM0PR04MB6098; H:AM0PR04MB4481.eurprd04.prod.outlook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; MX:1; A:1; received-spf: None (protection.outlook.com: nxp.com does not designate permitted sender hosts) x-ms-exchange-senderadcheck: 1 x-microsoft-antispam-message-info: v4OSvqXGtT8ALPKdItTIWJhgmX15kmAV2Lut0eXUiyJjBxhyG44KBOE8WuhlX8wXfAtBAdEJJ8ny+2dXXNvPy7GHEXmstwf4QIkYUWEePFkyNV2KRr98598pzpnPFTv96bBSbyM4cJTP1mrxBkKLLlI3A34qS71d7oc0tUPAWah3Z7xfH4H7IZOVaaELYbtjkc5dl6ExBu46QOSMxRJoD3x/jhIVzPPc2y2aVKgL05bbtx4tqRbsdewrAjPZktdfDvXFzNinp5xbU/NDbxUzqek1KcpTD2PJefhAOGgA/LymJKgpB+tiIgc0U7MZl3L0+xCmy+5Nom3110MlobSPazG5phqFzeXUGHjJ7XauMaCQpZ3Wbd21sCRCj0KWyf+Kck8rQXvIRS3yWrvSo6wH7N2Wh6xdVB1/FDZF0NGcFlk= MIME-Version: 1.0 X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 3d2a3e6d-7ee2-46d8-84c0-08d6bf1c2f19 X-MS-Exchange-CrossTenant-originalarrivaltime: 12 Apr 2019 07:55:09.2757 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM0PR04MB6098 Cc: "u-boot@lists.denx.de" , dl-uboot-imx Subject: [U-Boot] [PATCH 7/8] imx: imx8dx/qxp: enable thermal X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.18 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" Add thermal dts node Enable thermal in defconfig Signed-off-by: Peng Fan --- arch/arm/dts/fsl-imx8dx.dtsi | 56 +++++++++++++++++++++++++++++++++++++++++++ configs/imx8qxp_mek_defconfig | 2 ++ 2 files changed, 58 insertions(+) diff --git a/arch/arm/dts/fsl-imx8dx.dtsi b/arch/arm/dts/fsl-imx8dx.dtsi index 3b1a2a20e3..1c163afdcd 100644 --- a/arch/arm/dts/fsl-imx8dx.dtsi +++ b/arch/arm/dts/fsl-imx8dx.dtsi @@ -11,6 +11,7 @@ #include #include #include +#include / { model = "Freescale i.MX8DX"; @@ -489,6 +490,61 @@ power-domains = <&pd_conn_enet1>; status = "disabled"; }; + + tsens: thermal-sensor { + compatible = "nxp,imx8qxp-sc-tsens"; + /* number of the temp sensor on the chip */ + tsens-num = <2>; + #thermal-sensor-cells = <1>; + }; + + thermal_zones: thermal-zones { + /* cpu thermal */ + cpu-thermal0 { + polling-delay-passive = <250>; + polling-delay = <2000>; + /*the slope and offset of the temp sensor */ + 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>; + }; + }; + }; + + drc-thermal0 { + polling-delay-passive = <250>; + polling-delay = <2000>; + thermal-sensors = <&tsens 1>; + status = "disabled"; + trips { + drc_alert0: trip0 { + temperature = <107000>; + hysteresis = <2000>; + type = "passive"; + }; + drc_crit0: trip1 { + temperature = <127000>; + hysteresis = <2000>; + type = "critical"; + }; + }; + }; + }; }; &A35_0 { diff --git a/configs/imx8qxp_mek_defconfig b/configs/imx8qxp_mek_defconfig index 14e9da386a..f0da489645 100644 --- a/configs/imx8qxp_mek_defconfig +++ b/configs/imx8qxp_mek_defconfig @@ -73,5 +73,7 @@ CONFIG_DM_REGULATOR_GPIO=y CONFIG_SPL_DM_REGULATOR_GPIO=y CONFIG_DM_SERIAL=y CONFIG_FSL_LPUART=y +CONFIG_DM_THERMAL=y +CONFIG_IMX_SCU_THERMAL=y CONFIG_SPL_TINY_MEMSET=y # CONFIG_EFI_LOADER is not set