From patchwork Sun May 5 13:24:00 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peng Fan X-Patchwork-Id: 1095431 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="TIyvVsP8"; dkim-atps=neutral Received: from lists.denx.de (dione.denx.de [81.169.180.215]) by ozlabs.org (Postfix) with ESMTP id 44xmpD5Dbtz9s3l for ; Sun, 5 May 2019 23:25:40 +1000 (AEST) Received: by lists.denx.de (Postfix, from userid 105) id 4C0EBC21DCA; Sun, 5 May 2019 13:24:41 +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 46C93C21C38; Sun, 5 May 2019 13:24:17 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id 28E57C21E0F; Sun, 5 May 2019 13:24:05 +0000 (UTC) Received: from EUR04-VI1-obe.outbound.protection.outlook.com (mail-eopbgr80089.outbound.protection.outlook.com [40.107.8.89]) by lists.denx.de (Postfix) with ESMTPS id 46CE8C21E02 for ; Sun, 5 May 2019 13:24:02 +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=tsIerBBNI2jpa2alD3bO60LFzBHMuKINxwvRg/rr0C4=; b=TIyvVsP853BsY3Z4/OwY72mHi8E9nx/uDxMoQDw+m4ytRvt77gAavv41+NaNq08JRqk2pPc6RmDAtnhDwVqwqFHv8yFwzxtzzwPwPFi1zl8zvVW73x6+RYqZiwJuAh4psXYehtlyzZL0sNUbWrBQZM9WhcygYqQ4eQPjwJXeDPw= Received: from AM0PR04MB4481.eurprd04.prod.outlook.com (52.135.147.15) by AM0PR04MB3970.eurprd04.prod.outlook.com (52.134.92.143) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1856.10; Sun, 5 May 2019 13:24:01 +0000 Received: from AM0PR04MB4481.eurprd04.prod.outlook.com ([fe80::3173:24:d401:2378]) by AM0PR04MB4481.eurprd04.prod.outlook.com ([fe80::3173:24:d401:2378%6]) with mapi id 15.20.1856.012; Sun, 5 May 2019 13:24:01 +0000 From: Peng Fan To: "sbabic@denx.de" , "festevam@gmail.com" Thread-Topic: [PATCH V2 4/4] imx: imx8dx/qxp: enable thermal Thread-Index: AQHVA0XN/RZggfoSO0iwB7m5+uPPhQ== Date: Sun, 5 May 2019 13:24:00 +0000 Message-ID: <20190505133713.27561-4-peng.fan@nxp.com> References: <20190505133713.27561-1-peng.fan@nxp.com> In-Reply-To: <20190505133713.27561-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: HK2PR04CA0073.apcprd04.prod.outlook.com (2603:1096:202:15::17) 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: 9ef96487-65ce-4b6a-30ac-08d6d15cefa4 x-ms-office365-filtering-ht: Tenant x-microsoft-antispam: BCL:0; PCL:0; RULEID:(2390118)(7020095)(4652040)(8989299)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(5600141)(711020)(4605104)(4618075)(2017052603328)(7193020); SRVR:AM0PR04MB3970; x-ms-traffictypediagnostic: AM0PR04MB3970: x-ld-processed: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635,ExtAddr x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:3383; x-forefront-prvs: 00286C0CA6 x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(346002)(39860400002)(366004)(136003)(396003)(376002)(189003)(199004)(66556008)(66476007)(66946007)(73956011)(25786009)(64756008)(66446008)(6512007)(6506007)(5660300002)(81166006)(81156014)(14454004)(386003)(66066001)(102836004)(6486002)(44832011)(2501003)(8936002)(316002)(71190400001)(86362001)(71200400001)(36756003)(486006)(6436002)(476003)(53936002)(2906002)(3846002)(14444005)(256004)(6116002)(446003)(11346002)(1076003)(52116002)(2616005)(305945005)(26005)(4326008)(186003)(478600001)(76176011)(8676002)(50226002)(99286004)(54906003)(110136005)(68736007)(7736002)(32563001); DIR:OUT; SFP:1101; SCL:1; SRVR:AM0PR04MB3970; 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: CxzqoLU5TYIOrGNjtaL29HWsXpGFZIReYtQ+nIWgw6lTsUjLoiHjKkWOw8+/jA0gOAEn8L+zpNPMssM3yQ8k/dRnoLvTU8g9HoERf+MAVC+9aI/AVoGs7QJTvsPVKP+AZzbIaUwsExgjY5mBcel3V2RBdoyXiCe2Uf+F4NyTfajtE9nTecajF3w5Eq/B6kDqq9JjggFj5sRrEXMFGHPnqh730D7oFoXrJn49MCOItHVNLBp38omDynMybPTq8NFTm2w8HsZk2JWrfbXWV2cpbLTgODZ9UfbaUfy9jljNQxRHpgtYSUdRsyZuNRMyGFoQHEDOZFW6bBhPX/ghW1JhWZ+h2GXW90eb4YMgd+PvtHsqtnY73kLnFDghzRzZqsZihgg5ZpP0QRCcrDnVZL7LaPSFySL68YVTZThCR4dSR7g= MIME-Version: 1.0 X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 9ef96487-65ce-4b6a-30ac-08d6d15cefa4 X-MS-Exchange-CrossTenant-originalarrivaltime: 05 May 2019 13:24:01.0093 (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: AM0PR04MB3970 Cc: "igor.opaniuk@toradex.com" , Marcel Ziswiler , "u-boot@lists.denx.de" , dl-uboot-imx Subject: [U-Boot] [PATCH V2 4/4] 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 --- V2: None 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 715abb413d..4fc87a9fc8 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"; @@ -543,6 +544,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 2fb2fdf7ff..6101f62087 100644 --- a/configs/imx8qxp_mek_defconfig +++ b/configs/imx8qxp_mek_defconfig @@ -74,5 +74,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