Received: by 2002:a05:7412:e794:b0:fa:551:50a7 with SMTP id o20csp558902rdd; Tue, 9 Jan 2024 12:13:46 -0800 (PST) X-Google-Smtp-Source: AGHT+IGVr2oHO8LKqMT2Ssvxe6OJ6mek+cGN5Mn0zbjKbJ6/l5TwUKCJ3oNlLaT8zPjB+BlWsu53 X-Received: by 2002:a17:907:70e:b0:a27:59a1:e0a2 with SMTP id xb14-20020a170907070e00b00a2759a1e0a2mr27808ejb.29.1704831226284; Tue, 09 Jan 2024 12:13:46 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1704831226; cv=none; d=google.com; s=arc-20160816; b=oJA4S7QNgzlsEO0NDV44rtoO1z6DnalObU78+r8HkemjyBvTc8v6bfpesTXrPEf2JQ fVzOaM8gvDTe/4dr+tu4bEqAqD6sR7ZucMuzG2kNDsII6X5DZhPmHWRZblVE0lONjMVs 2aAfFGlfZkJmcYb41lVC/1MUckmWgPJfQrwxazf7NYLxKLOkihhs4e7GGmUfmsV+t9F5 1sOFt3AyA7dGID3bvFY+9MQrMyC8VwJq3zY/VjEM42l/BR++IXyLF4UjVhgoOEGF2Meb Ge0PpOrpQzpQkTF/Y6S9u/UHVk/YjfpHb0s8bUsyDZWzCr+J12AsYU6Pz1GEwzhOn6do LEvw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=ri1A4PylPs61GP02N60LyoFg+L+Yu7M2YLplX+7G6Qk=; fh=XBI8UydCvkZpdQpLRGLzmIHA6y/4fgX25Rgi9Mf9+AM=; b=tqCK4mFY4suJx0hmkE5qNhZkLi7HtUzMqV8pzM8hZ52Wju1OuhVAcWGaruK7Nvrexr 6fBNyT+UFp96qblPtn879Txk33qEBqBi0yiEdX/qd5EykHqaEVbhCq6fMUve827bnMbv 04rhoAqNkO2lRul14X0j6A4mIqUoHK2qg9qF1pI+B0FBWmEIUnePsS5go5/BXc7tCoQO 9v0lXs8SDXg0c8fxdEjZCNnfMLAyFzHPlBKiAaMyCDzVPy/VkmeMtIkPN6085k+Kp4ON x2usvyY4iqI5qU4U3PHR/xjNfUDCpRHI529NL2wUGZDMMDOJxSD0sCnkcLsL88L3ee1c uspw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=hXyArfN9; spf=pass (google.com: domain of linux-kernel+bounces-21381-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-21381-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id r22-20020a170906281600b00a28d4ec88dasi1068916ejc.946.2024.01.09.12.13.46 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 09 Jan 2024 12:13:46 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-21381-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=hXyArfN9; spf=pass (google.com: domain of linux-kernel+bounces-21381-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-21381-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id 0EE141F258F6 for ; Tue, 9 Jan 2024 20:13:46 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 39AAA3D964; Tue, 9 Jan 2024 20:13:37 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="hXyArfN9" Received: from mail-wm1-f44.google.com (mail-wm1-f44.google.com [209.85.128.44]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id E42DC3A8E5; Tue, 9 Jan 2024 20:13:34 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-wm1-f44.google.com with SMTP id 5b1f17b1804b1-40e461c1f5bso27638515e9.3; 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=vger.kernel.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=hXyArfN9XRb3TpG+A62w8bVZYJLGVNzx0mKBp5JWS42BIFNRgy5bzCjGsET9gpimMP bxplGRH/L7bjbIvl4Rxl+PGDzvVo1v0qdEH2VTO1dMd3B3occ4twh6qX2ScMVV/yfjvL 3xjw4z/JotBwRwrM1CVOX79bBbYe8/Lof5ID4j1cMxP1Mj+6lOCzKb7MreyzUOHMoGXk a3wKtegzaN/+OAzFWsucV0mjJLTo1jyaFo3SaSaezuVEF+edLwMAcUnHBH5MnvbadBnq pB7v8MFOU7guPfGaSdo9kM50AQbGCvlegTOiRR5gdWmVlTPfd+29X03dRlOXzpvqmBBz s/IA== 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=B9q/jHofoWHZ0jjKOSHkFmc0Q0Fx+fmIeiUDlJx3vWiT2Punanxzmmt+QO88xYuXAG dIcQfS2oD1gQMeLqlDNXaxrINMeLa73Uh83cRMtRKhNIEs8LMe5uFNjuF9OiSfhjKAwn L3uWztV3najy1NsafRwiLmfgxVHTewHewq/Ja38Zvz2I8Z+FDRDP50qa+IydAbttMXuv 1zYwC33TWTa36HR6CtI+xrWS30MrKHmvYQGceFb1kzGzyRYE+Ztk+Yv0Vf2sUl22Ja/p 6LuEt9+kG5zdnWPAUi0GEpW/wy32uPF8NbuZUcHBW3EIKZlPNwEj8uA1tN7XFf8RMPdl V7IQ== X-Gm-Message-State: AOJu0YxNCm5FR5mC12FVU+vklLXth0BkBU718nddoL6WCkmCFb/+HpcX aLbLrd84CAaY7TIPg4hOeuAKY2yI1ZY= 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> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" 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"; > + }; > + }; > }; > }; > >