Received: by 2002:a05:6500:1b8f:b0:1fa:5c73:8e2d with SMTP id df15csp514604lqb; Wed, 29 May 2024 02:38:35 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCUnPSpIZBxi4zcQSkIzVoqyi+mc3NGEpwGBwQYYQdDXy5h0uc5JPEHXnhkOsiDrBm3aAO6WqWT2CSuH5YlMZwWDuuosbVIAILZRX6cNTQ== X-Google-Smtp-Source: AGHT+IEU1SpuXCBZ1i7qZrOtWpL11lreMvSpSPYt8E0hW2AMGxy4bOGupxea5MeZ9b+9v8wUktO3 X-Received: by 2002:a17:90b:4d89:b0:2c1:961c:790 with SMTP id 98e67ed59e1d1-2c1961c0873mr132797a91.30.1716975514891; Wed, 29 May 2024 02:38:34 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1716975514; cv=pass; d=google.com; s=arc-20160816; b=m+eaF1ZvIz7hCdlxgFf1LWYKlXemyuy8eeHdLqMNMSfxMfK+lRDUyxB+6oVXVCv7Fu T/uKcUt4lEETjIjcjee6Cd3avHkhbaYGH5la9rF/knN6FB7k6dq+Ezwh9wjc1NTbeFPz ir8KDk+ipJ4vLPgoGh6V3KN+MukXSTHqn558/KpDo0AdwnJo0SqNgOWUrhT45Hzz/Ki0 WacLSAb2qIOtwkcdZbTM1Ft660Yjqj7Uz7DEyIcUe1bPl259qh550+gX8MnFyftzrIVO crBZANAv/VQPL0cjMwId2LYG4V3zb3p0ONi/TU1BdMVGuy8ma3Hnp9B7eNOLTmlyzNWx VLxw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:date:message-id:dkim-signature; bh=ciTtYKEbBr+vQK3oiFVI2dnU7hwIdnBzRqy3mCB0PTM=; fh=odMJ4Y2GFRldCu+fryiq9sx8DBNVWSwFXKonq6q/SEE=; b=xyNCMr713te7NGHEEBsDX07sM8OgfChIzMAisGys5qiEWiQaBGoDBNzj122z8xyoQx 1FhfYmuGPm4SYWx17dfLe/Lzc0A4Fm7+7NRyixT6JaXVS6i+xisdakqwV20/gXpRJsoH /mxmXntj0pP0IYviZElQ3VVwj+tUgsxl/YkXlFrO8Vu3SwMomkJKyZh2bfbRbQtlPP86 +11sGZeQ5na+iLhGK3akPpLN7h89fRho1ewyF7LOAuoMs5A+EWtMjDwei4ecdFk4mJXi odadRrekMt5srmm5bnEY6/mRIYi4XTRQgCICLz6hStB7kMiri3hB5Yp2JVMZIpLyW7GF jQUg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@baylibre-com.20230601.gappssmtp.com header.s=20230601 header.b=jb1q293q; arc=pass (i=1 spf=pass spfdomain=baylibre.com dkim=pass dkdomain=baylibre-com.20230601.gappssmtp.com); spf=pass (google.com: domain of linux-kernel+bounces-193820-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-193820-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [2604:1380:40f1:3f00::1]) by mx.google.com with ESMTPS id 98e67ed59e1d1-2bf5fe35a40si9709947a91.119.2024.05.29.02.38.34 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 29 May 2024 02:38:34 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-193820-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) client-ip=2604:1380:40f1:3f00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@baylibre-com.20230601.gappssmtp.com header.s=20230601 header.b=jb1q293q; arc=pass (i=1 spf=pass spfdomain=baylibre.com dkim=pass dkdomain=baylibre-com.20230601.gappssmtp.com); spf=pass (google.com: domain of linux-kernel+bounces-193820-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-193820-linux.lists.archive=gmail.com@vger.kernel.org" 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 sy.mirrors.kernel.org (Postfix) with ESMTPS id EAF55B21731 for ; Wed, 29 May 2024 09:12:30 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 3332B169AD0; Wed, 29 May 2024 09:12:21 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=baylibre-com.20230601.gappssmtp.com header.i=@baylibre-com.20230601.gappssmtp.com header.b="jb1q293q" Received: from mail-wr1-f41.google.com (mail-wr1-f41.google.com [209.85.221.41]) (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 D76EA1E888 for ; Wed, 29 May 2024 09:12:17 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.221.41 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716973940; cv=none; b=rV+GAy+5py6K4PW7vELrclsSkXd7YJelrT9k/EGzXuq2qL4hdPplzlTOeYy6PqliQvi8ID5McbL3f/rrv5B2mD1ZP9Hz0l06ot1a+K+xOrAb0DR+9vJRK3gTE0ecFH57gEX0Ib9pH6qQTv3GM9XGhhBVmFXd7F0VwoyBNJyEK2I= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716973940; c=relaxed/simple; bh=0QL4BvsTjLA5ayAniWR5sm/TXQpiVSWPTQlZGz10zV8=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=QWIC5zkSXOVXV5JrSym2QtCTOLapnUQZmC1qmXP6aZmHdp3J1xU87sHIZGBR75EoIgjcHf6Q2OLB5MozJuX+cS7LtkPJDqdVIPvEk+6d1k9ip/5EsH5XhmbnBOegHryzbVXzmBRHMtJF4OkNC6zNuFSy5WVkTR2I4HEVYwpfg/M= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=baylibre.com; spf=pass smtp.mailfrom=baylibre.com; dkim=pass (2048-bit key) header.d=baylibre-com.20230601.gappssmtp.com header.i=@baylibre-com.20230601.gappssmtp.com header.b=jb1q293q; arc=none smtp.client-ip=209.85.221.41 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=baylibre.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=baylibre.com Received: by mail-wr1-f41.google.com with SMTP id ffacd0b85a97d-354faf5f1b4so1748930f8f.1 for ; Wed, 29 May 2024 02:12:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20230601.gappssmtp.com; s=20230601; t=1716973936; x=1717578736; darn=vger.kernel.org; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=ciTtYKEbBr+vQK3oiFVI2dnU7hwIdnBzRqy3mCB0PTM=; b=jb1q293qI9vAJoHURlEOf8Cn5tWvv9VkArgEGFlrCELK3M8icQFATwhEr37FtPp5iC 9SqN3QzOaWuikA760gUPv3+Px6Trv1+Lr/TY1GbBr80Ox3xJ4di+zvwwCDM1OPbmlRFg CPOZiOiS0On4+VoM4h0k7CEBdL24ExtsmOKxDNLHgemLsp1YdnDG/Fiy45pERJsN56PK HDddmZT9hQkK7RjhnI1C4Z37P6mAEoR8LBAvtPiFPTW5hyLvLLIEsA6a4HdvIwD6u51O ye8yhxaoxny5FI0SiHj7WcBNNtfNxx5Sz7p7HNY2/tpopVG+kryUuRZG8IIY6JZIoANJ jENw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1716973936; x=1717578736; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=ciTtYKEbBr+vQK3oiFVI2dnU7hwIdnBzRqy3mCB0PTM=; b=iM/Wi00QlY3GfpipE+PEqGfGxUQH1A0f8RS5Dsidd7zwuV2ROu/NImy2P31QA6HAoD tiFew/xVyqC1IP/tEPcAmKgh0k+3gYOLiJzDHTR4/LbmcgX4lGPfi1reE0jnmg6Wra2e OUGt5xDn/Qgo8tvD9QxF/yl49heZs17BsSg9YlPeniahOz5wWX49lMrlvJlmJKrUEiST e3O37zBlQAcfOYl6MlDoYfHczpidMQrwHT0DueW4pNkyufMt+yzM9jO9TEd7Ncu2cejR Oz+V6gwU+efb2lPbH5NsMpA/orhq6jZkecykZWXt2AAU9stmUurFP9YeUCpo7tLyzliZ EbPQ== X-Forwarded-Encrypted: i=1; AJvYcCUTWp1kn3712DmKXLkSBQ5FY51Ib4Ej5aE0NAKQp4zaAZJCvAt435Ug/phi82bI/ObkOlrYjUjYwaNSWBd185AFMK7yLkFgvheIorxF X-Gm-Message-State: AOJu0Yxj37w7dub/379nHgAIyzpeeh9U6sp9/3j94HBE68m/iKDhO4sp diZ2xfKhuo2AQiLrWs+LJyFGAxoYcve/L7wNVKuUTM0MVztvOo2L6wuJltQiKug= X-Received: by 2002:adf:ee0e:0:b0:354:e729:c101 with SMTP id ffacd0b85a97d-35527056972mr12104266f8f.12.1716973936132; Wed, 29 May 2024 02:12:16 -0700 (PDT) Received: from [192.168.1.70] ([84.102.31.110]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-3557a1c92f8sm14111197f8f.67.2024.05.29.02.12.14 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 29 May 2024 02:12:15 -0700 (PDT) Message-ID: <808db317-4cee-426b-a840-013a5e03098d@baylibre.com> Date: Wed, 29 May 2024 11:12:13 +0200 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v6 4/6] arm64: dts: mediatek: mt8186: add default thermal zones To: Chen-Yu Tsai , AngeloGioacchino Del Regno Cc: Rob Herring , Krzysztof Kozlowski , Conor Dooley , Matthias Brugger , Daniel Lezcano , Nicolas Pitre , "Rafael J. Wysocki" , Zhang Rui , Lukasz Luba , devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org, linux-pm@vger.kernel.org, Krzysztof Kozlowski References: <20240529-mtk-thermal-mt818x-dtsi-v6-0-0c71478a9c37@baylibre.com> <20240529-mtk-thermal-mt818x-dtsi-v6-4-0c71478a9c37@baylibre.com> <75826085-fd59-466a-b1de-b4c323c801c1@collabora.com> Content-Language: en-US From: Julien Panis In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit On 5/29/24 10:33, Chen-Yu Tsai wrote: > On Wed, May 29, 2024 at 4:17 PM AngeloGioacchino Del Regno > wrote: >> Il 29/05/24 07:57, Julien Panis ha scritto: >>> From: Nicolas Pitre >>> >>> Inspired by the vendor kernel but adapted to the upstream thermal >>> driver version. >>> >>> Signed-off-by: Nicolas Pitre >>> Signed-off-by: Julien Panis >> Reviewed-by: AngeloGioacchino Del Regno > I'm getting some crazy readings which would cause the machine to > immediately shutdown during boot. Anyone else see this? Or maybe > my device has bad calibration data? > > gpu_thermal-virtual-0 > Adapter: Virtual device > temp1: +229.7 C > > nna_thermal-virtual-0 > Adapter: Virtual device > temp1: +229.7 C > > cpu_big0_thermal-virtual-0 > Adapter: Virtual device > temp1: -7.2 C > > cpu_little2_thermal-virtual-0 > Adapter: Virtual device > temp1: +157.2 C > > cpu_little0_thermal-virtual-0 > Adapter: Virtual device > temp1: -277.1 C > > adsp_thermal-virtual-0 > Adapter: Virtual device > temp1: +229.7 C > > cpu_big1_thermal-virtual-0 > Adapter: Virtual device > temp1: +229.7 C > > cam_thermal-virtual-0 > Adapter: Virtual device > temp1: +45.4 C > > cpu_little1_thermal-virtual-0 > Adapter: Virtual device > temp1: -241.8 C It's likely that your device has bad calibration data indeed. We observed the same behavior on the mt8186 device we used (a Corsola) and finally realized that the golden temperature was 0 (device not properly calibrated). To make a comparison, we run chromiumos v5.15 and dmesg output was: 'This sample is not calibrated, fake !!' Additional debugging revealed that the golden temp was actually 0. As a result, chromiumos v5.15 does not use the calibration data. It uses some default values instead. That's why you can observe good temperatures with chromiumos v5.15 even with a device that is not calibrated. This feature is not implemented in the driver upstream, so you need a device properly calibrated to get good temperatures with it. When we forced this driver using the default values used by chromiumos v5.15 instead of real calib data (temporarily, just for testing), the temperatures were good. Please make sure your device is properly calibrated: 0 < golden temp < 62. Julien