From patchwork Sun Sep 1 15:57:16 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Francesco Dolcini X-Patchwork-Id: 13786541 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 20F06C54FC6 for ; Sun, 1 Sep 2024 16:03:12 +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=uqCIwId1TqaArpD+Ua/VfFXHA7izDHzS5SszDWKTAx0=; b=H6swuqCRWRw+402wM8vQL7dsQX /GCBc/cwY10J/bReKufm3yrXgXELswghVeD3eeXW19EOj7bIV69gigeuIkWlRBmvnQFHpSJKRpYwi O+U1wshBHnDI/zjJyUCvFbY1agNaq+rVGV/XaxEAyF94UBUxidGflwXAggU3QmODEpK1YivHhQn2t BqULpi6EbGNHO9IeAMrkDsypEERhKn64UG5+ybAO2s1AToKyI5yatdwI70wmi3x/0rZqyVWFoV0A7 +DOjRYY78cajC9xZgCo2hsfQzFAOOLIbv49VnZuZ1pocacotuffrbtOGBEYI+Ehw5fAg8giffEKQp fiEweCMQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1skn2c-0000000BtuD-3fSu; Sun, 01 Sep 2024 16:03:02 +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 1skmxW-0000000Bskk-0mXN for linux-arm-kernel@lists.infradead.org; Sun, 01 Sep 2024 15:57:47 +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 7E2C51FA62; Sun, 1 Sep 2024 17:57:38 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=dolcini.it; s=default; t=1725206258; bh=uqCIwId1TqaArpD+Ua/VfFXHA7izDHzS5SszDWKTAx0=; h=From:To:Subject; b=w94XTqetAK0JcK49Hm1OqBLcbrIsXQOw8ck+PQxXWFqEByQ0SUKa+R/hz6QEGZNSJ NFnK0Rha4QUTP0NAdOgXeSK7VmXc4gGHsYONRqQGtJj5/8tYOA1C1ZEdyrDMDfnPrX 8l7cH4r/n3/JTJp/NaZ3aQI2axMgtmhGJz8PGDkI4uSqvHSOFcU/YN1jllx11IHm3l ZFlSTkcDaOxxskZiCgHo77dZynz1pbG86gwVOgXf09/yVctQVcyV4670j2Zyd8weMM XyQjXHAs/4OejBCWE+wM09M7k0ivfXfoF6VkWtCoiNgXUcSFHrum2oGo1tEqul6q6J eDANk7nwtZ3cA== 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 v2 05/10] arm64: dts: colibri-imx8x: Add PMIC thermal zone Date: Sun, 1 Sep 2024 17:57:16 +0200 Message-Id: <20240901155721.7912-6-francesco@dolcini.it> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240901155721.7912-1-francesco@dolcini.it> References: <20240901155721.7912-1-francesco@dolcini.it> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240901_085746_413868_DBA45E72 X-CRM114-Status: UNSURE ( 9.81 ) 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 --- v2: no changes --- .../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 60cf4e400052..bc1577b5f1ea 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;