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 D577EC4707B for ; Tue, 9 Jan 2024 20:14:06 +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:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=Bhn57p59QiC6gqVElC1K1Wpx9aHD6IWhNgSV8AzletU=; b=g1vvpE27bFICs+ 9dg9SNMFGX7RPFGh6U5xum278d3e8wYrHDGV13hyRMkXwR2zYFKgAEReVBP7EeKibHkp4Wjei04H2 KaZkiMRhhsj+fPch4E7zrnJubmXVPz1Y6N9a5U5tZ5Pyv473JnGgP30v1KmqZjZlGqMqK/e2VP7wx fHMQ4UQFp488hm0ogNFIKlt6feJ8iuvCQFYV5BRgawoeHwrLtw31MMZqWVfmIdVotCZm1VpA85XIo eCDD51GMqJxzbbbvvyrkETM5HlkR3ZYbJfvsH62VsJmr1zhxYukdEEer8c7sFaU/rCvjVny9+oY05 MswhpCIBPKa9wPkyi/yA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1rNITj-009QAU-0y; Tue, 09 Jan 2024 20:13:39 +0000 Received: from mail-wm1-x32a.google.com ([2a00:1450:4864:20::32a]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1rNITg-009QA8-0J for linux-arm-kernel@lists.infradead.org; Tue, 09 Jan 2024 20:13:37 +0000 Received: by mail-wm1-x32a.google.com with SMTP id 5b1f17b1804b1-40e54b2e437so1907235e9.2 for ; Tue, 09 Jan 2024 12:13:34 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1704831213; x=1705436013; darn=lists.infradead.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=ri1A4PylPs61GP02N60LyoFg+L+Yu7M2YLplX+7G6Qk=; b=bUM5TgmemE9vFi8KUn31i7cfNK1sE1RD+oZY3nK0skkVWlBbUV7TcQw6nAJk/Bhs6j 9zcuoL2uGooCvcFIT0P4KX3kt0nCm6hEHcSV1qUdKzrOBmZARUvf0mDoPFyyiGvVxdX4 OXm0LkE/KjkakFX9rfsp07zKVfbeyh2SQsW7XQDqNmJnOMx7S1fcanYrKoLSny25aAzI Z/GEbuuzTK+lRY4qkrGOIsJH/tY9G19x6Gs9D7/mX+DGUoKkPCDZt+z2ZhmvdD/r74aw de4ckuABqHP2Dd+/jPaB8DCwedF0MFRWQZYWtCbfkL7Icl6Iu/0K1kioZCs1Bu59Yfan 2YxA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1704831213; x=1705436013; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=ri1A4PylPs61GP02N60LyoFg+L+Yu7M2YLplX+7G6Qk=; b=X5nK99O5D3ZVAOsfdEnD54qbpuOUhnqrlbrdF7b/W2VttkVvXOcdnvJ+Fj/Y04tpgS WI4NCZs3NMokX0NRrZysVNEya0S2z2EEi9tNY2jLt/fmZUHO5hCZ5mMNeGAmvvBg/2NA BEKlpxjgd4unHISW8JGVz+XTyqtk8t4CA+oGlPCnPNTkAfAbH5/spp046cmoXUMgxE8Y jZ83jY8jp3mQA6RsnZRl8FjncrA7OHfjd99010JEMvaphF5ZQ66kxgU+0ku8wFQe6f3B 5vMGzhiA0Z7a5zfPVfCFG2sTjXZMYvTg5mHq53RUWIGOSeoR6C6qQa9o+T7rjkkHUgfn G+sQ== X-Gm-Message-State: AOJu0YwIDCsbGn15b/NdjoZ3/xh6x2XOZBykluTJyy1oVCuCJ7IiDKRH WBLjQtG4aOSaeMfSjvJbVMg= X-Google-Smtp-Source: AGHT+IFWeqJH8v4d6+tnLLqV4BNVKn2y5I5WhwFYoAeVK8N9t53Q9defYknIcJu4v4RiYmRY0DHgYA== X-Received: by 2002:a05:600c:34cd:b0:40e:44eb:c3a with SMTP id d13-20020a05600c34cd00b0040e44eb0c3amr2112091wmq.31.1704831212907; Tue, 09 Jan 2024 12:13:32 -0800 (PST) Received: from jernej-laptop.localnet (213-161-3-116.dynamic.telemach.net. [213.161.3.116]) by smtp.gmail.com with ESMTPSA id s11-20020a05600c45cb00b0040e395cd20bsm15857094wmo.7.2024.01.09.12.13.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 09 Jan 2024 12:13:32 -0800 (PST) From: Jernej =?utf-8?B?xaBrcmFiZWM=?= To: anarsoul@gmail.com, tiny.windzz@gmail.com, linux-sunxi@lists.linux.dev, Alexey Klimov Cc: rafael@kernel.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, wens@csie.org, 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 Date: Tue, 09 Jan 2024 21:13:02 +0100 Message-ID: <2252115.iZASKD2KPV@jernej-laptop> In-Reply-To: <20240101000008.65747-1-alexey.klimov@linaro.org> References: <20240101000008.65747-1-alexey.klimov@linaro.org> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240109_121336_137558_9A9CD6D8 X-CRM114-Status: GOOD ( 22.39 ) 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 Hi Alexey! Dne ponedeljek, 01. januar 2024 ob 01:00:08 CET je Alexey Klimov napisal(a): > 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 Please no Linux specific talk. Since DT is OS neutral let just talk about HW. > > 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"; > + }; Since GPU has OPP, can you add cooling maps with at least first trip point? Best regards, Jernej > + > + 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