Received: by 2002:ac0:a5b6:0:0:0:0:0 with SMTP id m51-v6csp3227846imm; Sun, 3 Jun 2018 23:06:41 -0700 (PDT) X-Google-Smtp-Source: ADUXVKJBBycvQQEEkFjtdtBM7LKkUjnuFxWQFGxyNFS1dnOcTZ7HtF7t5jd7XeUmt7dkWOjxmskE X-Received: by 2002:a62:8a83:: with SMTP id o3-v6mr3341990pfk.12.1528092401907; Sun, 03 Jun 2018 23:06:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1528092401; cv=none; d=google.com; s=arc-20160816; b=Lf/rmJG90k8ZFqv/8Y3Zgh+gNplAjm2UvcvNh9jjHAI0BQMYzRZGnUVzJ4ONd1xcry 9mQ+dXRrS+dxD53U/jb5DsgA9QTktiv0HkSUWnoyhJY2o3MOM8L29ZqXsCpgXBBodybx 425/sZ98XZR/XPJmzJtNvj3bDFra5x3mZHgRVsoSmHcgmXewy6rSv6+cMmzYKxsBn42L cdpGEVaIFx7C7TElPZWnLE/43nU+0MbTFkA1u3KUaN6/mNYOmjUIO87wgQr7AmwTW3zI vesQ5NMaHNN5gBKtf2iyIK/F3Ds/EXcA8RMvgHRx3UX77zL2I8fGLOxY9Zn0W8gxPsOf emtg== 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=7LQV166LaqfsT4QzBckZCr+3FNGXW4O2xHk5z4igX+E=; b=Ebw5E9VEhTiLDxC5HGunEfOJxbUTe6WqNFCzLYSh8SkEyU8Edg2ZnsFU9PNoVAqM19 KmlEruvKgivacqjumjPI+xP6LqWfAX4MZ99IfTzRhRQETbsOx5ZrfI6qudmen0z2pq3i FsyQdWh8pIE3/ZOVMbqhvKOjPQ4862830VIC+oNkdpuJCeNycBlJ2Ezbc1wmHKlPWwu0 FYtayTE9kL5iyP8X8C3xb5DhAx6x1Hhn60RIB9j1PFaayss/E8FAtVAJm334yjMp4sUU IXpWlI50lCLDmmesum+Q3sQMDfJnQYMLkwrwvtcmm8QIrIqixb47wApsQt6TEbdovnsv /73w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@broadcom.com header.s=google header.b=h11FTG9n; 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 m4-v6si35904287pgp.336.2018.06.03.23.06.25; Sun, 03 Jun 2018 23:06:41 -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=h11FTG9n; 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 S1751231AbeFDGGD (ORCPT + 99 others); Mon, 4 Jun 2018 02:06:03 -0400 Received: from mail-ot0-f195.google.com ([74.125.82.195]:35981 "EHLO mail-ot0-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750723AbeFDGGB (ORCPT ); Mon, 4 Jun 2018 02:06:01 -0400 Received: by mail-ot0-f195.google.com with SMTP id m11-v6so36165268otf.3 for ; Sun, 03 Jun 2018 23:06:01 -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=7LQV166LaqfsT4QzBckZCr+3FNGXW4O2xHk5z4igX+E=; b=h11FTG9nuvHsvf78U8g/XeBtk37rReoRGzq+ZGQilu53selUOpHKV98k4VIA35I54F h/kl1ZAgqiedh/44754os0CvUWors638FMXHeYRVYO2nhg1MgqFsY2LjeFHsTKPCBJnm GUoncIV8tAGv8bjhFkMfQdeov58WbNipObu4A= 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=7LQV166LaqfsT4QzBckZCr+3FNGXW4O2xHk5z4igX+E=; b=jz6SUzxkU3vx8A/K2l8oC6Rx6ArGC8LtpwGfSIBntOEb5lvvYC92smMfJQmkEDshAO Q4jZ/CrO+OMpeJIl2N1T24+k/CQ+dZDCArRWpZ1n6nWZ7yh46uAA0lCDSNMHyrCw92Ih zmMT1yuFgNofWUYuoLsmiwNFRhw2/3rCAcEJOXtppNINBwuQ+lAZ5hgYPH0JSu7Xx0bX JwLB+nEVia28mf+cMKiFW+/KKs0TCdmTp6wlpXo818SVvWDLbRDjKW28O/l8wIYNfFN7 TQ7BHaKXf2CBGpgC4O1t9R4dJaqT2eh7s9oA/8zlSi7GsceSC3WssBtyKnETbOLq4OF9 rk4A== X-Gm-Message-State: APt69E3Fn07uMhcKrMIeC4bvMcgSqaoPFSnJLOhktX3oRLEEDcm/4EyW h790x11/rASQd0fl6bJum4A9CVvCtUQQEJmFE89mKw== X-Received: by 2002:a9d:4894:: with SMTP id d20-v6mr14320798otf.399.1528092361061; Sun, 03 Jun 2018 23:06:01 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:a9d:4044:0:0:0:0:0 with HTTP; Sun, 3 Jun 2018 23:06:00 -0700 (PDT) In-Reply-To: References: <1527486084-4636-1-git-send-email-srinath.mannam@broadcom.com> <1527486084-4636-2-git-send-email-srinath.mannam@broadcom.com> <20180531164820.GA23074@rob-hp-laptop> From: Srinath Mannam Date: Mon, 4 Jun 2018 11:36:00 +0530 Message-ID: Subject: Re: [PATCH 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@vger.kernel.org" , 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 Herring, Please find my comments in line.. On Fri, Jun 1, 2018 at 7:59 PM, Rob Herring wrote: > On Fri, Jun 1, 2018 at 3:51 AM, Srinath Mannam > wrote: >> Hi Rob Herring, >> >> Thank you for the review. >> Please find my answers inline.. >> >> On Thu, May 31, 2018 at 10:18 PM, Rob Herring wrote: >>> On Mon, May 28, 2018 at 11:11:22AM +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. >>> >>> What type of memory is this? >> This is shared memory(cache-able) which is shared between two micro controllers. > > What else is in this shared memory? You should probably be > representing that as a whole somewhere in DT. Nothing else except 4 byte memory containing temperature value of one thermal zone. At present we configured 6 thermal zones. So six separate 4byte memories provided in shared memory. > >> One micro controller update temperature of all thermal zones in this >> shared memory. >> thermal driver running on another micro controller monitors >> temperature data of all thermal zones. >>> >>>> + >>>> +Example: >>>> + tmons { >>>> + compatible = "simple-bus"; >>>> + #address-cells = <1>; >>>> + #size-cells = <1>; >>>> + ranges; >>>> + >>>> + tmon_ihost0: thermal@8f100000 { >>>> + compatible = "brcm,sr-thermal"; >>>> + reg = <0x8f100000 0x4>; >>>> + }; >>> >>> Convince me that you need a node per register. This can all be >>> accomplished with a single node and either a single reg entry or a >>> series of reg entries. >>> >> In our system we have 6 different thermal zones. each node belongs to >> one thermal zone. >> thermal driver detects each node as separate thermal zone and monitors >> separately. >> register entry is only 4byte memory which contains the temperature >> value of respective thermal zone. >> Based on requirement we can increase or decrease the number thermal >> zones need to monitor. > > Still, all this can be accomplished with a single node. Having a node > per register in DT doesn't scale. Our approach is like we have individual controllers have one driver with multiple DT nodes. In coming future we will add more thermal zones based on our requirement. then we can just add new DT node, instead of having driver changes. With this approach we can configure each thermal zone at different trip values. So we must have all thermal zones are independent. > > Rob