Message ID | 20221029051449.30678-13-manivannan.sadhasivam@linaro.org |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:6687:0:0:0:0:0 with SMTP id l7csp1193195wru; Fri, 28 Oct 2022 22:20:03 -0700 (PDT) X-Google-Smtp-Source: AMsMyM4pM/SlHsxC/joYI+zF/atAQ/BCNDxYrbltUTk2fHBaXB1HYo1uvJvfEtltncb675uJ1HYt X-Received: by 2002:a05:6a00:2402:b0:52c:81cf:8df8 with SMTP id z2-20020a056a00240200b0052c81cf8df8mr3108919pfh.60.1667020802756; Fri, 28 Oct 2022 22:20:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1667020802; cv=none; d=google.com; s=arc-20160816; b=NwYD116VHpANLYP4sMjVCvL+jg7TKr3J86a1opbpWwZ77zY/6gpA0tPuTiTnRQUOkF wzM+wRpf3Hae2IrWJPu8EQJxpQ6JlYhP5gsvyIWnwwnnmFXQf1Aq4nkiwUjGdcm2hbl+ 8PLlT4pH+qG7oOFE8AUszpx4zvDEcfiyVG80pRRnADe1rVVLKfVpuCj/Ijq8/NXyH+Or VCFTjl3KH8bj5ys5buhqbBdjqmRp2BGt7pS0zmfSGjB3tNnT5olRcpEv55z6Gxt8MTqA gKCzqF0dL28t6XDy0axiN6e9xjjlPDeOyldMxbAp3nUKJK+Uh6VQleF7tSV8HoMiuVqq 0BTQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=dpyWOsS0FBSOmnylpOdwOjAVxC2jYFz7gdsUBGPUnb0=; b=MOzb/uy8GPxC9bfgXk10Ke3o1t5XjGfDZrg6cwIaeLyVwAGrEtsUAYEyNRTkKZx87X OlXFZqHZVYsJMSbaDppkCSHRvX7om2DQTuP/hI1anE1UJh2dBho1PWQWKIr4MgIm3OBc V76vjSWI12IT8WYvsbkA8+OzcZ02Tl7J9dEwbkp5Pa67DcK8+nCOg1/nEuR+s4Mke09Z erns+hN8r1pzBDetA6ZszelEkUNaZwrYHTctiem6U4njANqQWUMdi/ZkMYxBrdNCJLBl rNzq95swZo4vcHZgDym84tluj6grenTyQeOJ0QLOlhJ8tQINiDABBY2qwoTHkfQ5TjlB DVuw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=qzoXpid0; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id ok5-20020a17090b1d4500b002006b213af9si860263pjb.32.2022.10.28.22.19.49; Fri, 28 Oct 2022 22:20:02 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=qzoXpid0; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229483AbiJ2FQv (ORCPT <rfc822;pusanteemu@gmail.com> + 99 others); Sat, 29 Oct 2022 01:16:51 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58752 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229824AbiJ2FQW (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Sat, 29 Oct 2022 01:16:22 -0400 Received: from mail-pl1-x632.google.com (mail-pl1-x632.google.com [IPv6:2607:f8b0:4864:20::632]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8C5C9AF196 for <linux-kernel@vger.kernel.org>; Fri, 28 Oct 2022 22:16:05 -0700 (PDT) Received: by mail-pl1-x632.google.com with SMTP id d24so6545446pls.4 for <linux-kernel@vger.kernel.org>; Fri, 28 Oct 2022 22:16:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; 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=dpyWOsS0FBSOmnylpOdwOjAVxC2jYFz7gdsUBGPUnb0=; b=qzoXpid0DCIWb2RKt8w0bFIHln3U61B6bnegL/kf56vwhNn+IPJnNLiX2Mubujj/P4 /Ve39fktovVrJt9csGeFLKBuminWK8xrLY+Bfy6A0xh3jMzNAiOcNuEXF4EfQcJAQTra n+A1GyiXoeh4zqTLKeMQmHr1qpmGhEsAI37wq13R6RCWhYWem9t3KnVViOayMYrHjOOE zpnZlCxtQQtsXkJh1OfbcMp6ZWdM8xTRRNZjOeVguSEu1RUQgOFTQ69KaB1gg5BtGbpZ VIqbJfHz46kKTO4OkxjkVkAwdlFMP3GGzZ/UCxXOhL7go4v7LDRQP55GBa7g+spy5tu5 kYSA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; 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=dpyWOsS0FBSOmnylpOdwOjAVxC2jYFz7gdsUBGPUnb0=; b=rvXfoAVyQkU8RzUKxgbrAj527coPq+QP9Lqkezn4tmqzsZ2/hpTFBIA0YhFMYydCxt XoMyqCN4DXbgb3AWN+2tSX5az3P0J5Y0/O7lVmNzI72odeq26S/OnnW/mpvirUGkYI4S RSLWzS37NVxZfIHBPJDk/JtkPTHH/5g3LS8XR1yT2MpKLVCmt1oXw4sTzYSUKmUw36XO 0c+fQlDKLDlMivTPKIdMxab0boaAbd4fEeEPUC8uE+T0ZfS6Im1iC8DV62bThi5DLIEc EPsuxQ1h8CnF0wACPVzTSJ7DD9pEvUQXtWh+fpBL4wAqurjB4WttIWWcRdWY61kqd2v4 GSnw== X-Gm-Message-State: ACrzQf3PioG8fIwqJzL8jlURpNM9sTXFGHh08H+9EFgs7jW7SY7fpQeq 0hj9Bf0oWhosgLvi6AFjPjTU X-Received: by 2002:a17:90b:38d1:b0:210:99f9:9712 with SMTP id nn17-20020a17090b38d100b0021099f99712mr20447697pjb.57.1667020565035; Fri, 28 Oct 2022 22:16:05 -0700 (PDT) Received: from localhost.localdomain ([59.92.103.167]) by smtp.gmail.com with ESMTPSA id f5-20020a170902ce8500b0017e9b820a1asm363150plg.100.2022.10.28.22.16.00 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 28 Oct 2022 22:16:04 -0700 (PDT) From: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org> To: andersson@kernel.org Cc: konrad.dybcio@somainline.org, robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org, johan+linaro@kernel.org, quic_jprakash@quicinc.com, linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, steev@kali.org, Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org> Subject: [PATCH v2 12/12] arm64: dts: qcom: sc8280xp-x13s: Add thermal zone support Date: Sat, 29 Oct 2022 10:44:49 +0530 Message-Id: <20221029051449.30678-13-manivannan.sadhasivam@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20221029051449.30678-1-manivannan.sadhasivam@linaro.org> References: <20221029051449.30678-1-manivannan.sadhasivam@linaro.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1747998005435236747?= X-GMAIL-MSGID: =?utf-8?q?1747998005435236747?= |
Series |
sc8280xp-pmic updates and X13s thermal zone support
|
|
Commit Message
Manivannan Sadhasivam
Oct. 29, 2022, 5:14 a.m. UTC
Add thermal zone support by making use of the thermistor SYS_THERM6.
Based on experiments, this thermistor seems to reflect the actual
surface temperature of the laptop.
For the cooling device, all BIG CPU cores are throttle down to keep the
temperature at a sane level.
Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
---
.../qcom/sc8280xp-lenovo-thinkpad-x13s.dts | 46 +++++++++++++++++++
1 file changed, 46 insertions(+)
Comments
On 29.10.2022 07:14, Manivannan Sadhasivam wrote: > Add thermal zone support by making use of the thermistor SYS_THERM6. > Based on experiments, this thermistor seems to reflect the actual > surface temperature of the laptop. > > For the cooling device, all BIG CPU cores are throttle down to keep the s/throttle/throttled Is it okay to let the 4xA78C run at full throttle in thermal emergencies though? > temperature at a sane level. > > Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org> > --- > .../qcom/sc8280xp-lenovo-thinkpad-x13s.dts | 46 +++++++++++++++++++ > 1 file changed, 46 insertions(+) > > diff --git a/arch/arm64/boot/dts/qcom/sc8280xp-lenovo-thinkpad-x13s.dts b/arch/arm64/boot/dts/qcom/sc8280xp-lenovo-thinkpad-x13s.dts > index ca77c19c6d0d..96e2fa72f782 100644 > --- a/arch/arm64/boot/dts/qcom/sc8280xp-lenovo-thinkpad-x13s.dts > +++ b/arch/arm64/boot/dts/qcom/sc8280xp-lenovo-thinkpad-x13s.dts > @@ -29,6 +29,52 @@ backlight { > pinctrl-0 = <&edp_bl_en>, <&edp_bl_pwm>; > }; > > + thermal-zones { > + skin-temp-thermal { > + polling-delay-passive = <250>; > + polling-delay = <0>; > + thermal-sensors = <&pmk8280_adc_tm 5>; > + > + trips { > + skin_temp_alert0: trip-point0 { > + temperature = <55000>; > + hysteresis = <1000>; > + type = "passive"; > + }; > + > + skin_temp_alert1: trip-point1 { > + temperature = <58000>; > + hysteresis = <1000>; > + type = "passive"; > + }; > + > + skin-temp-crit { > + temperature = <73000>; Ouch, I didn't know we were serving burnt fingers at the cafeteria today :D Or maybe this just looks scary.. The laptop looks plastic, so maybe it won't cause instant burns? Konrad > + hysteresis = <1000>; > + type = "critical"; > + }; > + }; > + > + cooling-maps { > + map0 { > + trip = <&skin_temp_alert0>; > + cooling-device = <&CPU4 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>, > + <&CPU5 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>, > + <&CPU6 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>, > + <&CPU7 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>; > + }; > + > + map1 { > + trip = <&skin_temp_alert1>; > + cooling-device = <&CPU4 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>, > + <&CPU5 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>, > + <&CPU6 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>, > + <&CPU7 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>; > + }; > + }; > + }; > + }; > + > vreg_edp_bl: regulator-edp-bl { > compatible = "regulator-fixed"; >
On Sat, Oct 29, 2022 at 9:29 AM Konrad Dybcio <konrad.dybcio@somainline.org> wrote: > > > > On 29.10.2022 07:14, Manivannan Sadhasivam wrote: > > Add thermal zone support by making use of the thermistor SYS_THERM6. > > Based on experiments, this thermistor seems to reflect the actual > > surface temperature of the laptop. > > > > For the cooling device, all BIG CPU cores are throttle down to keep the > s/throttle/throttled > > Is it okay to let the 4xA78C run at full throttle in thermal emergencies though? > > temperature at a sane level. > > > > Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org> > > --- > > .../qcom/sc8280xp-lenovo-thinkpad-x13s.dts | 46 +++++++++++++++++++ > > 1 file changed, 46 insertions(+) > > > > diff --git a/arch/arm64/boot/dts/qcom/sc8280xp-lenovo-thinkpad-x13s.dts b/arch/arm64/boot/dts/qcom/sc8280xp-lenovo-thinkpad-x13s.dts > > index ca77c19c6d0d..96e2fa72f782 100644 > > --- a/arch/arm64/boot/dts/qcom/sc8280xp-lenovo-thinkpad-x13s.dts > > +++ b/arch/arm64/boot/dts/qcom/sc8280xp-lenovo-thinkpad-x13s.dts > > @@ -29,6 +29,52 @@ backlight { > > pinctrl-0 = <&edp_bl_en>, <&edp_bl_pwm>; > > }; > > > > + thermal-zones { > > + skin-temp-thermal { > > + polling-delay-passive = <250>; > > + polling-delay = <0>; > > + thermal-sensors = <&pmk8280_adc_tm 5>; > > + > > + trips { > > + skin_temp_alert0: trip-point0 { > > + temperature = <55000>; > > + hysteresis = <1000>; > > + type = "passive"; > > + }; > > + > > + skin_temp_alert1: trip-point1 { > > + temperature = <58000>; > > + hysteresis = <1000>; > > + type = "passive"; > > + }; > > + > > + skin-temp-crit { > > + temperature = <73000>; > Ouch, I didn't know we were serving burnt fingers at the cafeteria today :D > > Or maybe this just looks scary.. The laptop looks plastic, so maybe it won't cause instant > burns? > Disclaimer: I'm an end user that likes to cosplay as a kernel developer sometimes... IMO, it just looks scary. the skin-temp, afaik, is the temperature of the shell of the laptop, so once it reaches 73C, it would be crit. In practice (I've been testing this patch set for a while), I've never been able to hit 73C, even with the ambient temperature in my apartment being 77F and multiple compilations running. I've also tested a hack to increase the trips to a little bit higher (65/68/73) and still not been able to do so. On the flip side, without this patchset, we do not have any thermal trips at all, and the machine will quite happily run up to 90C (and I've not seen it shut down, but I wouldn't use it on my lap when this is occurring...) > Konrad > > + hysteresis = <1000>; > > + type = "critical"; > > + }; > > + }; > > + > > + cooling-maps { > > + map0 { > > + trip = <&skin_temp_alert0>; > > + cooling-device = <&CPU4 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>, > > + <&CPU5 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>, > > + <&CPU6 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>, > > + <&CPU7 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>; > > + }; > > + > > + map1 { > > + trip = <&skin_temp_alert1>; > > + cooling-device = <&CPU4 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>, > > + <&CPU5 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>, > > + <&CPU6 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>, > > + <&CPU7 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>; > > + }; > > + }; > > + }; > > + }; > > + > > vreg_edp_bl: regulator-edp-bl { > > compatible = "regulator-fixed"; > >
On Sat, Oct 29, 2022 at 04:29:05PM +0200, Konrad Dybcio wrote: > > > On 29.10.2022 07:14, Manivannan Sadhasivam wrote: > > Add thermal zone support by making use of the thermistor SYS_THERM6. > > Based on experiments, this thermistor seems to reflect the actual > > surface temperature of the laptop. > > > > For the cooling device, all BIG CPU cores are throttle down to keep the > s/throttle/throttled > > Is it okay to let the 4xA78C run at full throttle in thermal emergencies though? I don't get it. Can you elaborate? > > temperature at a sane level. > > > > Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org> > > --- > > .../qcom/sc8280xp-lenovo-thinkpad-x13s.dts | 46 +++++++++++++++++++ > > 1 file changed, 46 insertions(+) > > > > diff --git a/arch/arm64/boot/dts/qcom/sc8280xp-lenovo-thinkpad-x13s.dts b/arch/arm64/boot/dts/qcom/sc8280xp-lenovo-thinkpad-x13s.dts > > index ca77c19c6d0d..96e2fa72f782 100644 > > --- a/arch/arm64/boot/dts/qcom/sc8280xp-lenovo-thinkpad-x13s.dts > > +++ b/arch/arm64/boot/dts/qcom/sc8280xp-lenovo-thinkpad-x13s.dts > > @@ -29,6 +29,52 @@ backlight { > > pinctrl-0 = <&edp_bl_en>, <&edp_bl_pwm>; > > }; > > > > + thermal-zones { > > + skin-temp-thermal { > > + polling-delay-passive = <250>; > > + polling-delay = <0>; > > + thermal-sensors = <&pmk8280_adc_tm 5>; > > + > > + trips { > > + skin_temp_alert0: trip-point0 { > > + temperature = <55000>; > > + hysteresis = <1000>; > > + type = "passive"; > > + }; > > + > > + skin_temp_alert1: trip-point1 { > > + temperature = <58000>; > > + hysteresis = <1000>; > > + type = "passive"; > > + }; > > + > > + skin-temp-crit { > > + temperature = <73000>; > Ouch, I didn't know we were serving burnt fingers at the cafeteria today :D > > Or maybe this just looks scary.. The laptop looks plastic, so maybe it won't cause instant > burns? > 73c is what the reasonable number I came up with after some experiments. At this point the temperature won't burn your finger but crossing this surely would (that's what happening without this series). Thanks, Mani > Konrad > > + hysteresis = <1000>; > > + type = "critical"; > > + }; > > + }; > > + > > + cooling-maps { > > + map0 { > > + trip = <&skin_temp_alert0>; > > + cooling-device = <&CPU4 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>, > > + <&CPU5 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>, > > + <&CPU6 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>, > > + <&CPU7 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>; > > + }; > > + > > + map1 { > > + trip = <&skin_temp_alert1>; > > + cooling-device = <&CPU4 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>, > > + <&CPU5 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>, > > + <&CPU6 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>, > > + <&CPU7 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>; > > + }; > > + }; > > + }; > > + }; > > + > > vreg_edp_bl: regulator-edp-bl { > > compatible = "regulator-fixed"; > >
On 03/11/2022 06:50, Manivannan Sadhasivam wrote: > On Sat, Oct 29, 2022 at 04:29:05PM +0200, Konrad Dybcio wrote: >> >> On 29.10.2022 07:14, Manivannan Sadhasivam wrote: >>> Add thermal zone support by making use of the thermistor SYS_THERM6. >>> Based on experiments, this thermistor seems to reflect the actual >>> surface temperature of the laptop. >>> >>> For the cooling device, all BIG CPU cores are throttle down to keep the >> s/throttle/throttled >> >> Is it okay to let the 4xA78C run at full throttle in thermal emergencies though? > I don't get it. Can you elaborate? 8280xp has 4xA78C and 4xX1C. You only added the latter ones to the cooling map. > >>> temperature at a sane level. >>> >>> Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org> >>> --- >>> .../qcom/sc8280xp-lenovo-thinkpad-x13s.dts | 46 +++++++++++++++++++ >>> 1 file changed, 46 insertions(+) >>> >>> diff --git a/arch/arm64/boot/dts/qcom/sc8280xp-lenovo-thinkpad-x13s.dts b/arch/arm64/boot/dts/qcom/sc8280xp-lenovo-thinkpad-x13s.dts >>> index ca77c19c6d0d..96e2fa72f782 100644 >>> --- a/arch/arm64/boot/dts/qcom/sc8280xp-lenovo-thinkpad-x13s.dts >>> +++ b/arch/arm64/boot/dts/qcom/sc8280xp-lenovo-thinkpad-x13s.dts >>> @@ -29,6 +29,52 @@ backlight { >>> pinctrl-0 = <&edp_bl_en>, <&edp_bl_pwm>; >>> }; >>> >>> + thermal-zones { >>> + skin-temp-thermal { >>> + polling-delay-passive = <250>; >>> + polling-delay = <0>; >>> + thermal-sensors = <&pmk8280_adc_tm 5>; >>> + >>> + trips { >>> + skin_temp_alert0: trip-point0 { >>> + temperature = <55000>; >>> + hysteresis = <1000>; >>> + type = "passive"; >>> + }; >>> + >>> + skin_temp_alert1: trip-point1 { >>> + temperature = <58000>; >>> + hysteresis = <1000>; >>> + type = "passive"; >>> + }; >>> + >>> + skin-temp-crit { >>> + temperature = <73000>; >> Ouch, I didn't know we were serving burnt fingers at the cafeteria today :D >> >> Or maybe this just looks scary.. The laptop looks plastic, so maybe it won't cause instant >> burns? >> > 73c is what the reasonable number I came up with after some experiments. At > this point the temperature won't burn your finger but crossing this surely > would (that's what happening without this series). Ok, then I suppose it's fine. Thanks! Konrad > > Thanks, > Mani > >> Konrad >>> + hysteresis = <1000>; >>> + type = "critical"; >>> + }; >>> + }; >>> + >>> + cooling-maps { >>> + map0 { >>> + trip = <&skin_temp_alert0>; >>> + cooling-device = <&CPU4 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>, >>> + <&CPU5 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>, >>> + <&CPU6 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>, >>> + <&CPU7 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>; >>> + }; >>> + >>> + map1 { >>> + trip = <&skin_temp_alert1>; >>> + cooling-device = <&CPU4 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>, >>> + <&CPU5 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>, >>> + <&CPU6 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>, >>> + <&CPU7 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>; >>> + }; >>> + }; >>> + }; >>> + }; >>> + >>> vreg_edp_bl: regulator-edp-bl { >>> compatible = "regulator-fixed"; >>>
On Thu, Nov 03, 2022 at 11:02:30AM +0100, Konrad Dybcio wrote: > > On 03/11/2022 06:50, Manivannan Sadhasivam wrote: > > On Sat, Oct 29, 2022 at 04:29:05PM +0200, Konrad Dybcio wrote: > > > > > > On 29.10.2022 07:14, Manivannan Sadhasivam wrote: > > > > Add thermal zone support by making use of the thermistor SYS_THERM6. > > > > Based on experiments, this thermistor seems to reflect the actual > > > > surface temperature of the laptop. > > > > > > > > For the cooling device, all BIG CPU cores are throttle down to keep the > > > s/throttle/throttled > > > > > > Is it okay to let the 4xA78C run at full throttle in thermal emergencies though? > > I don't get it. Can you elaborate? > > 8280xp has 4xA78C and 4xX1C. You only added the latter ones to the cooling > map. > Right, that's because the first 4 cores doesn't contribute to thermal much and thottling them doesn't yield any thermal gain. Thanks, Mani > > > > > > > temperature at a sane level. > > > > > > > > Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org> > > > > --- > > > > .../qcom/sc8280xp-lenovo-thinkpad-x13s.dts | 46 +++++++++++++++++++ > > > > 1 file changed, 46 insertions(+) > > > > > > > > diff --git a/arch/arm64/boot/dts/qcom/sc8280xp-lenovo-thinkpad-x13s.dts b/arch/arm64/boot/dts/qcom/sc8280xp-lenovo-thinkpad-x13s.dts > > > > index ca77c19c6d0d..96e2fa72f782 100644 > > > > --- a/arch/arm64/boot/dts/qcom/sc8280xp-lenovo-thinkpad-x13s.dts > > > > +++ b/arch/arm64/boot/dts/qcom/sc8280xp-lenovo-thinkpad-x13s.dts > > > > @@ -29,6 +29,52 @@ backlight { > > > > pinctrl-0 = <&edp_bl_en>, <&edp_bl_pwm>; > > > > }; > > > > + thermal-zones { > > > > + skin-temp-thermal { > > > > + polling-delay-passive = <250>; > > > > + polling-delay = <0>; > > > > + thermal-sensors = <&pmk8280_adc_tm 5>; > > > > + > > > > + trips { > > > > + skin_temp_alert0: trip-point0 { > > > > + temperature = <55000>; > > > > + hysteresis = <1000>; > > > > + type = "passive"; > > > > + }; > > > > + > > > > + skin_temp_alert1: trip-point1 { > > > > + temperature = <58000>; > > > > + hysteresis = <1000>; > > > > + type = "passive"; > > > > + }; > > > > + > > > > + skin-temp-crit { > > > > + temperature = <73000>; > > > Ouch, I didn't know we were serving burnt fingers at the cafeteria today :D > > > > > > Or maybe this just looks scary.. The laptop looks plastic, so maybe it won't cause instant > > > burns? > > > > > 73c is what the reasonable number I came up with after some experiments. At > > this point the temperature won't burn your finger but crossing this surely > > would (that's what happening without this series). > > Ok, then I suppose it's fine. Thanks! > > > Konrad > > > > > Thanks, > > Mani > > > > > Konrad > > > > + hysteresis = <1000>; > > > > + type = "critical"; > > > > + }; > > > > + }; > > > > + > > > > + cooling-maps { > > > > + map0 { > > > > + trip = <&skin_temp_alert0>; > > > > + cooling-device = <&CPU4 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>, > > > > + <&CPU5 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>, > > > > + <&CPU6 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>, > > > > + <&CPU7 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>; > > > > + }; > > > > + > > > > + map1 { > > > > + trip = <&skin_temp_alert1>; > > > > + cooling-device = <&CPU4 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>, > > > > + <&CPU5 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>, > > > > + <&CPU6 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>, > > > > + <&CPU7 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>; > > > > + }; > > > > + }; > > > > + }; > > > > + }; > > > > + > > > > vreg_edp_bl: regulator-edp-bl { > > > > compatible = "regulator-fixed";
diff --git a/arch/arm64/boot/dts/qcom/sc8280xp-lenovo-thinkpad-x13s.dts b/arch/arm64/boot/dts/qcom/sc8280xp-lenovo-thinkpad-x13s.dts index ca77c19c6d0d..96e2fa72f782 100644 --- a/arch/arm64/boot/dts/qcom/sc8280xp-lenovo-thinkpad-x13s.dts +++ b/arch/arm64/boot/dts/qcom/sc8280xp-lenovo-thinkpad-x13s.dts @@ -29,6 +29,52 @@ backlight { pinctrl-0 = <&edp_bl_en>, <&edp_bl_pwm>; }; + thermal-zones { + skin-temp-thermal { + polling-delay-passive = <250>; + polling-delay = <0>; + thermal-sensors = <&pmk8280_adc_tm 5>; + + trips { + skin_temp_alert0: trip-point0 { + temperature = <55000>; + hysteresis = <1000>; + type = "passive"; + }; + + skin_temp_alert1: trip-point1 { + temperature = <58000>; + hysteresis = <1000>; + type = "passive"; + }; + + skin-temp-crit { + temperature = <73000>; + hysteresis = <1000>; + type = "critical"; + }; + }; + + cooling-maps { + map0 { + trip = <&skin_temp_alert0>; + cooling-device = <&CPU4 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>, + <&CPU5 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>, + <&CPU6 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>, + <&CPU7 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>; + }; + + map1 { + trip = <&skin_temp_alert1>; + cooling-device = <&CPU4 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>, + <&CPU5 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>, + <&CPU6 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>, + <&CPU7 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>; + }; + }; + }; + }; + vreg_edp_bl: regulator-edp-bl { compatible = "regulator-fixed";