Message ID | 20240211105326.506049-1-andrej.skvortzov@gmail.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel+bounces-60702-ouuuleilei=gmail.com@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:50ea:b0:106:860b:bbdd with SMTP id r10csp1868797dyd; Sun, 11 Feb 2024 02:54:00 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCXgwNdEle9yYhcAS2BTbZn9ZZgfigpbs7WmPpgYJXDXL8Zjj0g0QSUgb1h6BOcyV4ApsycadDw5Sn1omtkto5lm2HL8vA== X-Google-Smtp-Source: AGHT+IE3vMdgazByX/k1QnfwblZE5MnqwKFa22HII8+M7ilWmCSuYZ5qwOT9p1xR4vFGxzIdN43U X-Received: by 2002:a05:6359:4587:b0:179:2e7e:c3b3 with SMTP id no7-20020a056359458700b001792e7ec3b3mr5126441rwb.3.1707648840642; Sun, 11 Feb 2024 02:54:00 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1707648840; cv=pass; d=google.com; s=arc-20160816; b=L6+daOtpx3Dtm2XgwSkjOoG598DMmFBCuPhnz2HStvQgN2bLtJjkLUKZuEaJFX1yCf R+Lzcqq+xEHmJVmvphZegkmr+gPNUKLxFfA3BJvyBosf0SQhTDti9w+WdMD5ls0QFb1n AJmr3/UbJcnLUrVNKrFROt+mDpD2LzSqwUE5MaAVyAYZQII/N/OaEyFnX6u0gnm069+B BDHfiOvzEv5yeSgKBw3nulA2jb0KxGQxvUrIC2YyrrpMRqewezwmOF3tgs9WxMf4Rokn S52ynCc1GUFw0rT6o9k2MRD5GipN3UKDFJKl+NMCNddzW58UJnhAdeqKXtJ3v6zeNT+M tAWw== ARC-Message-Signature: i=2; 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:message-id:date:subject:cc:to :from:dkim-signature; bh=uO+FD++i6lu3R3UMtfKiyAbMLFBWQFc/P76C+86fYSw=; fh=kP52U1GjCPA3Df/YVMBD48q2ren2vcAnhcTOdr3AYvs=; b=JRthZZbbKH00DysxUtpVb5Xco9oocatMYTxIMgZ2K8GHTKpcGooy9sRtndijsWRWFW +L8QDoiZimx0jrFM8MGe1R/ZE7AvEDFK09mf1yAh+wLvWI2z4oXgCjDkGanUVt3a5H0W 8SWklkYqRoZdvuNH7dE5xAEgweG1iIJSDpvReFlMbAqwabpE1mkRV73f3SevCGfu0dik 3IhKQpZmrI0k1Vgldz7qSJwqyWMQ9E5urN+A5lxwXY1SXk3h9h8w1W6zHS0Ar7JyS37v StTTGfOw7qEpDDrnHOqde+/PW8Y96A9PDVSxTAKy32VqgNjLk0OeEIgGCWnVw0Xl3V4p /d0g==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=bdYKNLZ4; arc=pass (i=1 spf=pass spfdomain=gmail.com dkim=pass dkdomain=gmail.com dmarc=pass fromdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-60702-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-60702-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com X-Forwarded-Encrypted: i=2; AJvYcCX8EmEhWIyYH9LMTZwaGVvXfui0IMrqm6ZCu9Gj3FqTivkSmTU86LKwgcwZrnF09IxyxNB0Dfzkm3OP9VGVMlY9m0bOcA== Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id r9-20020aa79ec9000000b006e03e373076si3336806pfq.25.2024.02.11.02.54.00 for <ouuuleilei@gmail.com> (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 11 Feb 2024 02:54:00 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-60702-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=bdYKNLZ4; arc=pass (i=1 spf=pass spfdomain=gmail.com dkim=pass dkdomain=gmail.com dmarc=pass fromdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-60702-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-60702-ouuuleilei=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 sv.mirrors.kernel.org (Postfix) with ESMTPS id 53A4F282994 for <ouuuleilei@gmail.com>; Sun, 11 Feb 2024 10:54:00 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 2B5505A4EF; Sun, 11 Feb 2024 10:53:47 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="bdYKNLZ4" Received: from mail-lj1-f176.google.com (mail-lj1-f176.google.com [209.85.208.176]) (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 824A259174; Sun, 11 Feb 2024 10:53:42 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.208.176 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707648824; cv=none; b=N/EgaEUD9RUER7oTuYZHtr8EXZxmyHJBDU4nAj+6mhsenjwmXxsoEArPinv/1NJlV5YJwiuchdgu3fcFO6qEdQ4gxnE0RP37l6TcDTW5p7C+eL8bSynuBK88GXf5wNrnmoQMBP7i4beqDPC+/iMvNhuJVqHq7eG14ZEoXAzIwpU= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707648824; c=relaxed/simple; bh=aHVHW7Z9Vz8E35efk396ga0J8V70ILA+KvMuR//APMA=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=MYy7olzOWDiGLxO2g0S/MWbcS7/PkQcophLfzpimNezbHo/o32YY2rSVlEKYX7xtcyPtghMCEDWLYbvJaLAZI7VAsIk7AuV2M6HCyzXZXlt0+UylOj0VR+tmvw/kyc9Wb/dIduFN1ETia8TmCHNYB+xMxfFFrE4S1cNZsdmtCa0= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=bdYKNLZ4; arc=none smtp.client-ip=209.85.208.176 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-lj1-f176.google.com with SMTP id 38308e7fff4ca-2d0ed7cbd76so9094721fa.1; Sun, 11 Feb 2024 02:53:42 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1707648820; x=1708253620; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=uO+FD++i6lu3R3UMtfKiyAbMLFBWQFc/P76C+86fYSw=; b=bdYKNLZ4avyCYV/xWpProgwYZdbxw5QAViXW4qlgrJcAyz4wpIZTyy5YyPuFwyh3os 1bbli7YLnO4p+r/iWcoQ0ukevMzvQoToRcbRAX3YuiIkUA0VAs8hzyhjbYo8yqMQvE9p X8GgPD48h+wcgcUCZmYgBQ4Lztgbd4yhsfi6bDX60fo0Bs+/nWfaM3omSmO0cC3h2JCv zKmsvNRfDwg8Y4fl5tW9H124YRBzF6XDN8RHgTmYQkjBN/s/4ewiJ2NITIbbmaDiThNe F96NogJ3sWQ9PmeF7PmUd87vTXGdfhskHdxf+Nfkf3A6NSJ1IsucTVxSuUW2rvpbcWwD EGTA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1707648820; x=1708253620; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=uO+FD++i6lu3R3UMtfKiyAbMLFBWQFc/P76C+86fYSw=; b=Htz1D2d25RGuS5/i0pNo/OoPVLYBIqqOnkRoHyn3/RJP5N0M7x+ynrEGUcMEhy+Jmg 53r1sgOEscUMHqHYhapF4WpADrVOwgMe5LVwTLryRos+k1+XJx91gVXCQjfMQzJOgPFa oMgDxbF+PUFYAeASqeuII97BxQYBLCBvnxRq7Hu9z2+3fpOTL88YprerNpCTiTvGNRDG 31IkucgO9/ZnjeBD0sDm/DSRv3y73l4QtgDsJYOIHAuY1nvrsJdG5aXEwC3w8dUMuBjB hKJYhE4XdMY19kZRLjvUeXMXZfysryfEGn8afMSRPI6/StvQQxYPdeO1xHu+nWA4van5 mXjA== X-Forwarded-Encrypted: i=1; AJvYcCVhlwsqHGGgw+ux74AmuE02aJyz14mZ68SP4ZmgHUFURMhlupwWSm30b0rYYiR4x9XtsBVzRuPXLd2nV6zytaclYS/Qt7aqGMuQSClT7qmhCCrC2e09GheYK+5jJ81nnEMMdRRHAxYMAA== X-Gm-Message-State: AOJu0Yy5WptuvBrlItGn9USSve9s2Vt1q0vGZpQl4mtTUMcmDP24wCtr ze5HzkQ5PX1X1XO61e2hKDJXTNRU/tgEG9rH1/B2tTgSElehbPtZ X-Received: by 2002:a2e:a0c5:0:b0:2d0:41d1:8124 with SMTP id f5-20020a2ea0c5000000b002d041d18124mr2687733ljm.1.1707648820227; Sun, 11 Feb 2024 02:53:40 -0800 (PST) X-Forwarded-Encrypted: i=1; AJvYcCXq0bUGyM2L2ZMhPe3QpzgYa2IAkwmyOEM121qoFdMoe+SQp89/Lo1WfqGa3sgNYrtjmEojn5mz2kpuhustodB5Gp3JOTfyUfGcemSebzkqRrsrzReLXngmSqImWSCUdcrPz/07+oV80iYqDNefI0e+zcVybbPZbySaATJnRYzx+rM5sIpXUZoCcks5pf8Rb+GjC2d8ooGmLJKNGsr+GPaP1VxQgrr3JOYPVa/Eu1lAAmzUgZRr9XtNzadND3dP5LW0jke9n0sxDBdslvXAz1mFEHuv33a5akuoYGsUrm/DKxPYQf8uCtbcjHS6H0yb0g2W3bkFwhO+Sft9I0NbhvDwdfBhJGdGWolmywbcSpGmxjOqxtf8akVzUX1c17J9X1gZUKmKMp7cUChndpLB7bp8ki78slLaIKa2++EOs7zSiPAcnzNjVm4xmwTBaD57deNaCh8YnOJznTwImzoD1QNFKN28/ZKTrAC9Duni6hL+VBG0L2lXZQ== Received: from localhost.localdomain ([2a05:3580:f312:6c01:1b8f:2a1b:d18:1951]) by smtp.gmail.com with ESMTPSA id y5-20020a2e95c5000000b002cd34872be7sm893799ljh.25.2024.02.11.02.53.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 11 Feb 2024 02:53:39 -0800 (PST) From: Andrey Skvortsov <andrej.skvortzov@gmail.com> To: Rob Herring <robh+dt@kernel.org>, Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>, Conor Dooley <conor+dt@kernel.org>, Chen-Yu Tsai <wens@csie.org>, Jernej Skrabec <jernej.skrabec@gmail.com>, Samuel Holland <samuel@sholland.org>, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-sunxi@lists.linux.dev, linux-kernel@vger.kernel.org, Arnaud Ferraris <arnaud.ferraris@collabora.com>, Alexey Klimov <alexey.klimov@linaro.org> Cc: Daniel Lezcano <daniel.lezcano@linaro.org>, Andrey Skvortsov <andrej.skvortzov@gmail.com> Subject: [PATCH] arm64: dts: allwinner: a64: Add thermal trip points for GPU Date: Sun, 11 Feb 2024 13:53:26 +0300 Message-ID: <20240211105326.506049-1-andrej.skvortzov@gmail.com> X-Mailer: git-send-email 2.43.0 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: <linux-kernel.vger.kernel.org> List-Subscribe: <mailto:linux-kernel+subscribe@vger.kernel.org> List-Unsubscribe: <mailto:linux-kernel+unsubscribe@vger.kernel.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1790599590717142881 X-GMAIL-MSGID: 1790599590717142881 |
Series |
arm64: dts: allwinner: a64: Add thermal trip points for GPU
|
|
Commit Message
Andrey Skvortsov
Feb. 11, 2024, 10:53 a.m. UTC
From: Alexey Klimov <alexey.klimov@linaro.org> 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 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. 'make dtbs_check' complains about problem in dts for 18 A64-based boards supported by the kernel: sun50i-a64-pine64.dtb: thermal-zones: gpu0-thermal: 'trips' is a required property from schema $id: http://devicetree.org/schemas/thermal/thermal-zones.yaml# sun50i-a64-pine64.dtb: thermal-zones: gpu1-thermal: 'trips' is a required property from schema $id: http://devicetree.org/schemas/thermal/thermal-zones.yaml# Tested on Pine a64+ and PinePhone 1.2. Cc: Samuel Holland <samuel@sholland.org> Cc: Jernej Skrabec <jernej.skrabec@gmail.com> Cc: Chen-Yu Tsai <wens@csie.org> Cc: Daniel Lezcano <daniel.lezcano@linaro.org> Cc: devicetree@vger.kernel.org Signed-off-by: Alexey Klimov <alexey.klimov@linaro.org> Tested-by: Andrey Skvortsov <andrej.skvortzov@gmail.com> --- arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi | 46 +++++++++++++++++++ 1 file changed, 46 insertions(+)
Comments
On Sun, 11 Feb 2024 13:53:26 +0300 Andrey Skvortsov <andrej.skvortzov@gmail.com> wrote: Hi Andrey, > From: Alexey Klimov <alexey.klimov@linaro.org> > > Without trip points for GPU, the following errors are printed in the > dmesg log and the sun8i-thermal driver fails to load: So how does that post differ from Alexey one's a few weeks back: https://lore.kernel.org/linux-arm-kernel/20240101000008.65747-1-alexey.klimov@linaro.org/ It seems like the same patch? And Jernej and I had some comments (no mentioning of "Linux" in commit message, add cooling maps, source of trip temperature values), can you please try to address them? > 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 I think it's pretty obvious that the trip points are missing when they shouldn't, so this does not need too much explanation or rationale in the commit message, so you can cut this short. > 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. > > 'make dtbs_check' complains about problem in dts for 18 A64-based boards > supported by the kernel: > > sun50i-a64-pine64.dtb: thermal-zones: gpu0-thermal: 'trips' is a required property > from schema $id: http://devicetree.org/schemas/thermal/thermal-zones.yaml# > sun50i-a64-pine64.dtb: thermal-zones: gpu1-thermal: 'trips' is a required property > from schema $id: http://devicetree.org/schemas/thermal/thermal-zones.yaml# > > Tested on Pine a64+ and PinePhone 1.2. > > Cc: Samuel Holland <samuel@sholland.org> > Cc: Jernej Skrabec <jernej.skrabec@gmail.com> > Cc: Chen-Yu Tsai <wens@csie.org> > Cc: Daniel Lezcano <daniel.lezcano@linaro.org> > Cc: devicetree@vger.kernel.org > Signed-off-by: Alexey Klimov <alexey.klimov@linaro.org> > Tested-by: Andrey Skvortsov <andrej.skvortzov@gmail.com> You would need your Signed-off-by: here, since you send this, even when on Alexey's behalf. Cheers, Andre > > --- > 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 57ac18738c99..c25da7229e42 100644 > --- a/arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi > +++ b/arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi > @@ -244,6 +244,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 { > @@ -251,6 +274,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"; > + }; > + }; > }; > }; >
Hi Andre, On 24-02-11 12:52, Andre Przywara wrote: > On Sun, 11 Feb 2024 13:53:26 +0300 > Andrey Skvortsov <andrej.skvortzov@gmail.com> wrote: > > Hi Andrey, > > > From: Alexey Klimov <alexey.klimov@linaro.org> > > > > Without trip points for GPU, the following errors are printed in the > > dmesg log and the sun8i-thermal driver fails to load: > > So how does that post differ from Alexey one's a few weeks back: > https://lore.kernel.org/linux-arm-kernel/20240101000008.65747-1-alexey.klimov@linaro.org/ > It seems like the same patch? Yes, it's the same patch. I've added only information about failed dtbs_check errors in already supported boards to commit message. I've found this patch from June 2023 without any feedback. [1] Since I've worked on dts changes for PinePhone A64, I've decided to resend it. Sorry, I wasn't aware that Alexey resent it in the mean time. It's better to continue discussion in original Alexey's patch. > And Jernej and I had some comments (no mentioning of "Linux" in commit > message, add cooling maps, source of trip temperature values), can you > please try to address them? > > > > 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 > > I think it's pretty obvious that the trip points are missing when they > shouldn't, so this does not need too much explanation or rationale in > the commit message, so you can cut this short. > > > 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. > > > > 'make dtbs_check' complains about problem in dts for 18 A64-based boards > > supported by the kernel: > > > > sun50i-a64-pine64.dtb: thermal-zones: gpu0-thermal: 'trips' is a required property > > from schema $id: http://devicetree.org/schemas/thermal/thermal-zones.yaml# > > sun50i-a64-pine64.dtb: thermal-zones: gpu1-thermal: 'trips' is a required property > > from schema $id: http://devicetree.org/schemas/thermal/thermal-zones.yaml# > > > > Tested on Pine a64+ and PinePhone 1.2. > > > > Cc: Samuel Holland <samuel@sholland.org> > > Cc: Jernej Skrabec <jernej.skrabec@gmail.com> > > Cc: Chen-Yu Tsai <wens@csie.org> > > Cc: Daniel Lezcano <daniel.lezcano@linaro.org> > > Cc: devicetree@vger.kernel.org > > Signed-off-by: Alexey Klimov <alexey.klimov@linaro.org> > > Tested-by: Andrey Skvortsov <andrej.skvortzov@gmail.com> > > You would need your Signed-off-by: here, since you send this, even when > on Alexey's behalf. > > Cheers, > Andre > 1. https://lkml.org/lkml/2023/6/4/416
On Sun, 11 Feb 2024 17:24:19 +0300 Andrey Skvortsov <andrej.skvortzov@gmail.com> wrote: Hi Andrey, > Hi Andre, > > On 24-02-11 12:52, Andre Przywara wrote: > > On Sun, 11 Feb 2024 13:53:26 +0300 > > Andrey Skvortsov <andrej.skvortzov@gmail.com> wrote: > > > > Hi Andrey, > > > > > From: Alexey Klimov <alexey.klimov@linaro.org> > > > > > > Without trip points for GPU, the following errors are printed in the > > > dmesg log and the sun8i-thermal driver fails to load: > > > > So how does that post differ from Alexey one's a few weeks back: > > https://lore.kernel.org/linux-arm-kernel/20240101000008.65747-1-alexey.klimov@linaro.org/ > > It seems like the same patch? > > Yes, it's the same patch. I've added only information about failed > dtbs_check errors in already supported boards to commit message. > I've found this patch from June 2023 without any feedback. [1] Since I've > worked on dts changes for PinePhone A64, I've decided to resend > it. Sorry, I wasn't aware that Alexey resent it in the mean time. No worries, that's fine, thanks for the explanation. > It's better to continue discussion in original Alexey's patch. Will Alexey have time to reply and resend? If not, or if you are not sure (it's been a while), it's fine to take over this series, and send a v2, by yourself. If you can just explicitly state that the GPU trip point values are copied from the CPU ones (because they share a die), I am happy as far as my comment is concerned. This is arguably somewhat mentioned in the commit message already, but I missed it on the first read, so would like to see this more prominently stated. As mentioned before, and also stated by Jernej, consider this patch purely device-specific, not related to any Linux behaviour, and give rationale only based on the binding, which requires trip points. Something simple as "The DT binding requires trip points, and dt-validate complains about them missing for any A64 boards." should suffice. Thanks, Andre > > And Jernej and I had some comments (no mentioning of "Linux" in commit > > message, add cooling maps, source of trip temperature values), can you > > please try to address them? > > > > > > > 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 > > > > I think it's pretty obvious that the trip points are missing when they > > shouldn't, so this does not need too much explanation or rationale in > > the commit message, so you can cut this short. > > > > > 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. > > > > > > 'make dtbs_check' complains about problem in dts for 18 A64-based boards > > > supported by the kernel: > > > > > > sun50i-a64-pine64.dtb: thermal-zones: gpu0-thermal: 'trips' is a required property > > > from schema $id: http://devicetree.org/schemas/thermal/thermal-zones.yaml# > > > sun50i-a64-pine64.dtb: thermal-zones: gpu1-thermal: 'trips' is a required property > > > from schema $id: http://devicetree.org/schemas/thermal/thermal-zones.yaml# > > > > > > Tested on Pine a64+ and PinePhone 1.2. > > > > > > Cc: Samuel Holland <samuel@sholland.org> > > > Cc: Jernej Skrabec <jernej.skrabec@gmail.com> > > > Cc: Chen-Yu Tsai <wens@csie.org> > > > Cc: Daniel Lezcano <daniel.lezcano@linaro.org> > > > Cc: devicetree@vger.kernel.org > > > Signed-off-by: Alexey Klimov <alexey.klimov@linaro.org> > > > Tested-by: Andrey Skvortsov <andrej.skvortzov@gmail.com> > > > > You would need your Signed-off-by: here, since you send this, even when > > on Alexey's behalf. > > > > Cheers, > > Andre > > > > 1. https://lkml.org/lkml/2023/6/4/416 >
diff --git a/arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi b/arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi index 57ac18738c99..c25da7229e42 100644 --- a/arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi +++ b/arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi @@ -244,6 +244,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 { @@ -251,6 +274,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"; + }; + }; }; };