Received: by 2002:ac0:a581:0:0:0:0:0 with SMTP id m1-v6csp455862imm; Thu, 21 Jun 2018 22:52:45 -0700 (PDT) X-Google-Smtp-Source: ADUXVKLm4MX2F+mSwDiXdnxjl9Bp2BjB9BaQFMgKrJ8nQYYA8Hpq8Lo8tAN/XTT/XQmhpvocvfAK X-Received: by 2002:a17:902:2809:: with SMTP id e9-v6mr199547plb.89.1529646765170; Thu, 21 Jun 2018 22:52:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1529646765; cv=none; d=google.com; s=arc-20160816; b=rnP1yH0kYRHf3vuwZX1BodABn2or6izU4qluXF8wfe1VqLouuq+2xxR90pynmHV5IL p5C2VBm9ndUBeM5ivcyf9eG04I+98VuHKId2JvmVK070r7R7gSBqCmdbtJ1H0xkdlqsB lf2JwzJckix8aLJl0R4yn8a/CF8B5AFdrIbVFKT5WsG6zzR9ywo8QHuR+KbycZJvqaXF wf2RzZ4vMv3AUFEK0/8SthUB1eSKBBGENBAnOvYcsBL0pAy+dqm26isqe7syiNw1PtT0 5sESz2OdRfuSj1Jg4ZvU14kuAmkudumKHZFNH6UBM79FzSVHxSuox/sjzt2BcQnpVmMw 13ww== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :references:in-reply-to:mime-version:dkim-signature :arc-authentication-results; bh=c139qY0q8XcM2IeRgAq0SoTavOxJCmJupmSjVI+vKC8=; b=ilkf78G1cm2iuoI5PgsiTl5eeMSCJrlAg3Jq+ee9+xSP7QZ9RHvNoHEdvWwfanD2Ud oeEzORMRM5evzew3dZkGaYt1dFL2yRkjzRea0XbdMlkuI1gs/b4VMA+FYBzs+sK+BWrV x3mtUhtgC6LJl3Ubj5jwHYFbrE5uSAVKJdwTtSO3YPm24SvZKb+bN9jAnLAdQKNmsRUJ Ad70t1dzatMVcogEFuHXQctfZWwcVsagjnfvvCfXGzwmi2TzVaP7/KHs3f9ZEdqJEj1/ PpKXqCFYKz1Rs0eEOe/XiSGYXYj87P8d4gb+V+iQd+xg4JQuPNKfBJ3xMjvDDTO/w9d6 aSCA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@broadcom.com header.s=google header.b=YnaOG88c; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=broadcom.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id m12-v6si6767612pfd.348.2018.06.21.22.52.30; Thu, 21 Jun 2018 22:52:45 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@broadcom.com header.s=google header.b=YnaOG88c; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=broadcom.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751086AbeFVFvo (ORCPT + 99 others); Fri, 22 Jun 2018 01:51:44 -0400 Received: from mail-oi0-f67.google.com ([209.85.218.67]:33309 "EHLO mail-oi0-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750801AbeFVFvm (ORCPT ); Fri, 22 Jun 2018 01:51:42 -0400 Received: by mail-oi0-f67.google.com with SMTP id c6-v6so5145505oiy.0 for ; Thu, 21 Jun 2018 22:51:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=broadcom.com; s=google; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=c139qY0q8XcM2IeRgAq0SoTavOxJCmJupmSjVI+vKC8=; b=YnaOG88cTG5HyC9HfireVqvL6RHarkbty7ye4xry5MaLlFds1AAg+PLr2MfVEuj35T AC+ly/eBQpvpX0nZNv0IvyOEEvjyhpkFwH6plSFnM8A5T5PrnhwpUduJKswse48EOf3s EDAEx/kaTHzbCGD3TVvNx7sbnetTRN5qoLzkQ= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=c139qY0q8XcM2IeRgAq0SoTavOxJCmJupmSjVI+vKC8=; b=p2EVDNXPJzCMGqPtCe9Z9AKbW6IX5E7dtRbamXGpLHSe0BxJ722rfrw9muxgkgVuAw iXFMA2rNA/xHSfDiX6D5XQtrJJju6Zo8ZHM0dLTN1QKhSR0fKr4TuDLjkZ9ImBhQjW2F hb2CvaRB/ozjBD9+dFXoQyp29A+3jSlDEO2DXrxbGornniY6+GtEMTzahZJNQiXMa9ti Y6Fuw6rfXGX/cRN4bEugYf4UU35yYQMAGhJ9Y09psck1WLEAIlcrmrUX1vx+xypV6XPB 3iXXVHZOjFZuk04LVZ3q85lLyesMDDBywSxPTILRabb/P+NgBB50XmGEzI334jj4vK5C YZQQ== X-Gm-Message-State: APt69E2pfMLXPnRtn7k5kBg0rwyR2KIKXQfQLpUtsir8w7RvXJjI6VkF aCBdlGds+wH1LS+RXzwpUsZ54NT+V/NRXBIGQ29dfw== X-Received: by 2002:aca:3f57:: with SMTP id m84-v6mr107425oia.280.1529646701759; Thu, 21 Jun 2018 22:51:41 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:a9d:4044:0:0:0:0:0 with HTTP; Thu, 21 Jun 2018 22:51:41 -0700 (PDT) In-Reply-To: <20180620195214.GA10436@rob-hp-laptop> References: <1529310679-13482-1-git-send-email-srinath.mannam@broadcom.com> <1529310679-13482-2-git-send-email-srinath.mannam@broadcom.com> <20180620195214.GA10436@rob-hp-laptop> From: Srinath Mannam Date: Fri, 22 Jun 2018 11:21:41 +0530 Message-ID: Subject: Re: [PATCH v2 1/3] dt-bindings: thermal: Add binding document for SR thermal To: Rob Herring Cc: Zhang Rui , Eduardo Valentin , Mark Rutland , devicetree@vger.kernel.org, Linux Kernel Mailing List , BCM Kernel Feedback , Pramod Kumar Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Rob, Please find my comments for the reason to have multiple DT nodes. On Thu, Jun 21, 2018 at 1:22 AM, Rob Herring wrote: > On Mon, Jun 18, 2018 at 02:01:17PM +0530, Srinath Mannam wrote: >> From: Pramod Kumar >> >> Add binding document for supported thermal implementation >> in Stingray. >> >> Signed-off-by: Pramod Kumar >> Reviewed-by: Ray Jui >> Reviewed-by: Scott Branden >> Reviewed-by: Srinath Mannam >> --- >> .../bindings/thermal/brcm,sr-thermal.txt | 45 ++++++++++++++++++++++ >> 1 file changed, 45 insertions(+) >> create mode 100644 Documentation/devicetree/bindings/thermal/brcm,sr-thermal.txt >> >> diff --git a/Documentation/devicetree/bindings/thermal/brcm,sr-thermal.txt b/Documentation/devicetree/bindings/thermal/brcm,sr-thermal.txt >> new file mode 100644 >> index 0000000..33f9e11 >> --- /dev/null >> +++ b/Documentation/devicetree/bindings/thermal/brcm,sr-thermal.txt >> @@ -0,0 +1,45 @@ >> +* Broadcom Stingray Thermal >> + >> +This binding describes thermal sensors that is part of Stingray SoCs. >> + >> +Required properties: >> +- compatible : Must be "brcm,sr-thermal" >> +- reg : memory where tmon data will be available. >> + >> +Example: >> + tmons { >> + compatible = "simple-bus"; >> + #address-cells = <1>; >> + #size-cells = <1>; >> + ranges; >> + >> + tmon_ihost0: thermal@8f100000 { >> + compatible = "brcm,sr-thermal"; >> + reg = <0x8f100000 0x4>; >> + }; > > You still haven't given me a compelling reason why you need a node per > register. > > You have a single range of registers. Make this 1 node. > We Have two reasons to have multiple nodes.. 1. Our chip has multiple functional blocks. Each functional block has its own thermal zone. Functional blocks and their thermal zones enabled/disabled based on end product. Few functional blocks need to disabled for few products so thermal zones also need to disable. In that case, nodes of specific thermal zones are removed from DTS file of corresponding product. 2. Thermal framework provides sysfs interface to configure thermal zones and read temperature of thermal zone. To configure individual thermal zone, we need to have separate DT node. Same to read temperature of individual thermal zone. Ex: To read temperature of thermal zone 0. cat /sys/class/thermal/thermal_zone0/temp To configure trip temperature of thermal zone 0. echo 110000 > /sys/class/thermal/thermal_zone0/trip_point_0_temp Also to avoid driver source change for the multiple products it is clean to have multiple DT nodes. > Rob