Received: by 2002:a05:6358:111d:b0:dc:6189:e246 with SMTP id f29csp1322126rwi; Thu, 3 Nov 2022 04:04:35 -0700 (PDT) X-Google-Smtp-Source: AMsMyM43VQ3nCHFCYVZYAVgBoD20Rwm0uZi2w9r2ACWUlQhcQ2ETv6Ntu1AP5lYziVcTqKllLI21 X-Received: by 2002:a17:902:7446:b0:186:a3a1:782d with SMTP id e6-20020a170902744600b00186a3a1782dmr29676483plt.76.1667473475093; Thu, 03 Nov 2022 04:04:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1667473475; cv=none; d=google.com; s=arc-20160816; b=Stjpl1cZiTDSwYQgErVmZ89y+qn5TujLReF9p21K6zk2gMC8goq9IHMJhHj3TA5o2A OE1uUDUxP4mnWJ2Rh+2zeNqa1ZEeVIUqybxlPlwmfLc7peDJPFjt6EbOaguG41dlM1Sb 2vKiWkJBvlAr7pzLrJmcJ8inXuPhuNmvVnflb7hw9OmKvJPytx+xnEbprX1PGJI7i/GJ T/iiT2YvNIKBPZI8v3yWMwCoxjr96VVcfIS0ehW6xZ+Bi8X1xRswFlLQAD3R2EPIvHUI L7PKE9Y6O8O0pYo0Cs2sjFNxK3YFY0j4koR+3QBOfEnXPCZ6OE0gMFEjQuHWOoyGQMSw uUUA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:subject:user-agent:mime-version:date:message-id; bh=n5tafBwpZmJZpjpV4KYIu5x9Ryo1c/U/FZcQo/t1OmA=; b=fn9zoj0VRqlHvuVY0Dm0rtvKUxap6HmKrjRtthr4OHXDnMgsR6mbPHRFlMevzh4HEf kyOHsEU/zs/+BXv1eq/+WDnvoTiVAT6Utsz5fFToRtbCzuFkVWk3pyQ4PczA7KBXnYW9 KKIkMaGfMdg76GejCcW/tBZ7aoQ7rQOEapFRIfqyIHna51ozzKnFWu3WJUjVT4nZXBKw 1yg85CF5GhoMMtuTCn/s4/UgaWBba72la3m7WBWvqGV2jxJm+lvzQEfjdf8ewln8+sDG yXsNTsdKl0RiqY1HZVn01agVTXboaFabastHb4AIbfQCyCz7sfuqV9/KTG4lO1meWFvy utcw== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id r18-20020aa79892000000b0056381876081si509199pfl.328.2022.11.03.04.04.14; Thu, 03 Nov 2022 04:04:35 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231327AbiKCKCm (ORCPT + 97 others); Thu, 3 Nov 2022 06:02:42 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40600 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230487AbiKCKCi (ORCPT ); Thu, 3 Nov 2022 06:02:38 -0400 Received: from m-r1.th.seeweb.it (m-r1.th.seeweb.it [5.144.164.170]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 74B4E26F0 for ; Thu, 3 Nov 2022 03:02:37 -0700 (PDT) Received: from [192.168.31.208] (unknown [194.29.137.22]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by m-r1.th.seeweb.it (Postfix) with ESMTPSA id C26BA20240; Thu, 3 Nov 2022 11:02:29 +0100 (CET) Message-ID: Date: Thu, 3 Nov 2022 11:02:30 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:102.0) Gecko/20100101 Thunderbird/102.4.1 Subject: Re: [PATCH v2 12/12] arm64: dts: qcom: sc8280xp-x13s: Add thermal zone support To: Manivannan Sadhasivam Cc: andersson@kernel.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 References: <20221029051449.30678-1-manivannan.sadhasivam@linaro.org> <20221029051449.30678-13-manivannan.sadhasivam@linaro.org> <90b7e0e0-a354-f64d-8c53-aa80df684a3a@somainline.org> <20221103055014.GA8434@thinkpad> From: Konrad Dybcio In-Reply-To: <20221103055014.GA8434@thinkpad> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00,NICE_REPLY_A, RCVD_IN_DNSWL_LOW,SPF_HELO_NONE,SPF_PASS autolearn=unavailable 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: X-Mailing-List: linux-kernel@vger.kernel.org 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 >>> --- >>> .../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"; >>>