Received: by 2002:a05:6a10:d5a5:0:0:0:0 with SMTP id gn37csp4070690pxb; Mon, 4 Oct 2021 16:45:57 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxk9lco4586m/BEK6HzRYM9CoTOfs3o9mjvVpvTkp85EGR/H26kssL0KFrZwZ/1BiZWmRff X-Received: by 2002:a17:906:274a:: with SMTP id a10mr21903745ejd.323.1633391157175; Mon, 04 Oct 2021 16:45:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1633391157; cv=none; d=google.com; s=arc-20160816; b=tOSBcXaj2pZzHZkQJ7wjXbw5gVQFbYAuJP3B5sCz+Q6trGVQolaKzlLq95FOTzK56c T80JmWENWjxNrmMIxP4GiSKMJrKD2kn7CUCQWQ/QRPT5xRZ259JeIdoDiQH33yFEbYBX PCLP5Liwv3YQqO0P44WiIIQ/X2Im6Bv7AfA/7q8ivqKh+8RkJLveZ3N0ohvmtjWynZVh YYdAkef/1bnxonLJ6BZDkHbwcpkoLFQpkIbTxq8NLfbbc5KDHYltFaUy8uhAgbBjT5Hl pSdW6WyXAEn+Pby4zoPr15CUpOf8YwyS8Ny1sUaip5y4++DQDYF00sdPf9OUDNBKWO8T jMtg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=zOyi2S95uxdbFdCGOc7m3K4Adp+itmzmW8gzb/ESD2A=; b=woR1dcDUQhrNQNRKKUYEHA4nonm6MEPwgcuY6hpcO8QuZEyv2oE1evMyuXEb6TiOxl w6+Pg8GQFkFVIFYXMYFdaPRz2NhZurLY4i5yTVGfXd1L8rdk9FrEkk1grUeP7ina7f5Y 7SX1Qdq+llnrCycQCDze0uFTkm/dyXqtz9gVrlUjiw0hTXR9BlLwQT4TAQYCoe1FbWdf H2VwvhUHPbP6krGtWuj/KKGzyIQKIpmL95FZio0wxi91/aZjJnW5fnSNvozY0OXqNglB MuKxIO1aQN1IdmmcLxBD7dOY4jQJmwB077YcP2xrSrE4RrEIADXcbNF3EJMPR8XH2lmM XnDw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=NHcT5M3m; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id m3si18167165ejn.256.2021.10.04.16.45.33; Mon, 04 Oct 2021 16:45:57 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=NHcT5M3m; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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 S235905AbhJDUPf (ORCPT + 99 others); Mon, 4 Oct 2021 16:15:35 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47314 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235912AbhJDUPd (ORCPT ); Mon, 4 Oct 2021 16:15:33 -0400 Received: from mail-oi1-x22b.google.com (mail-oi1-x22b.google.com [IPv6:2607:f8b0:4864:20::22b]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 58881C06174E for ; Mon, 4 Oct 2021 13:13:44 -0700 (PDT) Received: by mail-oi1-x22b.google.com with SMTP id z11so23218861oih.1 for ; Mon, 04 Oct 2021 13:13:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=zOyi2S95uxdbFdCGOc7m3K4Adp+itmzmW8gzb/ESD2A=; b=NHcT5M3mp7sXlQg/hJy4HQmFI4Ixa+1mArVErtOuxeYthCkG0IflqNJ/vr9/va2C/R vMtejRNBeHnf4z7M3fn+9rVBrsLQxmwiEnroet1ZokIGN27QHSMcLyKYVLS7gHO16r4C lrvB/VqjSugs30zuuNtHbfHjZOB3VXgBslVUO7alXhs1I9njL90EVQGFYy1lmUZR4LMc DLKnlYwrW3HjtS6ClV31364qZD4dUvxBJLOEcSnqGVRmrWNTV/on8w2bqtnzpI0tO6VE MLn4lq3Ajh8LxlsXqaqKreIVh/Wim+AxRy5V+wOQ+aAgkEbl3amzJiKA6Z+/HXnNFDDr bZfA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=zOyi2S95uxdbFdCGOc7m3K4Adp+itmzmW8gzb/ESD2A=; b=6vVItT/4+pqHFhvB/EQR5enxMN+5apa+vROQgrs592AvmNtdcgOuERv3qeyk9Fv+aQ 4nquceAiKBAA4qCj++VOA7QNmPzig970+cEqs7BtCeXctMPET0PicdGzZESu2yAO/WD/ ZovAyLogZVsFzLfdBdhHkklKew6CJ0S3EbsnG+9VSDjm6oAw1ry26fcc0QV/d9hC2MNP C6RGaGjR/ZN3Oyp/yfGVj1AHLZlAJqCREpJCN/Ehz0ual5ZBiAqIeYBYhZ/SR9VBKRp6 K2h/jviUlIq0XfecW1WOqxEpIqlyU+W6tDZv11yPDgJB11EJW4dpLg278U6+X4Yp70MC 7ulQ== X-Gm-Message-State: AOAM5307tku8BpxgH4qYxZhERnilVhdbbXQoay7Pr/JoNPbKOB12s4nF 1pIDroi/I6WPVYuGs5wPV9r7pw== X-Received: by 2002:a05:6808:8d4:: with SMTP id k20mr4026876oij.116.1633378423736; Mon, 04 Oct 2021 13:13:43 -0700 (PDT) Received: from ripper ([2600:1700:a0:3dc8:205:1bff:fec0:b9b3]) by smtp.gmail.com with ESMTPSA id s13sm1249546oou.11.2021.10.04.13.13.42 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 04 Oct 2021 13:13:43 -0700 (PDT) Date: Mon, 4 Oct 2021 13:15:26 -0700 From: Bjorn Andersson To: Matthias Kaehlcke , Dmitry Baryshkov Cc: Andy Gross , Zhang Rui , Daniel Lezcano , Amit Kucheria , Rob Herring , Thara Gopinath , linux-arm-msm@vger.kernel.org, linux-pm@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v2 4/4] arm64: dts: qcom: sdm845: mtp: Add vadc channels and thermal zones Message-ID: References: <20210923212311.2877048-1-bjorn.andersson@linaro.org> <20210923212311.2877048-5-bjorn.andersson@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed 29 Sep 11:40 PDT 2021, Matthias Kaehlcke wrote: > On Thu, Sep 23, 2021 at 02:23:11PM -0700, Bjorn Andersson wrote: > > Downstream defines four ADC channels related to thermal sensors external > > to the PM8998 and two channels for internal voltage measurements. > > > > Add these to the upstream SDM845 MTP, describe the thermal monitor > > channels and add thermal_zones for these. > > > > Signed-off-by: Bjorn Andersson > > --- > > > > In addition to the iio channels exposed by v1, Daniel wanted thermal_zones... > > > > Changes since v1: > > - Enable the pm8998_adc_tm and describe the ADC channels > > - Add thermal-zones for the new channels > > > > arch/arm64/boot/dts/qcom/sdm845-mtp.dts | 128 ++++++++++++++++++++++++ > > 1 file changed, 128 insertions(+) > > > > diff --git a/arch/arm64/boot/dts/qcom/sdm845-mtp.dts b/arch/arm64/boot/dts/qcom/sdm845-mtp.dts [..] > > +&pm8998_adc { > > + adc-chan@4c { > > + reg = ; > > + label = "xo_therm"; > > + }; > > + > > + adc-chan@4d { > > + reg = ; > > + label = "msm_therm"; > > + }; > > + > > + adc-chan@4f { > > + reg = ; > > + label = "pa_therm1"; > > + }; > > + > > + adc-chan@51 { > > + reg = ; > > + label = "quiet_therm"; > > + }; > > + > > + adc-chan@83 { > > + reg = ; > > + label = "vph_pwr"; > > + }; > > + > > + adc-chan@85 { > > + reg = ; > > + label = "vcoin"; > > + }; > > +}; > > + > > +&pm8998_adc_tm { > > + status = "okay"; > > + > > + xo-thermistor@1 { > > + reg = <1>; > > + io-channels = <&pm8998_adc ADC5_XO_THERM_100K_PU>; > > + qcom,ratiometric; > > + qcom,hw-settle-time-us = <200>; > > + }; > > + > > + msm-thermistor@2 { > > + reg = <2>; > > + io-channels = <&pm8998_adc ADC5_AMUX_THM1_100K_PU>; > > + qcom,ratiometric; > > + qcom,hw-settle-time-us = <200>; > > + }; > > + > > + pa-thermistor@3 { > > + reg = <3>; > > + io-channels = <&pm8998_adc ADC5_AMUX_THM3_100K_PU>; > > + qcom,ratiometric; > > + qcom,hw-settle-time-us = <200>; > > + }; > > + > > + quiet-thermistor@4 { > > + reg = <4>; > > + io-channels = <&pm8998_adc ADC5_AMUX_THM5_100K_PU>; > > + qcom,ratiometric; > > + qcom,hw-settle-time-us = <200>; > > + }; > > +}; > > + > > The example in the 'qcom,spmi-adc-tm5' binding specifies 'qcom,ratiometric' > and 'qcom,hw-settle-time-us' for both the ADC and the thermal monitor, so do > several board files (e.g. sm8250-mtp.dts and qrb5165-rb5.dts). This apparent > redundancy bothered me earlier, it's not really clear to me whether it's > needed/recommended or not. Do you happen to have any insights on this? Hmm, you're right and I missed this in defining my channels. I've not looked at this detail, just got reasonable readings from my thermal zones and was happy about that. Dmitry, do you have any further insights why these properties are supposed to be duplicated between the adc channel and the thermal zones? Thanks, Bjorn