From patchwork Mon Aug 26 21:59:17 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Francesco Dolcini X-Patchwork-Id: 13778565 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id C6034C5472C for ; Mon, 26 Aug 2024 22:04:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Content-Transfer-Encoding: MIME-Version:References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From: Reply-To:Content-Type:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=KaIgGdKJgM6VdCbreGRynqu6r3UROl0K8YfZBEpupGE=; b=hcxxr6PrSVJJCFYI8TFSEpfD6N wtZ0RokHXo0K1WA1JPlfxQlYemzyDO3MfZsN1Akk0TkihFtcd9L2NQAiqPzNtoTenhmSUe56q477H XcKbJWXmrgCfrzBmflSBu1X3mqub6uQW+UoCDhQCyH5e5G8/zICeIPcZKy13GANKPxyPQIfufUkYX nSbr3Hnmk/0Z0lLlqqBuiOIGjCSU9dwtSIcf7Nysfa02K4U/ARYYcmoVQgPcgKN9a6JYYopxA1UW7 zxYMF4QXfioukSb9XJCL2O/vpXGpTUEkXf20JryCO2HhnFDFR0XfJny/Ja43pGEwGCvNwsuuMj57f AkH7lUMw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sihp9-00000008vpz-1n4Y; Mon, 26 Aug 2024 22:04:31 +0000 Received: from mail11.truemail.it ([2001:4b7e:0:8::81]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sihkY-00000008ubg-3d9W for linux-arm-kernel@lists.infradead.org; Mon, 26 Aug 2024 21:59:48 +0000 Received: from francesco-nb.pivistrello.it (93-49-2-63.ip317.fastwebnet.it [93.49.2.63]) by mail11.truemail.it (Postfix) with ESMTPA id 44B022506B; Mon, 26 Aug 2024 23:59:39 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=dolcini.it; s=default; t=1724709579; bh=KaIgGdKJgM6VdCbreGRynqu6r3UROl0K8YfZBEpupGE=; h=From:To:Subject; b=CRNSzAEnw7nH3o5kk3X7wCvha5oZzSe1UzUnKkJbpdw1CgSTBrYL/KaYRTOemyw5f O9EVUFRQ982Z0KCxTmopMv8oS0Nt2M8dtanabsgI7FVHjHGEdlvbLwAPQITciL/ERG uWzleTg8pE2cFqSkuXAwrcs0NX8KIrgU58Tnd67pfy+acQp/TRimB/fZ9sp9wyEw8n DPZj4A/YYL6oJRJ855hQEDyAAnTUrJHl6OsSlB8RX3hNQEiQ1G3YHkRgro4zczTISk ICQA/6aM/GskV+hMwSZF32OGkUffdQG8iBmrKV9d8A8bWvYcTsW0VHsJW50TxuFsB4 Pf+6UgbzcSzUA== From: Francesco Dolcini To: Rob Herring , Krzysztof Kozlowski , Conor Dooley , Shawn Guo , Sascha Hauer , Pengutronix Kernel Team , Fabio Estevam Cc: Francesco Dolcini , devicetree@vger.kernel.org, imx@lists.linux.dev, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH v1 05/10] arm64: dts: colibri-imx8x: Add PMIC thermal zone Date: Mon, 26 Aug 2024 23:59:17 +0200 Message-Id: <20240826215922.13225-6-francesco@dolcini.it> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240826215922.13225-1-francesco@dolcini.it> References: <20240826215922.13225-1-francesco@dolcini.it> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240826_145947_094170_AC57A947 X-CRM114-Status: UNSURE ( 9.29 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org From: Francesco Dolcini Add PMIC thermal zones. Signed-off-by: Francesco Dolcini --- .../boot/dts/freescale/imx8dx-colibri.dtsi | 11 ++++++ .../boot/dts/freescale/imx8x-colibri.dtsi | 34 +++++++++++++++++-- 2 files changed, 43 insertions(+), 2 deletions(-) diff --git a/arch/arm64/boot/dts/freescale/imx8dx-colibri.dtsi b/arch/arm64/boot/dts/freescale/imx8dx-colibri.dtsi index 66b0fcc6687d..4d1ad052c5b6 100644 --- a/arch/arm64/boot/dts/freescale/imx8dx-colibri.dtsi +++ b/arch/arm64/boot/dts/freescale/imx8dx-colibri.dtsi @@ -9,3 +9,14 @@ / { model = "Toradex Colibri iMX8DX Module"; }; + +&thermal_zones { + pmic-thermal { + cooling-maps { + map0 { + cooling-device = <&A35_0 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>, + <&A35_1 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>; + }; + }; + }; +}; diff --git a/arch/arm64/boot/dts/freescale/imx8x-colibri.dtsi b/arch/arm64/boot/dts/freescale/imx8x-colibri.dtsi index 1d22002103c4..f6afce016ff2 100644 --- a/arch/arm64/boot/dts/freescale/imx8x-colibri.dtsi +++ b/arch/arm64/boot/dts/freescale/imx8x-colibri.dtsi @@ -88,8 +88,6 @@ &adc0 { vref-supply = <®_module_vref_1v8>; }; -/* TODO Cooling maps for DX */ - &cpu_alert0 { hysteresis = <2000>; temperature = <90000>; @@ -420,6 +418,38 @@ &sai0 { status = "okay"; }; +&thermal_zones { + pmic-thermal { + polling-delay-passive = <250>; + polling-delay = <2000>; + thermal-sensors = <&tsens IMX_SC_R_PMIC_0>; + + trips { + pmic_alert0: trip0 { + temperature = <110000>; + hysteresis = <2000>; + type = "passive"; + }; + + pmic_crit0: trip1 { + temperature = <125000>; + hysteresis = <2000>; + type = "critical"; + }; + }; + + cooling-maps { + pmic_cooling_map0: map0 { + trip = <&pmic_alert0>; + cooling-device = <&A35_0 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>, + <&A35_1 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>, + <&A35_2 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>, + <&A35_3 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>; + }; + }; + }; +}; + &usbotg1 { adp-disable; disable-over-current;