Received: by 2002:a05:6a10:1d13:0:0:0:0 with SMTP id pp19csp2817803pxb; Tue, 24 Aug 2021 08:16:45 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwLuDrS5iDn4GiyQ/4Ew5EdRrynEgKvs7zXT5sJcpOplcYNOc/M3TZsODMyDRm2nsLqF3WZ X-Received: by 2002:a05:6e02:524:: with SMTP id h4mr27278271ils.203.1629818205638; Tue, 24 Aug 2021 08:16:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1629818205; cv=none; d=google.com; s=arc-20160816; b=rIZh5429WM4i6VKPaq/bRFsX3VGku+IodLQyHiTs0NUxaH7ra9arSr0gB3bCNo2NNc ar0w3GgI144pqZ4aSDPh20jPLMnDwg/pWcAfodqwn++kSTERwdOollWCyGeF6w4/RGUh IQghv7tBkxZevU/F8DgQCkD9I7SNi95Y9HiubQsAFjV6J2zeuk9aGCHof0g3DXzm9jFX EEXhF5DRffIKcJ2MvhcN7DQrtiRgEBBzDXL6vir34Iu2Xk2Mggb94tsRY/+Tvf+buV0S qsBtR35RIPXOAp3fK9Q2b2ojaVDqmbBvBKOKeKWaOrlu2vg3T2wWfAsFpn3FOMOyzpHh shbA== 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-transfer-encoding :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=Y0kEI+D7S9zjGZEzmEP8rK0NWN9F8ml/ZbrO8rwdGoc=; b=IwYj+k9ydM2o7efmpQZZl/uxD47SnFI1p1552iDFF7ssb0+80CNYeYVcudBx7rzLbW 8ZhxbMFmQJTWldtD2a0tV5Ao0YTzpOVuZsggJ2CXpOwQ07kJjXaqy++xbNcA0z+f66Qe PPxSqrBZMxdE30BRp2eE1w5YpfsDPhSpq+Lcz2chFqpXxIgBcDbKZgww+NQnPblu43So Kh/J8gjJgJYneLKN6bPuyum2GXUcxgP5X3AixvQt9SVTe6jT79Vq3NF7CydVNkeEiIeb CBvYi3uNV0yyYbIh05M+KveieUE8Rm8Kj7GhFgukRzv6C+4EjYy6UM/wuG/dhIUNC0in bpHA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=rpzC8nqx; 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 e11si17171404iot.82.2021.08.24.08.16.32; Tue, 24 Aug 2021 08:16:45 -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=rpzC8nqx; 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 S235683AbhHXPP4 (ORCPT + 99 others); Tue, 24 Aug 2021 11:15:56 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60372 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230341AbhHXPPy (ORCPT ); Tue, 24 Aug 2021 11:15:54 -0400 Received: from mail-ot1-x32b.google.com (mail-ot1-x32b.google.com [IPv6:2607:f8b0:4864:20::32b]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A0A6AC061757 for ; Tue, 24 Aug 2021 08:15:10 -0700 (PDT) Received: by mail-ot1-x32b.google.com with SMTP id i8-20020a056830402800b0051afc3e373aso35720421ots.5 for ; Tue, 24 Aug 2021 08:15:10 -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:content-transfer-encoding:in-reply-to; bh=Y0kEI+D7S9zjGZEzmEP8rK0NWN9F8ml/ZbrO8rwdGoc=; b=rpzC8nqxjtvlgOqu4Uo6ccz/R+Z9Mz/PUr0z6mqMTfmcAcPvdbwnY1pM9fWcLoiyU0 byO8XEiEF2wd2Q4puMGrpWxD8U0n/OzuaHpj6RxYfjjQAjOEFAvYeGi3Lqdvlc05lj/L aHg2aXuHPKooUP4bfqcCg436MQLO96qifEhk30pU2o/ZMqOHew6lV1LDVFbzGhRVNfRU CJezKjjDGy0UbjzsLbMCfFrutA2zwgoMr1nKsRvRNzhUYDFCSRWJ3fFigXkCbthkAf4O ckmc3KAPsAWoLxUMmyOOrh1YZBvdeFT3uIpjp9P3jxBSDBsw0zNEdWEN+0HMP6pcmeij F6Qw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:content-transfer-encoding :in-reply-to; bh=Y0kEI+D7S9zjGZEzmEP8rK0NWN9F8ml/ZbrO8rwdGoc=; b=A58KzJIlVnTGNx2W/j0VjPbQr1+VHAxlqTTGe6xa9uOVUK/sPf3iiJwS6yUKw2ebU/ 5Ew9uVONQPv7ygBzotLCPABuePXI4LT5NKrsrNv3VYcfPi99/F7gdFrgHHgrQTeePtSM jTA+M585msWCZYZ8DT4vgaUpw5Vz78wOk11Ap9ygi4CfO/KOtCf4xL8fG9fRhxYl95zJ Ve/6No/HD69DQ/nUPGlw4mx/ms5394v/rXfoPwnBfaN5DWNzHleBQwQyoQrh1Y1asi6I bMYGG5hQlDKHY0iSPgGk0WChrE58f+fHexXmy7qknMP8eNXf2OHGxKB1ZjWs1Hwz1IkX edaQ== X-Gm-Message-State: AOAM532dqY4+GoSB7DiB5BAV8zEgCrXBFoJKCi5jeM6BaCq2xZnkQDjK UiPDxm9h5DvvuBZjj8lm3IFdIw== X-Received: by 2002:aca:3193:: with SMTP id x141mr3216871oix.110.1629818110048; Tue, 24 Aug 2021 08:15:10 -0700 (PDT) Received: from ripper (104-57-184-186.lightspeed.austtx.sbcglobal.net. [104.57.184.186]) by smtp.gmail.com with ESMTPSA id b2sm3566712ook.46.2021.08.24.08.15.08 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 24 Aug 2021 08:15:09 -0700 (PDT) Date: Tue, 24 Aug 2021 08:16:26 -0700 From: Bjorn Andersson To: AngeloGioacchino Del Regno Cc: Thara Gopinath , Konrad Dybcio , ~postmarketos/upstreaming@lists.sr.ht, martin.botka@somainline.org, marijn.suijten@somainline.org, jamipkettunen@somainline.org, Andy Gross , Amit Kucheria , Zhang Rui , Daniel Lezcano , Rob Herring , linux-arm-msm@vger.kernel.org, linux-pm@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 14/39] arm64: dts: qcom: sdm630: Add TSENS node Message-ID: References: <20210728222542.54269-1-konrad.dybcio@somainline.org> <20210728222542.54269-15-konrad.dybcio@somainline.org> <860f1120-c5a4-f531-3ea9-aa90c6b063dc@linaro.org> <2318377c-959a-a42b-81b5-44e2629570d5@somainline.org> <2ffc4e54-a501-bd2d-3f29-a6df34023445@somainline.org> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <2ffc4e54-a501-bd2d-3f29-a6df34023445@somainline.org> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu 29 Jul 06:48 PDT 2021, AngeloGioacchino Del Regno wrote: > Il 29/07/21 13:14, Thara Gopinath ha scritto: > > > > > > On 7/29/21 6:55 AM, Konrad Dybcio wrote: > > > > > > On 29.07.2021 12:54, Thara Gopinath wrote: > > > > > > > > > > > > On 7/29/21 6:52 AM, Konrad Dybcio wrote: > > > > > > > > > > On 29.07.2021 12:50, Thara Gopinath wrote: > > > > > > Hi Konrad, > > > > > > > > > > > > On 7/28/21 6:25 PM, Konrad Dybcio wrote: > > > > > > > This will enable temperature reporting for various SoC > > > > > > > components. > > > > > > > > > > > > > > Signed-off-by: AngeloGioacchino Del Regno > > > > > > > > > > > > > > Signed-off-by: Konrad Dybcio > > > > > > > --- > > > > > > > ??? .../devicetree/bindings/thermal/qcom-tsens.yaml?????? |? 1 + > > > > > > > ??? arch/arm64/boot/dts/qcom/sdm630.dtsi????????????????? | 11 +++++++++++ > > > > > > > ??? 2 files changed, 12 insertions(+) > > > > > > > > > > > > > > diff --git > > > > > > > a/Documentation/devicetree/bindings/thermal/qcom-tsens.yaml > > > > > > > b/Documentation/devicetree/bindings/thermal/qcom-tsens.yaml > > > > > > > index 4a2eaf28e3fd..d3b9e9b600a2 100644 > > > > > > > --- a/Documentation/devicetree/bindings/thermal/qcom-tsens.yaml > > > > > > > +++ b/Documentation/devicetree/bindings/thermal/qcom-tsens.yaml > > > > > > > @@ -48,6 +48,7 @@ properties: > > > > > > > ????????????????? - qcom,sc7180-tsens > > > > > > > ????????????????? - qcom,sc7280-tsens > > > > > > > ????????????????? - qcom,sc8180x-tsens > > > > > > > +????????????? - qcom,sdm630-tsens > > > > > > > ????????????????? - qcom,sdm845-tsens > > > > > > > ????????????????? - qcom,sm8150-tsens > > > > > > > ????????????????? - qcom,sm8250-tsens > > > > > > > diff --git a/arch/arm64/boot/dts/qcom/sdm630.dtsi > > > > > > > b/arch/arm64/boot/dts/qcom/sdm630.dtsi > > > > > > > index 1e54828817d5..7e9c80e35fba 100644 > > > > > > > --- a/arch/arm64/boot/dts/qcom/sdm630.dtsi > > > > > > > +++ b/arch/arm64/boot/dts/qcom/sdm630.dtsi > > > > > > > @@ -627,6 +627,17 @@ mnoc: interconnect@1745000 { > > > > > > > ???????????????????? <&mmcc AHB_CLK_SRC>; > > > > > > > ??????????? }; > > > > > > > ??? +??????? tsens: thermal-sensor@10ae000 { > > > > > > > +??????????? compatible = "qcom,sdm630-tsens", "qcom,tsens-v2"; > > > > > > > +??????????? reg = <0x010ae000 0x1000>, /* TM */ > > > > > > > +????????????????? <0x010ad000 0x1000>; /* SROT */ > > > > > > > +??????????? #qcom,sensors = <12>; > > > > > > > > > > > > Are all 12 sensors used ? I see that in a later patch > > > > > > "arm64: dts: qcom: sdm630: Add thermal-zones > > > > > > configuration" only 9 are used. > > > > > > > > > > Hi, > > > > > > > > > > if I recall correctly, they all give output but not all of > > > > > the mappings were documented in the downstream sources and > > > > > we have no documentation whatsoever :( > > > > > > > > Right. In that case, why not change #qcom,sensors to 9 and add > > > > rest of the sensors if and when needed ? > > > > > > > I don't think it makes sense to describe the hardware incorrectly, > > > even if some of it is unused. > > > > My thinking was more along the lines of don't expose unused h/w bits. > > > > You're right about not exposing unused HW bits, but even PC x86 motherboards > (I mean the smbus/i2c drivers for the big holy management/sensors chips) do > have such a "base" configuration, where some lines are read as 0 because they > are effectively not connected by hardware. > > In order to avoid confusion to other developers, in my personal opinion, it would > be good go for the current value of 12 (which isn't incorrect, as that's what the > SoC supports)... I don't think that anyone would be confused by seeing zero > readings on some sensors (if their device don't support such sensor), as I think > that everyone is used to that anyway, even if that's in other circumstances... > > In any case, luckily that's also safe, because there's no firmware that restricts > the readings to a subset of sensors in this domain (nobody is going to get a > hypervisor fault for that). > > I would also, in case, propose to see how things go: I would expect other > developers to push device trees for many SDM630/636/660 devices, including but > not limited to smartphones and SBCs.. so perhaps if we find out that really > nobody uses the 12 sensors, or if the very vast majority uses a different amount, > perhaps we may just transfer the value to device-specific configurations in one > go, as to avoid unnecessary noise... I think :))) > If the SoC has 12 sensors I think it makes sense to define that, similar to how a SoC might have 200 GPIOs, even though only a handful is actually used. Regards, Bjorn