From patchwork Wed Mar 6 10:58:35 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Geert Uytterhoeven X-Patchwork-Id: 13583930 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 D6969C54E41 for ; Wed, 6 Mar 2024 10:59:13 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-Id:Date:Subject:Cc :To:From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=StIjUpIsrg85kHvityuQE6Vms3TLXtT2HLpAbR/dAd8=; b=r232rgwQHwN9eR clGCMPYEFbRD3YwAVQuJsrIFMgn36O02/wozqpLu8xNu5Qs3IH+Jm7t7hwkZsji3t/d0YV7zR3ZKt GFwZA9n0lZmfRcM+aXdL7izdBWQDJLL235kpW3V2T3HeHYD1u7y5hag6QaeCms9+Nv3RpstAVyOfL p3JDFYKiYFjGCk9Swcq65H5S3kGDzSm4Bzt+XoTEOXiR+bdjPC6HjmO7ER6Syd6qwO9U4ezGPNcwd XBhEhY8j1ZSIj/jEp2hMUVk7ap8WqU7DeCK/ilyg8yJWO87KlS/uQmoNKnicn9GkU9eTFzClt6HdS /BCTUn7nROQaRyAnvuVQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1rhozB-0000000HXgp-2Idh; Wed, 06 Mar 2024 10:58:57 +0000 Received: from albert.telenet-ops.be ([2a02:1800:110:4::f00:1a]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1rhoz5-0000000HXdJ-2RGp for linux-arm-kernel@lists.infradead.org; Wed, 06 Mar 2024 10:58:55 +0000 Received: from ramsan.of.borg ([84.195.187.55]) by albert.telenet-ops.be with bizsmtp id vNyj2B00P1C8whw06Nyj41; Wed, 06 Mar 2024 11:58:44 +0100 Received: from rox.of.borg ([192.168.97.57]) by ramsan.of.borg with esmtp (Exim 4.95) (envelope-from ) id 1rhoyk-002Y9V-JX; Wed, 06 Mar 2024 11:58:43 +0100 Received: from geert by rox.of.borg with local (Exim 4.95) (envelope-from ) id 1rhoyx-00EMM2-Nj; Wed, 06 Mar 2024 11:58:43 +0100 From: Geert Uytterhoeven To: Magnus Damm Cc: linux-renesas-soc@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Duy Nguyen , Geert Uytterhoeven Subject: [PATCH] arm64: dts: renesas: r8a779h0: Add thermal nodes Date: Wed, 6 Mar 2024 11:58:35 +0100 Message-Id: X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240306_025851_833893_B3BE765F X-CRM114-Status: GOOD ( 10.45 ) 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: Duy Nguyen Add device nodes for the Thermal Sensor/Chip Internal Voltage Monitor/Core Voltage Monitor (THS/CIVM/CVM) and the various thermal zones on the Renesas R-Car V4M (R8A779H0) SoC. Add support for 2 TSC nodes of thermal. Signed-off-by: Duy Nguyen Signed-off-by: Geert Uytterhoeven Reviewed-by: Niklas Söderlund --- Tested on Renesas Gray Hawk Single with an R-Car V4M SoC that has unfortunately no calibration values fused. To be queued in renesas-devel for v6.10. Changes compared to the BSP: - Drop bogus interrupts property, as interrupts are routed to the ECM, - Change polling-delay from <0> to <1000> as interrupts are not supported. --- arch/arm64/boot/dts/renesas/r8a779h0.dtsi | 40 +++++++++++++++++++++++ 1 file changed, 40 insertions(+) diff --git a/arch/arm64/boot/dts/renesas/r8a779h0.dtsi b/arch/arm64/boot/dts/renesas/r8a779h0.dtsi index 11885729181bc903..a01929231e08fa30 100644 --- a/arch/arm64/boot/dts/renesas/r8a779h0.dtsi +++ b/arch/arm64/boot/dts/renesas/r8a779h0.dtsi @@ -318,6 +318,16 @@ sysc: system-controller@e6180000 { #power-domain-cells = <1>; }; + tsc: thermal@e6198000 { + compatible = "renesas,r8a779h0-thermal"; + reg = <0 0xe6198000 0 0x200>, + <0 0xe61a0000 0 0x200>; + clocks = <&cpg CPG_MOD 919>; + power-domains = <&sysc R8A779H0_PD_ALWAYS_ON>; + resets = <&cpg 919>; + #thermal-sensor-cells = <1>; + }; + i2c0: i2c@e6500000 { compatible = "renesas,i2c-r8a779h0", "renesas,rcar-gen4-i2c"; @@ -653,6 +663,36 @@ prr: chipid@fff00044 { }; }; + thermal-zones { + sensor_thermal_cr52: sensor1-thermal { + polling-delay-passive = <250>; + polling-delay = <1000>; + thermal-sensors = <&tsc 0>; + + trips { + sensor1_crit: sensor1-crit { + temperature = <120000>; + hysteresis = <1000>; + type = "critical"; + }; + }; + }; + + sensor_thermal_ca76: sensor2-thermal { + polling-delay-passive = <250>; + polling-delay = <1000>; + thermal-sensors = <&tsc 1>; + + trips { + sensor2_crit: sensor2-crit { + temperature = <120000>; + hysteresis = <1000>; + type = "critical"; + }; + }; + }; + }; + timer { compatible = "arm,armv8-timer"; interrupts-extended = <&gic GIC_PPI 13 IRQ_TYPE_LEVEL_LOW>,