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: 157739 Delivered-To: patch@linaro.org Received: by 2002:a02:48:0:0:0:0:0 with SMTP id 69csp610866jaa; Thu, 7 Feb 2019 04:57:18 -0800 (PST) X-Google-Smtp-Source: AHgI3IYUp0x9OtgD/4aWwFL/SAE1+E3ZUqc4wlw6RQu80DeANNJ0Do4aDM3jytuDYZh01UpHDpR3 X-Received: by 2002:a63:5207:: with SMTP id g7mr14840458pgb.253.1549544238552; Thu, 07 Feb 2019 04:57:18 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1549544238; cv=none; d=google.com; s=arc-20160816; b=NygSJ97ukVgmtJ17x1uhtlileJkelOHjISRY7Ub4AC7k4ictGlu1HTr98d7CuGrMww Kvap9DkCzBWFxuJ5PYbyfI8nAf2pnXV1/L9NzNIKKXN5FeYV65AGMA6Y514jLrLrPq2g liZ+6BfMBFOxHmYXs7sSYgi+kwVXyaibWgtTe2KENVbrrAmOrPiSXXDFKhrlE3UJ1tSh 2DUEvGZbd2+TczvrPNd9/gcKaPhbsPosudu3q3DY0h09wQurhyC1wEFPYzwsgOmM2EyU sEhu826z5Ui0D4M/8PRmmwTLkCWcjKu9g5SV9avbNW76i78zCcBv53S/nvB07tcyu2yw GsTg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:references :in-reply-to:message-id:date:subject:cc:to:from:dkim-signature; bh=weNMC1WOncVzrjA84l2O07eMcZ540Q8KJY50toWf3Z8=; b=WN8CdGSWTFbMBBsmQxQ2Pn/Zgvel1437meFWXQ2LpNH3iy9fmpmKzz+4gH67xm03PD 6HJwYEI8usKowED1ARY8x8tzQfl07vGbpA+iC157oXo9ztxQrcZAI9uDiltaBqHWn72O j5mKs7j1CGNbIqZ2VnQ4KeHKGpZfRd59OO/kb9v8P23GBxznvXIKZIQ3T5n3CC2GmfcI Xlrqcpi2+BsmOLBcU7SSbkZ6su51FsNvxyjUjdvIo7u7xVJA39ZAQKdwjB9+5s1PDQdc d6eYVbZHouCzF7qtyajbdZ2CwtLXodzcidpPAWtIQ4IhnLoc14e3TC4uyezZ6lpsIoTl w2yA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=cUcYK4rC; spf=pass (google.com: best guess record for domain of devicetree-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=devicetree-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. [209.132.180.67]) by mx.google.com with ESMTP id cv19si9981249plb.165.2019.02.07.04.57.18; Thu, 07 Feb 2019 04:57:18 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of devicetree-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=@linaro.org header.s=google header.b=cUcYK4rC; spf=pass (google.com: best guess record for domain of devicetree-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=devicetree-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 S1727392AbfBGM5R (ORCPT + 7 others); Thu, 7 Feb 2019 07:57:17 -0500 Received: from mail-pf1-f194.google.com ([209.85.210.194]:42257 "EHLO mail-pf1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727389AbfBGM5Q (ORCPT ); Thu, 7 Feb 2019 07:57:16 -0500 Received: by mail-pf1-f194.google.com with SMTP id m6so1296292pfa.9 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=rjqmdePc0UBBVMBixhWX5mwVk+d6uwfJ0jness4VFg1tZA110l/jTVyrm9DG5ot45d Vph4Qo3w6pObd3PM6Mnw6oI/KCghirrrtl11XGLWdsL+/wP8DASF5Ft71W04barVfJJB niXhFwfZlJ8T3crRXPF8ZyIPv3K8+oWjgxC1b3Zc+zWTYM5a9EAbLE5Lv73qsFpXV/Pc 6QjTkYPns7JhsatA9vVYHMCmQnjd3H8E7JwHawmrPryjav0pFqXcSfk8PZQqDa4+FtDn bC/v7OFNI/jYbhL/5XvcXcTZaF5MQUHza8cnsXxuVEk8Kspqov9rSMOZwQ88X5ItFYZ0 Z3yA== X-Gm-Message-State: AHQUAuaYnNDquBiuAWxNiio3t20vrDOX9wwnnCHKZmTpfvvK/UMwLFlm yzmu0c8klVel56mhcXDoWJ4MGw== 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: devicetree-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org 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 --- .../devicetree/bindings/thermal/qcom-tsens.txt | 14 ++++++++++++++ 1 file changed, 14 insertions(+) -- 2.17.1 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>; + }; From patchwork Thu Feb 7 10:49:40 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Amit Kucheria X-Patchwork-Id: 157741 Delivered-To: patch@linaro.org Received: by 2002:a02:48:0:0:0:0:0 with SMTP id 69csp610988jaa; Thu, 7 Feb 2019 04:57:27 -0800 (PST) X-Google-Smtp-Source: AHgI3IZnHxh+qU6DqdXizJJD1PF8ESRD8ggogHfLfrBiBA/M8olsRWOUvZk0kmoeBy4zfE1+3Rf/ X-Received: by 2002:a17:902:449:: with SMTP id 67mr7666462ple.310.1549544247432; Thu, 07 Feb 2019 04:57:27 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1549544247; cv=none; d=google.com; s=arc-20160816; b=vOFSf+4h6NRcpPd/dsGCwa7B3LhM3zVavFzU3GIhIkStiwFQ6WLr3wIYghStOXzWf/ XTN8HIYFcmqpE96pNjRHAyC+dUap+x8mKB50XWMYL92+/sZOm2LFsJFirXwxZp0p6s4O pDacm/wpuV0Km92zbj1AaekkYc7foXzerYai9WW569bokj3rJUF+MwdQHNa2lXrreWex F6aZkPOdV085UCSLG4yKNlB+IY9Dz/0hhguJYaKV+FLk32jZ8kto3XU58a6hd0DTp5rX jOGN1tqWISOQ2phIOwUDK0BZeGgNG+je0hpYWAkOxXKUAE27ufW0nyOoICMse5jQnv/p 0Wsw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:references :in-reply-to:message-id:date:subject:cc:to:from:dkim-signature; bh=aLsMVwtpgSOaGBz4AILnRl4PUyhZEZVIsjfHxCwTaGk=; b=breMLhZ9OKUuDwJsKeJcAPnbJ4nv411zVR/OpOm1C0YU1ncukC3r9eKX0tWmPuujm7 EgPQ0wDzx60kealf0kD+JE9vSwK29mkld6OzGIMeoZa+fCUnEVN1gAQKIl38v7UieRji KuPeVY/PfmzfBO1Htgyx/Q3yQ9NK7OJZwOCKG7p2KazBc/6v+Yr7NgI3IR0i2Y5c6amj 89Hou4Pn+3otGX4Jk0R9F2y3W3/PPciW7Ma7W9TIzOC4s0aROu8/BJ1qvJ0WuBIhOCFJ HCrm7IMKg3xDc8SCj+n98Cj6DMsFeSXG3vWmX1pxFYbfXcrIhWdXNnXdtfYxTdxrnkQl I9Nw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=hcKpYz9w; spf=pass (google.com: best guess record for domain of devicetree-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=devicetree-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. [209.132.180.67]) by mx.google.com with ESMTP id c8si2937664pgc.65.2019.02.07.04.57.27; Thu, 07 Feb 2019 04:57:27 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of devicetree-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=@linaro.org header.s=google header.b=hcKpYz9w; spf=pass (google.com: best guess record for domain of devicetree-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=devicetree-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 S1727225AbfBGM50 (ORCPT + 7 others); Thu, 7 Feb 2019 07:57:26 -0500 Received: from mail-pg1-f196.google.com ([209.85.215.196]:45167 "EHLO mail-pg1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727235AbfBGM5Z (ORCPT ); Thu, 7 Feb 2019 07:57:25 -0500 Received: by mail-pg1-f196.google.com with SMTP id y4so4442123pgc.12 for ; Thu, 07 Feb 2019 04:57:25 -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=aLsMVwtpgSOaGBz4AILnRl4PUyhZEZVIsjfHxCwTaGk=; b=hcKpYz9w/kBfeCUVmObGrKd419Cy5vzdpLIJR5NCbYRO71/hZX3+P78339usja50Dp MzZL5q9bxQBvG57P+5Lj51jAYZK+ho2Gyo7+9o9yuf9M/WYBp6JHF6IypfwMfh7l8XrN qdH07Lnwi/oTQobDeoDHiQ+fK+NZcKuf8imN1Slz1u8Le0TDsDRVmq0KbNov6/vFoXNO h1b1+jvt5KXuopQZSjAXP4n2NpMpFxRAGOqQj+QG09a2K9OGn7y8MA+ZWEoUokuY29r5 EUmyd2tKxrubbMqdRcxI6RaUMFfhS9qjmmaOl/GbSCapp6VlHSp33hZ1FDYVun2qN/M6 njdQ== 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=aLsMVwtpgSOaGBz4AILnRl4PUyhZEZVIsjfHxCwTaGk=; b=epNffEs4jbrKGbNHvWtEPBCsp0zsD7kI1SIIjgwA2CM3u7kgW+27N2KUUPkNsv9eeZ IlRCLSihN4cyxKonwREaPGIetySNM2rRxy+wKuhPhbvTHmGrlvehrakqag7Ud1fhVumk 6RQsUS3shszDb8kFFUmNJ/uwWN71dPT9DgOze9YnN+jQ1IzSWkP4U3chvzCYqGMJCrlA vLCjRNzVbJ/MQVjNOZyd/F6n+aJmsOLp3XnVezgI0FQQN2zmfsD4v+4re/k2rLiCr5H5 SABizLAorec6c/6aQ9PUtnn8aZmxJ4IaYdCFMHM856Uj7aPHhokYkWS2mcgLy1GAlDFM wsgA== X-Gm-Message-State: AHQUAub7qboiDpdDwxsHP0Fq9N7/xJeRdB3bbcBqxqkEeeZX4lKHc2go P3ePDfmLyHU51X8b0g6fTklKYA== X-Received: by 2002:a63:e711:: with SMTP id b17mr4222270pgi.363.1549544244759; Thu, 07 Feb 2019 04:57:24 -0800 (PST) Received: from localhost ([2402:3a80:c80:4138:75dd:3900:1d90:762f]) by smtp.gmail.com with ESMTPSA id z9sm30606960pfd.99.2019.02.07.04.57.23 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 07 Feb 2019 04:57:24 -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: devicetree@vger.kernel.org Subject: [PATCH v1 22/24] arm64: dts: qcom: qcs404: Add tsens controller Date: Thu, 7 Feb 2019 16:19:40 +0530 Message-Id: <6c7b8f6f6b7df129425f7975610bd45be411f0c4.1549525708.git.amit.kucheria@linaro.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: References: In-Reply-To: References: Sender: devicetree-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org qcs404 has a single TSENS IP block with 10 sensors. The calibration data is stored in an eeprom (qfprom) that is accessed through the nvmem framework. We add the qfprom node to allow the tsens sensors to be calibrated correctly. Signed-off-by: Amit Kucheria --- arch/arm64/boot/dts/qcom/qcs404.dtsi | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) -- 2.17.1 diff --git a/arch/arm64/boot/dts/qcom/qcs404.dtsi b/arch/arm64/boot/dts/qcom/qcs404.dtsi index 9b5c16562bbe..57d14d8f0c90 100644 --- a/arch/arm64/boot/dts/qcom/qcs404.dtsi +++ b/arch/arm64/boot/dts/qcom/qcs404.dtsi @@ -253,6 +253,16 @@ reg = <0x00060000 0x6000>; }; + qfprom: qfprom@a4000 { + compatible = "qcom,qfprom"; + reg = <0x000a4000 0x1000>; + #address-cells = <1>; + #size-cells = <1>; + tsens_caldata: caldata@d0 { + reg = <0x1f8 0x14>; + }; + }; + rng: rng@e3000 { compatible = "qcom,prng-ee"; reg = <0x000e3000 0x1000>; @@ -260,6 +270,16 @@ clock-names = "core"; }; + 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>; + }; + tlmm: pinctrl@1000000 { compatible = "qcom,qcs404-pinctrl"; reg = <0x01000000 0x200000>, From patchwork Thu Feb 7 10:49:41 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Amit Kucheria X-Patchwork-Id: 157742 Delivered-To: patch@linaro.org Received: by 2002:a02:48:0:0:0:0:0 with SMTP id 69csp611133jaa; Thu, 7 Feb 2019 04:57:37 -0800 (PST) X-Google-Smtp-Source: AHgI3IZsTWEBApWu8ae9AMJxxhzKWQIfJZtoQWFK+NfosWu5tIN/No8dysGQ+csLETjjxkuK8C8S X-Received: by 2002:a17:902:780a:: with SMTP id p10mr16680003pll.54.1549544257146; Thu, 07 Feb 2019 04:57:37 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1549544257; cv=none; d=google.com; s=arc-20160816; b=TIwEMLSlNkcHhZXHblR7pNj4oLBHra+V03LV3qrhPL6Fd/aKkNv20y/wepCbQVaPcF 7UH8mgoDdJyLvjniDACL5mgvBRk0JkcCG0XI9A/kQ9/Rhi6QsLh5sNxPjRUpRj0u3iPU wCt78J9ziCISr2IeVcSO0nJdYhqbUoNFMm2XOHuYDfXi5TDojFNeOkwPueOYXJ+prkdE wZcektxlshRRaBPEHGR8IWgJHwx3frjXI5W3ngrAiAH4kQ+fUS+D1ZJjwVJt+C8CBM+W fl0sg7zoL4PR5qOl/aV/6gVqloDeNzVIs4qIxsjGRB/Kz4J8RSq6ObXgQeV27pH4rgF2 rgvA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:references :in-reply-to:message-id:date:subject:cc:to:from:dkim-signature; bh=Fou3CPiZQH37wEY0owlz3oeUwIAQBrD/AvLRkXzz/b4=; b=TAeonlqpFIJH7oKmboBvpVefGUfDxLmYxzSAZwtP0Y4dwxUXxrMsX83aScOuaRP0Qs MzTBRdiPMkdka4G3KGCFIxreLhpt4wgzRGhoxunVjqi7XEwdmsUZieh68PR+kI922VsT eF938cs2GSs56evywdO0NVopWqrAM2ttdWt0w45MPkBoREp6+rFDPpUr06gqtQjtJ98W 8H1vL7xJcfcwi8qFXIBAqUbmp8BIGhJd6S/84gFG9SJNgJ2jYhdybNtH8hiBFfm174Vy D3pWQXnNIi5HG81Ms3rw/tNqN8q6QoPoHURUX2QCj2TSRkxHvdfoCGX0ancerMnXqzAJ DvvQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=DYOzexD4; spf=pass (google.com: best guess record for domain of devicetree-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=devicetree-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. [209.132.180.67]) by mx.google.com with ESMTP id k12si8269176pgg.382.2019.02.07.04.57.36; Thu, 07 Feb 2019 04:57:37 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of devicetree-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=@linaro.org header.s=google header.b=DYOzexD4; spf=pass (google.com: best guess record for domain of devicetree-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=devicetree-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 S1727478AbfBGM5g (ORCPT + 7 others); Thu, 7 Feb 2019 07:57:36 -0500 Received: from mail-pl1-f196.google.com ([209.85.214.196]:36932 "EHLO mail-pl1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727447AbfBGM5g (ORCPT ); Thu, 7 Feb 2019 07:57:36 -0500 Received: by mail-pl1-f196.google.com with SMTP id b5so4743356plr.4 for ; Thu, 07 Feb 2019 04:57:35 -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=Fou3CPiZQH37wEY0owlz3oeUwIAQBrD/AvLRkXzz/b4=; b=DYOzexD4Un1um32ePdAVVy8EvB+v1lY1Ry4EmjEKf7yUUx5gkCd20+1skPYBObDsS4 9RAdNooGDnXnPf0robatUQVZH/ZExDiPZzN2thJSDIB2D0GXGjF5XEnXCN9a5FIFVnQr Z8kLbTuGh9rnDYSv8NFzypk9YzZev4Vjt0Pj2at9ud+OOlMDJfsT2gsS+cUVsC/X++OT 5hNUD7eZV2R1d6EepnX2AjiDUzwbT17woP9UTRb5Cwj+tU6U7ndNHdrh/btS47nJ4iBm 7tsCHajfX8cuJ7CGVfFYLJL4VB8FriCUWkYLZIyDwtngDmsUeCIze1jrj09od02TmiGH k3NA== 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=Fou3CPiZQH37wEY0owlz3oeUwIAQBrD/AvLRkXzz/b4=; b=OReiVbO+eI65rQBhMUZ39kWeh3BwQnURLjl+xYhyI+qK7RmgxKoIpaqWPuMrB66/fo ESI+VizJnvtz+yP0rDeOZG4iY0WADeVnZGM3mxHk+43wD+Ilma8wGPwDoUQIl32o8r+Z Sw0ATNMrnN38S32MIfDckVajYCSc16Fdcr3WKApJmFJmdAmY1zVnTYexVcbRwILHjQxl xEDq9Q1NG+zlBwp29+cEUGhCl5rSjHYuI4vcQxdSfR50j0WHTrvRo9TtHoa3p6j9C6Q2 ZVymOzx4McOzVAVPdObrfY40GfXpwElUXcymbTqtsO2S1/LITeWtZyg5Qrjp/LYYz0bE JoNw== X-Gm-Message-State: AHQUAub+TqcYO1iYBKFBu78BVPY8ejmUXwDm1u309+6juaqPdOJ9sd5K n3YIggSvztUojcCVHI+/HUxF0Q== X-Received: by 2002:a17:902:c85:: with SMTP id 5mr16496678plt.339.1549544255522; Thu, 07 Feb 2019 04:57:35 -0800 (PST) Received: from localhost ([2402:3a80:c80:4138:75dd:3900:1d90:762f]) by smtp.gmail.com with ESMTPSA id z15sm13439148pgc.77.2019.02.07.04.57.27 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 07 Feb 2019 04:57:35 -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: devicetree@vger.kernel.org Subject: [PATCH v1 23/24] arm64: dts: qcom: qcs404: Add thermal zones for each sensor Date: Thu, 7 Feb 2019 16:19:41 +0530 Message-Id: <42fd6c63c58db82088924c70d016e03a2b6fa9fe.1549525708.git.amit.kucheria@linaro.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: References: In-Reply-To: References: Sender: devicetree-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org qcs404 has 10 sensors connected to the single TSENS IP. Define a thermal zone for each of those sensors to expose the temperature of each zone. Signed-off-by: Amit Kucheria --- arch/arm64/boot/dts/qcom/qcs404.dtsi | 243 +++++++++++++++++++++++++++ 1 file changed, 243 insertions(+) -- 2.17.1 diff --git a/arch/arm64/boot/dts/qcom/qcs404.dtsi b/arch/arm64/boot/dts/qcom/qcs404.dtsi index 57d14d8f0c90..ca99c45864df 100644 --- a/arch/arm64/boot/dts/qcom/qcs404.dtsi +++ b/arch/arm64/boot/dts/qcom/qcs404.dtsi @@ -3,6 +3,7 @@ #include #include +#include / { interrupt-parent = <&intc>; @@ -30,6 +31,7 @@ reg = <0x100>; enable-method = "psci"; next-level-cache = <&L2_0>; + #cooling-cells= <2>; }; CPU1: cpu@101 { @@ -38,6 +40,7 @@ reg = <0x101>; enable-method = "psci"; next-level-cache = <&L2_0>; + #cooling-cells= <2>; }; CPU2: cpu@102 { @@ -46,6 +49,7 @@ reg = <0x102>; enable-method = "psci"; next-level-cache = <&L2_0>; + #cooling-cells= <2>; }; CPU3: cpu@103 { @@ -54,6 +58,7 @@ reg = <0x103>; enable-method = "psci"; next-level-cache = <&L2_0>; + #cooling-cells= <2>; }; L2_0: l2-cache { @@ -507,4 +512,242 @@ #interrupt-cells = <2>; }; }; + + thermal-zones { + aoss-thermal { + polling-delay-passive = <250>; + polling-delay = <1000>; + + thermal-sensors = <&tsens 0>; + + trips { + aoss_alert0: trip-point@0 { + temperature = <95000>; + hysteresis = <2000>; + type = "passive"; + }; + aoss_crit: aoss_crit { + temperature = <110000>; + hysteresis = <2000>; + type = "critical"; + }; + }; + }; + + dsp-thermal { + polling-delay-passive = <250>; + polling-delay = <1000>; + + thermal-sensors = <&tsens 1>; + + trips { + dsp_alert0: trip-point@0 { + temperature = <95000>; + hysteresis = <2000>; + type = "passive"; + }; + dsp_crit: dsp_crit { + temperature = <110000>; + hysteresis = <2000>; + type = "critical"; + }; + }; + }; + + lpass-thermal { + polling-delay-passive = <250>; + polling-delay = <1000>; + + thermal-sensors = <&tsens 2>; + + trips { + lpass_alert0: trip-point@0 { + temperature = <95000>; + hysteresis = <2000>; + type = "passive"; + }; + lpass_crit: lpass_crit { + temperature = <110000>; + hysteresis = <2000>; + type = "critical"; + }; + }; + }; + + wlan-thermal { + polling-delay-passive = <250>; + polling-delay = <1000>; + + thermal-sensors = <&tsens 3>; + + trips { + wlan_alert0: trip-point@0 { + temperature = <95000>; + hysteresis = <2000>; + type = "passive"; + }; + wlan_crit: wlan_crit { + temperature = <110000>; + hysteresis = <2000>; + type = "critical"; + }; + }; + }; + + cluster-thermal { + polling-delay-passive = <250>; + polling-delay = <1000>; + + thermal-sensors = <&tsens 4>; + + trips { + cluster_alert0: trip-point@0 { + temperature = <95000>; + hysteresis = <2000>; + type = "passive"; + }; + cluster_crit: cluster_crit { + temperature = <110000>; + hysteresis = <2000>; + type = "critical"; + }; + }; + }; + + cpu0-thermal { + polling-delay-passive = <250>; + polling-delay = <1000>; + + thermal-sensors = <&tsens 5>; + + trips { + cpu0_alert0: trip-point@0 { + temperature = <95000>; + hysteresis = <2000>; + type = "passive"; + }; + cpu0_crit: cpu_crit { + temperature = <110000>; + hysteresis = <2000>; + type = "critical"; + }; + }; + cooling-maps { + map0 { + trip = <&cpu0_alert0>; + cooling-device = <&CPU0 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>, + <&CPU1 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>, + <&CPU2 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>, + <&CPU3 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>; + }; + }; + }; + + cpu1-thermal { + polling-delay-passive = <250>; + polling-delay = <1000>; + + thermal-sensors = <&tsens 6>; + + trips { + cpu1_alert0: trip-point@0 { + temperature = <95000>; + hysteresis = <2000>; + type = "passive"; + }; + cpu1_crit: cpu_crit { + temperature = <110000>; + hysteresis = <2000>; + type = "critical"; + }; + }; + cooling-maps { + map0 { + trip = <&cpu1_alert0>; + cooling-device = <&CPU0 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>, + <&CPU1 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>, + <&CPU2 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>, + <&CPU3 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>; + }; + }; + }; + + cpu2-thermal { + polling-delay-passive = <250>; + polling-delay = <1000>; + + thermal-sensors = <&tsens 7>; + + trips { + cpu2_alert0: trip-point@0 { + temperature = <95000>; + hysteresis = <2000>; + type = "passive"; + }; + cpu2_crit: cpu_crit { + temperature = <110000>; + hysteresis = <2000>; + type = "critical"; + }; + }; + cooling-maps { + map0 { + trip = <&cpu2_alert0>; + cooling-device = <&CPU0 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>, + <&CPU1 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>, + <&CPU2 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>, + <&CPU3 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>; + }; + }; + }; + + cpu3-thermal { + polling-delay-passive = <250>; + polling-delay = <1000>; + + thermal-sensors = <&tsens 8>; + + trips { + cpu3_alert0: trip-point@0 { + temperature = <95000>; + hysteresis = <2000>; + type = "passive"; + }; + cpu3_crit: cpu_crit { + temperature = <110000>; + hysteresis = <2000>; + type = "critical"; + }; + }; + cooling-maps { + map0 { + trip = <&cpu3_alert0>; + cooling-device = <&CPU0 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>, + <&CPU1 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>, + <&CPU2 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>, + <&CPU3 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>; + }; + }; + }; + + gpu-thermal { + polling-delay-passive = <250>; + polling-delay = <1000>; + + thermal-sensors = <&tsens 9>; + + trips { + gpu_alert0: trip-point@0 { + temperature = <95000>; + hysteresis = <2000>; + type = "passive"; + }; + gpu_crit: gpu_crit { + temperature = <95000>; + hysteresis = <2000>; + type = "critical"; + }; + }; + }; + }; };