From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 27B8FCDB474 for ; Thu, 12 Oct 2023 21:33:56 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=gu8Ks7/Xls/aWRRG3dJQBjD1MlVYVDHFiqPcnYV75XA=; b=MbpMvtvV6shgkZ /5Mqi64a9RXjuraECcIuI/Gq5CEH3lmAO8JvHMnsjcvby21juRqViGXUtRDhl2Vl4rsiFVoLhhVE2 eHp8OXD469Y/d0eCyTQh4manmTY42YbqertetODiAL5aSbHVeIm/f6J2wFFoo9tgBPi3KwWp+Lsxr 1YXjc6SbWp2iV/M3GEG0SHJR++ketQaNQflGa6vJROvYSxYNspTHmpVxMumwfnmONIH+/hFsUhR4v bBGxA0MldQxzlDy54FzCMJ2JnhS9LpW+FhX+E4WsbJfOXPmSJFieeQYVwkViK2aAr0QMDIWMz3fKY UQ5OdM4dg3eSkP9uKa7g==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qr3JB-001uL4-0X; Thu, 12 Oct 2023 21:33:29 +0000 Received: from mail-oo1-xc2f.google.com ([2607:f8b0:4864:20::c2f]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1qr3J6-001uJ4-0q for linux-arm-kernel@lists.infradead.org; Thu, 12 Oct 2023 21:33:27 +0000 Received: by mail-oo1-xc2f.google.com with SMTP id 006d021491bc7-57bbb38d5d4so719240eaf.2 for ; Thu, 12 Oct 2023 14:33:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1697146400; x=1697751200; darn=lists.infradead.org; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=2BYkIIVgUSUDIvsA7oyJJgebrxVB8pqETFUsWWaA5is=; b=VFaQLuqadYIxEPwQcHhF9C1cGMyyx425ZD5MB/8CaRT7IcnpZV7dgFQmCXh0KX/MG0 4agd6NLpkNOLuhL+cfrE/miUTT0rRWxpiK3GsHtSa4P4x4YZby1dvJT75ZdDefQ009G8 uH0zUcXH+8AYwTn/TJ11AruRmNcVZg3jt52vc= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1697146400; x=1697751200; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=2BYkIIVgUSUDIvsA7oyJJgebrxVB8pqETFUsWWaA5is=; b=NJEWCPb8ASQ85vz/fpwIncEx6RK/tenwFjuBC+LK7eptx+ael1Nzk+B2PxNTLtZhe3 JPgS66PbdlxBtQewDAtGoJ7MAC+p85mPMGthOK2sTZHp8FEiImdWRUolEA/YJx2Vsxes A3JWCjv85EDltsGDb1MhqSKzgjUCaVxwcZ3FIt32A6uuPwF0dCTyqRGdK9n2J3b7lvtB R77SSx8KpTN/WYdT5BrlwS9lflvqgs4/QWtFMObkOTOQsCuFpHRjjshzJ7rNL+L8vwaF Z8iqwa5UKsI5wXk46DbVNbz+3NTNDArmTOgB/sHaTeo7mAsuwvWvnnlSZQZ8oSQXz1f5 qt2g== X-Gm-Message-State: AOJu0YzaZRtR09YI6wjrEGiymAW7WkVtDGGoQzdZWw0D/T4unxwOhiZj Ag2u57lQuJckgCtk01t4+ftSTg== X-Google-Smtp-Source: AGHT+IEWHo3wYMQMcz7GsN7HjGYb7tuVwk/HPXskUKjfbq7nnE1N5b1naGdES5Ku76oGH6B7c1F9zA== X-Received: by 2002:a05:6358:988d:b0:135:b4c:a490 with SMTP id q13-20020a056358988d00b001350b4ca490mr26095712rwa.10.1697146400420; Thu, 12 Oct 2023 14:33:20 -0700 (PDT) Received: from google.com ([2401:fa00:1:10:7397:2561:ed13:bac8]) by smtp.gmail.com with ESMTPSA id n14-20020a62e50e000000b0069319bfed42sm12141026pff.79.2023.10.12.14.33.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 12 Oct 2023 14:33:19 -0700 (PDT) Date: Fri, 13 Oct 2023 05:33:16 +0800 From: Chen-Yu Tsai To: AngeloGioacchino Del Regno Cc: Alexandre Mergnat , matthias.bgg@gmail.com, robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org, kernel@collabora.com Subject: Re: [PATCH v2 1/4] arm64: dts: mediatek: cherry: Add platform thermal configuration Message-ID: <20231012213316.GA2659196@google.com> References: <20230424112523.1436926-1-angelogioacchino.delregno@collabora.com> <20230424112523.1436926-2-angelogioacchino.delregno@collabora.com> <31d1d1e4-2f75-bbbd-3e4b-6c796f2d39d1@baylibre.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <31d1d1e4-2f75-bbbd-3e4b-6c796f2d39d1@baylibre.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20231012_143324_321531_E97D67A5 X-CRM114-Status: GOOD ( 21.09 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Hi Angelo On Tue, Apr 25, 2023 at 01:46:42PM +0200, Alexandre Mergnat wrote: > On 24/04/2023 13:25, AngeloGioacchino Del Regno wrote: > > This platform has three auxiliary NTC thermistors, connected to the > > SoC's ADC pins. Enable the auxadc in order to be able to read the > > ADC values, add a generic-adc-thermal LUT for each and finally assign > > them to the SoC's thermal zones. > > > > Signed-off-by: AngeloGioacchino Del Regno > > Tested-by: Chen-Yu Tsai > > Reviewed-by: Chen-Yu Tsai > > --- > > .../boot/dts/mediatek/mt8195-cherry.dtsi | 105 ++++++++++++++++++ > > 1 file changed, 105 insertions(+) > > > > diff --git a/arch/arm64/boot/dts/mediatek/mt8195-cherry.dtsi b/arch/arm64/boot/dts/mediatek/mt8195-cherry.dtsi > > index 8ac80a136c37..4229f4f7dc2f 100644 > > --- a/arch/arm64/boot/dts/mediatek/mt8195-cherry.dtsi > > +++ b/arch/arm64/boot/dts/mediatek/mt8195-cherry.dtsi > > @@ -114,6 +114,77 @@ ppvar_sys: regulator-ppvar-sys { > > regulator-boot-on; > > }; > > + /* Murata NCP03WF104F05RL */ > > + tboard_thermistor1: thermal-sensor-t1 { > > + compatible = "generic-adc-thermal"; > > + #thermal-sensor-cells = <0>; > > + io-channels = <&auxadc 0>; > > + io-channel-names = "sensor-channel"; > > + temperature-lookup-table = < (-10000) 1553 > > + (-5000) 1485 > > + 0 1406 > > + 5000 1317 > > + 10000 1219 > > + 15000 1115 > > + 20000 1007 > > + 25000 900 > > + 30000 796 > > + 35000 697 > > + 40000 605 > > + 45000 523 > > + 50000 449 > > + 55000 384 > > + 60000 327 > > + 65000 279 > > + 70000 237 > > + 75000 202 > > + 80000 172 > > + 85000 147 > > + 90000 125 > > + 95000 107 > > + 100000 92 > > + 105000 79 > > + 110000 68 > > + 115000 59 > > + 120000 51 > > + 125000 44>; > > + }; > > + > > + tboard_thermistor2: thermal-sensor-t2 { > > + compatible = "generic-adc-thermal"; > > + #thermal-sensor-cells = <0>; > > + io-channels = <&auxadc 1>; > > + io-channel-names = "sensor-channel"; > > + temperature-lookup-table = < (-10000) 1553 > > + (-5000) 1485 > > + 0 1406 > > + 5000 1317 > > + 10000 1219 > > + 15000 1115 > > + 20000 1007 > > + 25000 900 > > + 30000 796 > > + 35000 697 > > + 40000 605 > > + 45000 523 > > + 50000 449 > > + 55000 384 > > + 60000 327 > > + 65000 279 > > + 70000 237 > > + 75000 202 > > + 80000 172 > > + 85000 147 > > + 90000 125 > > + 95000 107 > > + 100000 92 > > + 105000 79 > > + 110000 68 > > + 115000 59 > > + 120000 51 > > + 125000 44>; > > + }; > > + > > usb_vbus: regulator-5v0-usb-vbus { > > compatible = "regulator-fixed"; > > regulator-name = "usb-vbus"; > > @@ -260,6 +331,10 @@ &gpu { > > mali-supply = <&mt6315_7_vbuck1>; > > }; > > +&auxadc { > > Can you put it in alphabetical order please. ? I believe this patch needs to be respun? > > + status = "okay"; > > +}; > > + > > &i2c0 { > > status = "okay"; > > @@ -1098,6 +1173,36 @@ mt6315_7_vbuck1: vbuck1 { > > }; > > }; > > +&thermal_zones { > > + soc-area-thermal { > > + polling-delay = <1000>; > > + polling-delay-passive = <250>; > > + thermal-sensors = <&tboard_thermistor1>; > > + > > + trips { > > + trip-crit { > > + temperature = <84000>; > > + hysteresis = <1000>; > > + type = "critical"; > > + }; > > + }; > > + }; > > + > > + pmic-area-thermal { > > + polling-delay = <1000>; > > + polling-delay-passive = <0>; > > + thermal-sensors = <&tboard_thermistor2>; > > + > > + trips { > > + trip-crit { > > + temperature = <84000>; > > + hysteresis = <1000>; > > + type = "critical"; > > + }; > > + }; > > + }; > > +}; > > + > > &u3phy0 { > > status = "okay"; > > }; > > After that: > Reviewed-by: Alexandre Mergnat > > Regards, > Alexandre > _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel