Received: by 2002:a05:6a10:f3d0:0:0:0:0 with SMTP id a16csp3440006pxv; Mon, 12 Jul 2021 17:55:15 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw1sIu0l6KJHqeq4Lmv6h3/zHImewEtrdL6PMJ931xkP9JTGeDfraPqdkGQhErddgqQBmcT X-Received: by 2002:a05:6602:1501:: with SMTP id g1mr1199323iow.189.1626137715729; Mon, 12 Jul 2021 17:55:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1626137715; cv=none; d=google.com; s=arc-20160816; b=GKARXS4ejSiBbblyVHLEq8yi/mfU4EXNQny26OOWevKhrz/CV5NAoFoopuFVBhOIly 9jiNjM3WpE5z1TluaeWT+7yBku3E3ITxU8NalQkoU/hjFx+3QQGOpv4oVc67wldD7s8S xF7VwSKh/LzEpTKdIEcGWe6pVZ3730fMGQozP8mqDmfzlym0MeD2kwB1SoJvhay3nslk JV4AqGVSD5EDRFW7tf3t7/znIzU6wVK8FaO0Xk1MatmOtg032vguwJXkc404atazAnyf EFXRxrPEtMS98FyR+i81Ivj3WuoBQ1569ahXsSFsXgxtWv+vZbJGsBsjbBNcrADrFwZ8 afzg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:from:references :cc:to:subject:dkim-signature; bh=LpiLPRJIBi6SrxM3Fqi2A10JFLoRo5PavGwbx3+mEss=; b=RMJYjIAmkNhcDL3hhkziDuXLYG2JQTFMgwLrlDVRWZLmcFuACz6k1jzU5Y5trYfn96 ZG9BgA0Om0G27MaF9c1YMtPVL8sflODUxDjTkdOrMOxZTUT58yUNqRk6KOi+fsiEVZSl LnkOEYqskZvbISJXpBxrixSkhr2AxEJjL8VCqwyephmZ5m17cBRom9AH5IDz6GG2HQhk 2TF2KjV4C3O+oTFodPM2jWr3VPiZ7D0bfTTqkTG1Cm1nRHrDWAO+6VBuSEVIVnlqhenR tHhbwq6rmcG9o0RaeagZgzTbuY6bOCqNxn1exL+HvV04BY8lRSzl29K+CUz5I2cf18FU lzng== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=vkVFketW; 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 d21si2572939jam.9.2021.07.12.17.55.03; Mon, 12 Jul 2021 17:55:15 -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=vkVFketW; 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 S233767AbhGMA5Z (ORCPT + 99 others); Mon, 12 Jul 2021 20:57:25 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57912 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233545AbhGMA5Z (ORCPT ); Mon, 12 Jul 2021 20:57:25 -0400 Received: from mail-qv1-xf2a.google.com (mail-qv1-xf2a.google.com [IPv6:2607:f8b0:4864:20::f2a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 56732C0613E9 for ; Mon, 12 Jul 2021 17:54:36 -0700 (PDT) Received: by mail-qv1-xf2a.google.com with SMTP id h18so9551120qve.1 for ; Mon, 12 Jul 2021 17:54:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=LpiLPRJIBi6SrxM3Fqi2A10JFLoRo5PavGwbx3+mEss=; b=vkVFketWLLa3g3vbW0VKxxdpO1VgzH/shdIKlbrtcym5F/0egwiJ/KScrVUz6zavRU PyjeGkQD6UuUB+smKODLYpFIa3JrnHSg7m1XBH/tkP+xTWGGa+HiUXFuRN1Vt/euRQGQ i0I/OKqxssPRjPzI2+SINFVwwvWlGAbSIvstxGTgkfcAxuuPver5dUevSCOWSe6g7dQZ ZboqVaRliHLVYR/pH2gN5fl7zEObD/Gxl8vpvtvuC8C+OyJMgfQPFnNIJmG2l6hqWcRy 3H5eWHcnQWYSGAJ5tp6eGBLmF5NuI8KEXSRet02TihLEbPtNbxoxTS6JeRqBVHI7dumT Tskw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=LpiLPRJIBi6SrxM3Fqi2A10JFLoRo5PavGwbx3+mEss=; b=qxPCQwkqXRrMObReZUd65SoDqLPk1PFHRHiNR0lgk4NOwAGUYEeoLhLBfMI/ZnDCjY 33jKveQ2b6ACKH+aWdida7ZzM9ZFyQWvtf7tSoBb4XWZ4J06dPIgcWYlAIAtZn003QDE Koq10/z/UtTFov09FDPxtTf/YWI5CjjiHIulzPS5Beln74vebmv7jg1KvcdMlVr8v61D wMNhD8i3LUccdnLzWOVsB8huPRFeyQq6kcg25zgHTh0m9pHk/fUkPZGHSwrMU7SHEvzC gd+gtyNh1T3OnagjbgrUaZZyig4uKW8pDvFwuPYz2HPdHxUt8Qw2honxd7it2QgByo98 gZCQ== X-Gm-Message-State: AOAM531iDlaJvAS8xX43IVCiOtv9pt0ZnHc7bFzU67sJH7lpko6VLZFv iAFANHL1ngfTHhOiQy2C6TQSag== X-Received: by 2002:a0c:c350:: with SMTP id j16mr2185643qvi.51.1626137675267; Mon, 12 Jul 2021 17:54:35 -0700 (PDT) Received: from [192.168.1.93] (pool-71-163-245-5.washdc.fios.verizon.net. [71.163.245.5]) by smtp.gmail.com with ESMTPSA id k66sm7586042qke.84.2021.07.12.17.54.34 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 12 Jul 2021 17:54:34 -0700 (PDT) Subject: Re: [Patch v3 6/6] dt-bindings: thermal: Add dt binding for QCOM LMh To: Bjorn Andersson Cc: agross@kernel.org, rui.zhang@intel.com, daniel.lezcano@linaro.org, viresh.kumar@linaro.org, rjw@rjwysocki.net, robh+dt@kernel.org, tdas@codeaurora.org, mka@chromium.org, linux-arm-msm@vger.kernel.org, linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org References: <20210708120656.663851-1-thara.gopinath@linaro.org> <20210708120656.663851-7-thara.gopinath@linaro.org> From: Thara Gopinath Message-ID: <2d11017d-8722-30d1-6b91-214c341e8ab4@linaro.org> Date: Mon, 12 Jul 2021 20:54:33 -0400 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.11.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 7/10/21 12:21 AM, Bjorn Andersson wrote: > On Thu 08 Jul 07:06 CDT 2021, Thara Gopinath wrote: > >> Add dt binding documentation to describe Qualcomm >> Limits Management Hardware node. >> >> Signed-off-by: Thara Gopinath >> --- >> .../devicetree/bindings/thermal/qcom-lmh.yaml | 100 ++++++++++++++++++ >> 1 file changed, 100 insertions(+) >> create mode 100644 Documentation/devicetree/bindings/thermal/qcom-lmh.yaml >> >> diff --git a/Documentation/devicetree/bindings/thermal/qcom-lmh.yaml b/Documentation/devicetree/bindings/thermal/qcom-lmh.yaml >> new file mode 100644 >> index 000000000000..7f62bd3d543d >> --- /dev/null >> +++ b/Documentation/devicetree/bindings/thermal/qcom-lmh.yaml >> @@ -0,0 +1,100 @@ >> +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) >> +# Copyright 2021 Linaro Ltd. >> +%YAML 1.2 >> +--- >> +$id: http://devicetree.org/schemas/thermal/qcom-lmh.yaml# >> +$schema: http://devicetree.org/meta-schemas/core.yaml# >> + >> +title: Qualcomm Limits Management Hardware(LMh) >> + >> +maintainers: >> + - Thara Gopinath >> + >> +description: >> + Limits Management Hardware(LMh) is a hardware infrastructure on some >> + Qualcomm SoCs that can enforce temperature and current limits as >> + programmed by software for certain IPs like CPU. >> + >> +properties: >> + compatible: >> + enum: >> + - qcom,sdm845-lmh >> + >> + reg: >> + items: >> + - description: core registers >> + >> + interrupts: >> + maxItems: 1 >> + >> + '#interrupt-cells': >> + const: 1 >> + >> + interrupt-controller: true >> + >> + qcom,lmh-cpu-id: >> + description: >> + CPU id of the first cpu in the LMh cluster >> + $ref: /schemas/types.yaml#/definitions/uint32 >> + >> + qcom,lmh-temperature-arm: >> + description: >> + An integer expressing temperature threshold in millicelsius at which >> + the LMh thermal FSM is engaged. > > Do we know (by any public source) what "arm", "low" and "high" means > beyond that they somehow pokes the state machine? Not from public documentation. I know what these thresholds means, atleast to some extent. Though I will never claim to be an expert in this! There is an error in description of qcom,lmh-temperature-low and qcom,lmh-temperature-high below. I copied and forgot to change the description. I will fix it. > >> + $ref: /schemas/types.yaml#/definitions/int32 >> + >> + qcom,lmh-temperature-low: >> + description: >> + An integer expressing temperature threshold in millicelsius at which >> + the LMh thermal FSM is engaged. >> + $ref: /schemas/types.yaml#/definitions/int32 >> + >> + qcom,lmh-temperature-high: >> + description: >> + An integer expressing temperature threshold in millicelsius at which >> + the LMh thermal FSM is engaged. >> + $ref: /schemas/types.yaml#/definitions/int32 >> + >> +required: >> + - compatible >> + - reg >> + - interrupts >> + - #interrupt-cells >> + - interrupt-controller >> + - qcom,lmh-cpu-id >> + - qcom,lmh-temperature-arm >> + - qcom,lmh-temperature-low >> + - qcom,lmh-temperature-high >> + >> +additionalProperties: false >> + >> +examples: >> + - | >> + #include >> + #include >> + #include > > I don't see why you need qcom,rpmh.h or the interconnect include in this > example. I could have sworn make dt-bindings check failed. But maybe only The first include is needed. I will remove the other two. > >> + >> + lmh_cluster1: lmh@17d70800 { >> + compatible = "qcom,sdm845-lmh"; >> + reg = <0 0x17d70800 0 0x401>; > > #address- and #size-cells are 1 in the wrapper that validates the > examples, so drop the two zeros. Ok. > >> + interrupts = ; >> + qcom,lmh-cpu-id = <0x4>; >> + qcom,lmh-temperature-arm = <65000>; >> + qcom,lmh-temperature-low = <94500>; >> + qcom,lmh-temperature-high = <95000>; >> + interrupt-controller; >> + #interrupt-cells = <1>; >> + }; >> + - | > > This is a different example from the one above, if you intended that, > don't you need the #include of arm-gic.h here as well? Again make dt-bindings check did not fail. It is a different example. So I am not sure of the norm here. Is one example good enough ? > > Regards, > Bjorn > >> + lmh_cluster0: lmh@17d78800 { >> + compatible = "qcom,sdm845-lmh"; >> + reg = <0 0x17d78800 0 0x401>; >> + interrupts = ; >> + qcom,lmh-cpu-id = <0x0>; >> + qcom,lmh-temperature-arm = <65000>; >> + qcom,lmh-temperature-low = <94500>; >> + qcom,lmh-temperature-high = <95000>; >> + interrupt-controller; >> + #interrupt-cells = <1>; >> + }; >> + - | >> -- >> 2.25.1 >> -- Warm Regards Thara (She/Her/Hers)