From mboxrd@z Thu Jan 1 00:00:00 1970 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 0742AC4706C for ; Fri, 12 Jan 2024 16:33:30 +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:References:In-Reply-To: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=jgUc3aX7bnKDhk5YMyiKj6GK/SnjcIOVAyiyHOvOzd4=; b=oYxmDWbE08lSHM z/JhrkcRjMn16pBgCc09cJNXE9QGN3OEULmcr13BH8ccAb/Yv0yAJB6h/SDs+1imjXEWu5o87rf52 UxG2jmWr0XYgzQVBUSijArZEVQ/H3SafQd8e4gfPSiFchUxhNlFjPjFuITkFYQOJfTsBPZC84N0Fm S/dD9JHy+jGLmWe3x1bbY228DNopQ+/QBbDIc/7drzJ1iJSX9w9DJpzY1JDy0y4ojcjhdLOpaGIDh 84roS++2QPQbX7QvcGLKeCQLe6ggYt29fKNHHoJuh8RTJFt/vsVa+znibupaXcSLzYW430hz/PqdA Fcl3Oj+S8ZYfiUt4uwrw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1rOKSq-003K5T-3C; Fri, 12 Jan 2024 16:33:01 +0000 Received: from foss.arm.com ([217.140.110.172]) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1rOKSn-003K3n-1k for linux-arm-kernel@lists.infradead.org; Fri, 12 Jan 2024 16:32:59 +0000 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 057191FB; Fri, 12 Jan 2024 08:33:37 -0800 (PST) Received: from donnerap.manchester.arm.com (usa-sjc-imap-foss1.foss.arm.com [10.121.207.14]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 7C2AD3F67D; Fri, 12 Jan 2024 08:32:48 -0800 (PST) Date: Fri, 12 Jan 2024 16:32:45 +0000 From: Andre Przywara To: Alexey Klimov Cc: anarsoul@gmail.com, tiny.windzz@gmail.com, linux-sunxi@lists.linux.dev, rafael@kernel.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, wens@csie.org, jernej.skrabec@gmail.com, samuel@sholland.org, daniel.lezcano@linaro.org, peter.griffin@linaro.org, klimov.linux@gmail.com Subject: Re: [PATCH RESEND] arm64: dts: allwinner: a64: Add thermal trip points for GPU Message-ID: <20240112163245.3be1aeaa@donnerap.manchester.arm.com> In-Reply-To: <20240101000008.65747-1-alexey.klimov@linaro.org> References: <20240101000008.65747-1-alexey.klimov@linaro.org> Organization: ARM X-Mailer: Claws Mail 3.18.0 (GTK+ 2.24.32; aarch64-unknown-linux-gnu) MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240112_083257_759559_4110CDF2 X-CRM114-Status: GOOD ( 22.22 ) 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: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Mon, 1 Jan 2024 00:00:08 +0000 Alexey Klimov wrote: Hi Alexey, > Without trip points for GPU, the following errors are printed in the > dmesg log and the sun8i-thermal driver fails to load: > > thermal_sys: Failed to find 'trips' node > thermal_sys: Failed to find trip points for thermal-sensor id=1 > sun8i-thermal: probe of 1c25000.thermal-sensor failed with error -22 Regardless of whether we should really *require* trip points (what Icenowy wanted to fix), I think it's good to have those values in the DT. The only question I have: where do those values come from? Is this coming from some BSP, or some downstream repository? If there are multiple sources: are the values across them consistent? I have seen a lot careless and unreflecting copy&paste in the past, so just want to make sure we get the right values. Cheers, Andre > When thermal zones are defined, trip points definitions are mandatory. > Trip values for the GPU are assumed to be the same values as the CPU > ones. The available specs do not provide any hints about thermal regimes > for the GPU and it seems GPU is implemented on the same die as the CPU. > > Tested on Pine a64+. > > Cc: Samuel Holland > Cc: Jernej Skrabec > Cc: Chen-Yu Tsai > Cc: Daniel Lezcano > Cc: devicetree@vger.kernel.org > Signed-off-by: Alexey Klimov > --- > arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi | 46 +++++++++++++++++++ > 1 file changed, 46 insertions(+) > > diff --git a/arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi b/arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi > index 62f45f71ec65..07963eea1bf0 100644 > --- a/arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi > +++ b/arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi > @@ -243,6 +243,29 @@ gpu0_thermal: gpu0-thermal { > polling-delay-passive = <0>; > polling-delay = <0>; > thermal-sensors = <&ths 1>; > + > + trips { > + gpu0_alert0: gpu0_alert0 { > + /* milliCelsius */ > + temperature = <75000>; > + hysteresis = <2000>; > + type = "passive"; > + }; > + > + gpu0_alert1: gpu0_alert1 { > + /* milliCelsius */ > + temperature = <90000>; > + hysteresis = <2000>; > + type = "hot"; > + }; > + > + gpu0_crit: gpu0_crit { > + /* milliCelsius */ > + temperature = <110000>; > + hysteresis = <2000>; > + type = "critical"; > + }; > + }; > }; > > gpu1_thermal: gpu1-thermal { > @@ -250,6 +273,29 @@ gpu1_thermal: gpu1-thermal { > polling-delay-passive = <0>; > polling-delay = <0>; > thermal-sensors = <&ths 2>; > + > + trips { > + gpu1_alert0: gpu1_alert0 { > + /* milliCelsius */ > + temperature = <75000>; > + hysteresis = <2000>; > + type = "passive"; > + }; > + > + gpu1_alert1: gpu1_alert1 { > + /* milliCelsius */ > + temperature = <90000>; > + hysteresis = <2000>; > + type = "hot"; > + }; > + > + gpu1_crit: gpu1_crit { > + /* milliCelsius */ > + temperature = <110000>; > + hysteresis = <2000>; > + type = "critical"; > + }; > + }; > }; > }; > _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel