From patchwork Thu Feb 7 10:49:38 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Amit Kucheria X-Patchwork-Id: 10801091 X-Patchwork-Delegate: agross@codeaurora.org Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 0DA4C6C2 for ; Thu, 7 Feb 2019 12:57:36 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id F21982D41B for ; Thu, 7 Feb 2019 12:57:35 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id E6C902D421; Thu, 7 Feb 2019 12:57:35 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=unavailable version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 941AA2D40F for ; Thu, 7 Feb 2019 12:57:35 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727393AbfBGM5R (ORCPT ); Thu, 7 Feb 2019 07:57:17 -0500 Received: from mail-pf1-f196.google.com ([209.85.210.196]:39733 "EHLO mail-pf1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727353AbfBGM5Q (ORCPT ); Thu, 7 Feb 2019 07:57:16 -0500 Received: by mail-pf1-f196.google.com with SMTP id f132so2450494pfa.6 for ; Thu, 07 Feb 2019 04:57:16 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :in-reply-to:references; bh=weNMC1WOncVzrjA84l2O07eMcZ540Q8KJY50toWf3Z8=; b=cUcYK4rCNJFDiEGFjIMegVOFyeAXH42gm+HBUQUYfnP0NK+CEDN/WuiyjKGFlJTxkb L448RL2WEo3FdpcmRgEqXZ4vVw/T/88S2+LBLuYEmZJEVXo6rauTfiqt/+0Ei7uMYnYH 354o8YG0vPqGFfzrSOWm/zxBarnbn0Umv+9o2PUkcBjxZtItSkE1EllvCHpy6GS5Cn83 kmstKiUmEWFM8oOMH+OZI8ks9y1icZLmD6v8S4RKQmUCwtzW0JnsdCJqGkqGoWuGToUP aEi1rpDiV4zDwu0K+9+LFjW/nK5LeMhnzijHsZbbzoVGir1aNdyPQg0SbJOr7H8aJC4j NeUg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:in-reply-to:references; bh=weNMC1WOncVzrjA84l2O07eMcZ540Q8KJY50toWf3Z8=; b=PJZkgqOWuG99Lxxk/rVO+GtcxLrrBe/o8s4/RXkZdqXHQSVfxN7xiKKCaokYrnA9jI arH3AjspgsAsB2aiQ4D/AzkL61LCRG5ojXZ1alno4I4HyVe+IuQwoJAdLIUMygOuz5yK /OnatNVtT1KO6Iu1x4jm4CmsA3o2fmJgS0UVSulxqaF3N7Fmm9OoUyABaBkrsHvpmdKo VomxBMS+VrAaz67n4p93rO6UZPLQgLCyLto5474sBj2wVPQ1UUqdXVkRm6GM3IR5nO3H mZIzwziqbcJBkfmGq8wAQ1+PdczSf5OQoqjk9c04dGlG/dKuAzSYxE1NHNCfQSFeiCnm LmmA== X-Gm-Message-State: AHQUAuZBzRx1B9dyrEMLkcNFTiQuL0xvQrdzghnK9qkFg2jktd9Kayp3 ko+jx3NMZMA2lcfcyKlQLQuojw== X-Google-Smtp-Source: AHgI3Ibd1rLmcRu3sVCvBA6NIcK4GxTK+t+GEpgchagcuQG5fPQsOoMjhmcgLjZgmUC7FyXRvlZQyw== X-Received: by 2002:a62:4549:: with SMTP id s70mr15873687pfa.233.1549544236077; Thu, 07 Feb 2019 04:57:16 -0800 (PST) Received: from localhost ([2402:3a80:c80:4138:75dd:3900:1d90:762f]) by smtp.gmail.com with ESMTPSA id r6sm13488289pgk.91.2019.02.07.04.57.14 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 07 Feb 2019 04:57:15 -0800 (PST) From: Amit Kucheria To: linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org, bjorn.andersson@linaro.org, edubezval@gmail.com, andy.gross@linaro.org, Daniel Lezcano , David Brown , Zhang Rui Cc: linux-pm@vger.kernel.org, devicetree@vger.kernel.org Subject: [PATCH v1 20/24] dt: thermal: tsens: Add bindings for qcs404 Date: Thu, 7 Feb 2019 16:19:38 +0530 Message-Id: <3f5a9282e815d2244b633a65e126494d23c16a7a.1549525708.git.amit.kucheria@linaro.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: References: In-Reply-To: References: Sender: linux-arm-msm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP qcs404 uses v1 of the TSENS IP block. Create a fallback DT property "qcom,tsens-v1" to gather common code Signed-off-by: Amit Kucheria Reviewed-by: Rob Herring --- .../devicetree/bindings/thermal/qcom-tsens.txt | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/Documentation/devicetree/bindings/thermal/qcom-tsens.txt b/Documentation/devicetree/bindings/thermal/qcom-tsens.txt index 1d9e8cf61018..673cc1831ee9 100644 --- a/Documentation/devicetree/bindings/thermal/qcom-tsens.txt +++ b/Documentation/devicetree/bindings/thermal/qcom-tsens.txt @@ -6,11 +6,14 @@ Required properties: - "qcom,msm8916-tsens" (MSM8916) - "qcom,msm8974-tsens" (MSM8974) - "qcom,msm8996-tsens" (MSM8996) + - "qcom,qcs404-tsens", "qcom,tsens-v1" (QCS404) - "qcom,msm8998-tsens", "qcom,tsens-v2" (MSM8998) - "qcom,sdm845-tsens", "qcom,tsens-v2" (SDM845) The generic "qcom,tsens-v2" property must be used as a fallback for any SoC with version 2 of the TSENS IP. MSM8996 is the only exception because the generic property did not exist when support was added. + Similarly, the generic "qcom,tsens-v1" property must be used as a fallback for + any SoC with version 1 of the TSENS IP. - reg: Address range of the thermal registers. New platforms containing v2.x.y of the TSENS IP must specify the SROT and TM @@ -39,3 +42,14 @@ tsens0: thermal-sensor@c263000 { #qcom,sensors = <13>; #thermal-sensor-cells = <1>; }; + +Example 3 (for any platform containing v1 of the TSENS IP): +tsens: thermal-sensor@4a9000 { + compatible = "qcom,qcs404-tsens", "qcom,tsens-v1"; + reg = <0x004a9000 0x1000>, /* TM */ + <0x004a8000 0x1000>; /* SROT */ + nvmem-cells = <&tsens_caldata>; + nvmem-cell-names = "calib"; + #qcom,sensors = <10>; + #thermal-sensor-cells = <1>; + };