From patchwork Mon Jul 9 11:27:36 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Amit Kucheria X-Patchwork-Id: 141380 Delivered-To: patch@linaro.org Received: by 2002:a2e:9754:0:0:0:0:0 with SMTP id f20-v6csp2548472ljj; Mon, 9 Jul 2018 04:28:35 -0700 (PDT) X-Google-Smtp-Source: AAOMgpcmb1aYvTITz8Nb7CvnxGz33FMHW/hbUY44+1+6mBvTeQ7z5ceP1uOljs3nS7dVcNltMbWm X-Received: by 2002:a17:902:b693:: with SMTP id c19-v6mr4891764pls.114.1531135715244; Mon, 09 Jul 2018 04:28:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1531135715; cv=none; d=google.com; s=arc-20160816; b=XWfwuRYGYB8Ysv8ye+59rds0KNTOoi6pwALFJ0zPNDw1RsMCWT3veg94fdF599QuLw gY9trBYNwEhMH3I0aFLFzrsGiRbk5qATNQ/ZsVsvQuLbCCpJSAwVdvjPZi9+w+KlIQi+ HUtGmWr+y3a6Q0DL/WF7cLUwFfnWlzJE1241ahNt5zwjS8NhTYIwtiV4AnVcl9bV0lcy S/ATtyHbtGwWuNVvSxWMdz0fjCGauekZRvyirowh68LfZ/4bNzKpuGyjVmL1VllZhz56 eM5v+HQI9iFw+YstFGzmKX6cFVG2xdXCl1zRrekjC1tC+YeTgibqCmEM5XFA7xbWHzlO /I+A== 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 :arc-authentication-results; bh=LboO0m9tdUv5OClL5JGmFqiWh7zVC6d1MgWg2XNw1k8=; b=fnyiMwSqKFTdtAZGcXDunKZ6/HBSn8gPJWsRR9uy9tr5tGTn1dY1hXTs9QablAHQCV EFA4BnhHLN/taGLXW6J9T6tL8e/GDnYsB3Wb6BEmUir/fywcULwAqtYCNMNQYAARtkir CNFUsmS3rRHIg8KXp0StcULKfgvkmRdyBJWitEmDxEEqSuM8efLaOBVfZYNq/hTEPoH5 NGeT+9CyD3dBnCychXZ09MoaBIGZdd+ZhkksyPk3fpqsabXvfwzKRxBzPmRt82vLpbrm wd4VA5cJvYywdX7w1WBr4cuBe1qJt+KaZskuAk/uCWUi4cfCFP5V2JdjHrAMlnNz5P3S r9rw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="A/g0mtb0"; 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=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 h189-v6si13072748pge.66.2018.07.09.04.28.34; Mon, 09 Jul 2018 04:28:35 -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=@linaro.org header.s=google header.b="A/g0mtb0"; 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=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932928AbeGIL2d (ORCPT + 31 others); Mon, 9 Jul 2018 07:28:33 -0400 Received: from mail-wr1-f66.google.com ([209.85.221.66]:35069 "EHLO mail-wr1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932862AbeGIL23 (ORCPT ); Mon, 9 Jul 2018 07:28:29 -0400 Received: by mail-wr1-f66.google.com with SMTP id a3-v6so1360906wrt.2 for ; Mon, 09 Jul 2018 04:28:28 -0700 (PDT) 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=LboO0m9tdUv5OClL5JGmFqiWh7zVC6d1MgWg2XNw1k8=; b=A/g0mtb0jokK/Zde6XuLfjxTTtg6h3hQJZF9JIcvbRbwAzfhJtYj+sep0ubtKo4GQ7 7aUUny3kxn21N3RXBmnegF8lGiPq/5p13zCpKzNMu5lP8O+HQVWixGmos+Adpu10EdqX nbc1R2O4KhpdeFNYWqnrKUmBwJgp+yrfDK39w= 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=LboO0m9tdUv5OClL5JGmFqiWh7zVC6d1MgWg2XNw1k8=; b=CwQGJqnbqwfoUrBHwFxTB/GQcVAd7VILIke74MwbDxNBfTcaCePFxm9ndNGKPz8xKY KU1EZ1OZrC5Ib2sgySbvqpvsCTyFBQhXCmx2gStJmDH3lrn8+nQ8foFLQv0LBdAKP6JZ NJb5h1Y2HNt/K4eO8tr+T/e3LTG+wmuNWtf2OfyPDEg5RW9tbzpevLlYDj280Lgg6+/5 MpDaBvGO0TNDchHTpBMrqqM1vH7Dxz76bCPYj0KcmucN606EJtchATkIOwwKofcRJ+zR HeEtzRRfJACwzR8AhtMu+k4Xwpb8E4lvt3J6Rr+yoQil9IAEtyBdqw/SaqUxhx1K8hts QRAA== X-Gm-Message-State: APt69E1lKnTXA1o9GngewcmxTFGYyJeMBTUsNgwBnmtV5EPu61Pj1k/B wTqV7Gq3XrWk12NHO7zjfKOGZEqUNW8= X-Received: by 2002:a5d:4c4c:: with SMTP id n12-v6mr13824589wrt.71.1531135708058; Mon, 09 Jul 2018 04:28:28 -0700 (PDT) Received: from localhost ([49.248.189.240]) by smtp.gmail.com with ESMTPSA id h5-v6sm1095318wrr.19.2018.07.09.04.28.26 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 09 Jul 2018 04:28:27 -0700 (PDT) From: Amit Kucheria To: linux-kernel@vger.kernel.org Cc: rnayak@codeaurora.org, linux-arm-msm@vger.kernel.org, bjorn.andersson@linaro.org, edubezval@gmail.com, smohanad@codeaurora.org, vivek.gautam@codeaurora.org, andy.gross@linaro.org, David Brown , Rob Herring , Mark Rutland , Catalin Marinas , Will Deacon , linux-soc@vger.kernel.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org Subject: [PATCH v5 3/7] dt: qcom: 8996: thermal: Move to DT initialisation Date: Mon, 9 Jul 2018 16:57:36 +0530 Message-Id: X-Mailer: git-send-email 2.7.4 In-Reply-To: References: In-Reply-To: References: Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org We also split up the regmap address space into two, one for the TM registers, the other for the SROT registers. This was required to deal with different address offsets for the TM and SROT registers across different SoC families. Since tsens-common.c/init_common() currently only registers one address space, the order is important (TM before SROT). This is OK since the code doesn't really use the SROT functionality yet. Signed-off-by: Amit Kucheria --- arch/arm64/boot/dts/qcom/msm8996.dtsi | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) -- 2.7.4 diff --git a/arch/arm64/boot/dts/qcom/msm8996.dtsi b/arch/arm64/boot/dts/qcom/msm8996.dtsi index 8c7f9ca..6c8a857 100644 --- a/arch/arm64/boot/dts/qcom/msm8996.dtsi +++ b/arch/arm64/boot/dts/qcom/msm8996.dtsi @@ -461,7 +461,17 @@ tsens0: thermal-sensor@4a8000 { compatible = "qcom,msm8996-tsens"; - reg = <0x4a8000 0x2000>; + reg = <0x4a9000 0x1000>, /* TM */ + <0x4a8000 0x1000>; /* SROT */ + #qcom,sensors = <13>; + #thermal-sensor-cells = <1>; + }; + + tsens1: thermal-sensor@4ac000 { + compatible = "qcom,msm8996-tsens"; + reg = <0x4ad000 0x1000>, /* TM */ + <0x4ac000 0x1000>; /* SROT */ + #qcom,sensors = <8>; #thermal-sensor-cells = <1>; }; From patchwork Mon Jul 9 11:27:37 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Amit Kucheria X-Patchwork-Id: 141381 Delivered-To: patch@linaro.org Received: by 2002:a2e:9754:0:0:0:0:0 with SMTP id f20-v6csp2548604ljj; Mon, 9 Jul 2018 04:28:45 -0700 (PDT) X-Google-Smtp-Source: AAOMgpc0ZyXCuxfgV5P1ufEOgKg+UcK6HQg6xv7xFz89Eyt/988VEIMlcKv55rlnf9brMKlu1Lod X-Received: by 2002:a63:4203:: with SMTP id p3-v6mr18533363pga.184.1531135725524; Mon, 09 Jul 2018 04:28:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1531135725; cv=none; d=google.com; s=arc-20160816; b=wjIi9dnD6L5BG3wteTZIq8b419iu4mACRs3OdHgwa5KJx1pi1bRVQdvlnjmtbqTG9e k4xdC0vvPPHPV8OHGGaG+TY2XYyZM2ivvUqnsohWyaGBXwPo4ryWqe5Yw69iIjos9Ixt MGOx6xIoZHWafeSbLoUh5456IJe01Qws96NBIyQYVJci4d1QB3cOpkvoku/RO9hbHp6a CTtmJ76pZ3W+2xEMAKLwuTfV4Nqko3g/I7tkjPhd2JKqjU+h5jq/b/tXAg8aXBUcoBA0 oJ+ogZE+ff+TE9YGb/fV7A/iH1XNfu13rChYwumJzsHqU0qaKV0IGoB/fvhIWP+yIrYC 3X2w== 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 :arc-authentication-results; bh=2kQdfwaob3qy9LVH8RWOXrQk/39YsJ9FerONY2LPNaY=; b=kITtDp5x28ANtmxB0l8UaEglBmuQwZfXB9VUSjtQg84OrZG4trd4b/etI29OO0Pykf ASBrWrYaz/CW7S4ZjvSYVvR8Z1BvjOKUMpzNGU38AJ5cjc1Y8of4PFsM4duOHMxuTDv5 4emxoF34UqzY0Z94uqunkACC8OpYv7E+akep5Xm+rXGXojrxprtDJrm+lAkKqOV9u7xr RpwiLv1fCrE6iYGcVK0881p8cgYHLgnKglMe/s3Io5smrSTc6uDbBB9Ef4WegVLucFYD Av5PNPF9efB1PPwtPHK3wIarBmFJyfIzgH76ZL4pSABOom1jcEBDH7hCXXvH3Unz/frT GRKA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=fesnksgh; 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=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 h25-v6si9711323pgh.119.2018.07.09.04.28.45; Mon, 09 Jul 2018 04:28: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=@linaro.org header.s=google header.b=fesnksgh; 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=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932961AbeGIL2n (ORCPT + 31 others); Mon, 9 Jul 2018 07:28:43 -0400 Received: from mail-wr1-f66.google.com ([209.85.221.66]:33199 "EHLO mail-wr1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932743AbeGIL2k (ORCPT ); Mon, 9 Jul 2018 07:28:40 -0400 Received: by mail-wr1-f66.google.com with SMTP id g6-v6so1687424wrp.0 for ; Mon, 09 Jul 2018 04:28:40 -0700 (PDT) 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=2kQdfwaob3qy9LVH8RWOXrQk/39YsJ9FerONY2LPNaY=; b=fesnksgh9Wby/1TIewrpFCuj4BsrRm3XPYMKQLrDJNpgDBYJxhTN9pFcQufX9yQ2Jf d/bldwSdJQTypHgF4BhDW/e2CO2Xw+RYCSNagUSS696/PNqLqKUEL3ORZZIiiogwN6o+ jHOAqq+0zNYlL+Z2jwfuNYccvmOfJ5iRdAuG4= 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=2kQdfwaob3qy9LVH8RWOXrQk/39YsJ9FerONY2LPNaY=; b=gRurexUAq7jwF7KqQkJMEJwX7f1ixjqaHch8RrmY9qd3rUdYVm4j8lr+LgWpWzB1Sq mbgYz+E7ktKRtlbJ20YcQJMTIU4JAzz71WfJpKrW3cQ0fSY2TlN/q6LXKcCxNOW+GO+I qgz9fmUyF8tzfkcXbHS7qhjGiV1U2TekTq3FWcnOAFYe3b5Vgi0qu5JUb+JOwGuSLoPn 6nUinO6g50HqBclWCE18aGII8f+ZMFG3oznuFV026iZVDbdKC2DRn0dotyGBSCuXXRtt yucnsz/VKclvdJWfWgp67Ptf+4q11AwUcnheRczEVI4Stdw4IH/SjBFlMzHVIEkfO8iT 8kag== X-Gm-Message-State: APt69E3ZxXflThsNf2ELFEG3URsMIU+jckEP+bUe3aGCjldJDvORgiyr 3H+FcxAoPE3ZTp+AaiBZzMTVo0TYzsU= X-Received: by 2002:adf:adae:: with SMTP id w43-v6mr15368407wrc.251.1531135719301; Mon, 09 Jul 2018 04:28:39 -0700 (PDT) Received: from localhost ([49.248.189.240]) by smtp.gmail.com with ESMTPSA id y203-v6sm14585462wme.42.2018.07.09.04.28.37 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 09 Jul 2018 04:28:38 -0700 (PDT) From: Amit Kucheria To: linux-kernel@vger.kernel.org Cc: rnayak@codeaurora.org, linux-arm-msm@vger.kernel.org, bjorn.andersson@linaro.org, edubezval@gmail.com, smohanad@codeaurora.org, vivek.gautam@codeaurora.org, andy.gross@linaro.org, Zhang Rui , linux-pm@vger.kernel.org Subject: [PATCH v5 4/7] thermal: tsens: Rename tsens-8996 to tsens-v2 for reuse Date: Mon, 9 Jul 2018 16:57:37 +0530 Message-Id: <910ed3e440a5612f4113318c66ae2395f53abaae.1531133612.git.amit.kucheria@linaro.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: References: In-Reply-To: References: Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The TSENS block inside the 8996 is internally classified as version 2 of the IP. Several other SoC families use this block and can share this code. We rename get_temp() to reflect that it can be used across the v2 family. Signed-off-by: Amit Kucheria --- drivers/thermal/qcom/Makefile | 2 +- drivers/thermal/qcom/{tsens-8996.c => tsens-v2.c} | 26 ++++++++--------------- 2 files changed, 10 insertions(+), 18 deletions(-) rename drivers/thermal/qcom/{tsens-8996.c => tsens-v2.c} (66%) -- 2.7.4 diff --git a/drivers/thermal/qcom/Makefile b/drivers/thermal/qcom/Makefile index 2cc2193..a821929 100644 --- a/drivers/thermal/qcom/Makefile +++ b/drivers/thermal/qcom/Makefile @@ -1,2 +1,2 @@ obj-$(CONFIG_QCOM_TSENS) += qcom_tsens.o -qcom_tsens-y += tsens.o tsens-common.o tsens-8916.o tsens-8974.o tsens-8960.o tsens-8996.o +qcom_tsens-y += tsens.o tsens-common.o tsens-8916.o tsens-8974.o tsens-8960.o tsens-v2.o diff --git a/drivers/thermal/qcom/tsens-8996.c b/drivers/thermal/qcom/tsens-v2.c similarity index 66% rename from drivers/thermal/qcom/tsens-8996.c rename to drivers/thermal/qcom/tsens-v2.c index 60765b1..34ba6c7 100644 --- a/drivers/thermal/qcom/tsens-8996.c +++ b/drivers/thermal/qcom/tsens-v2.c @@ -1,27 +1,18 @@ +// SPDX-License-Identifier: GPL-2.0 /* * Copyright (c) 2015, The Linux Foundation. All rights reserved. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 and - * only version 2 as published by the Free Software Foundation. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * + * Copyright (c) 2018, Linaro Limited */ -#include #include #include "tsens.h" -#define STATUS_OFFSET 0x10a0 -#define LAST_TEMP_MASK 0xfff +#define STATUS_OFFSET 0xa0 +#define LAST_TEMP_MASK 0xfff #define STATUS_VALID_BIT BIT(21) #define CODE_SIGN_BIT BIT(11) -static int get_temp_8996(struct tsens_device *tmdev, int id, int *temp) +static int get_temp_tsens_v2(struct tsens_device *tmdev, int id, int *temp) { struct tsens_sensor *s = &tmdev->sensor[id]; u32 code; @@ -73,12 +64,13 @@ static int get_temp_8996(struct tsens_device *tmdev, int id, int *temp) return 0; } -static const struct tsens_ops ops_8996 = { +static const struct tsens_ops ops_generic_v2 = { .init = init_common, - .get_temp = get_temp_8996, + .get_temp = get_temp_tsens_v2, }; const struct tsens_data data_8996 = { .num_sensors = 13, - .ops = &ops_8996, + .ops = &ops_generic_v2, }; + From patchwork Mon Jul 9 11:27:40 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Amit Kucheria X-Patchwork-Id: 141384 Delivered-To: patch@linaro.org Received: by 2002:a2e:9754:0:0:0:0:0 with SMTP id f20-v6csp2549014ljj; Mon, 9 Jul 2018 04:29:11 -0700 (PDT) X-Google-Smtp-Source: AAOMgpc4oR6YKimxiAnucaiUJ5dMO9nJgHFXIvjPGk1Pr4DdOUiuXUZyKSrkXTsjiNecteCTm2sM X-Received: by 2002:a63:1844:: with SMTP id 4-v6mr12906947pgy.313.1531135750910; Mon, 09 Jul 2018 04:29:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1531135750; cv=none; d=google.com; s=arc-20160816; b=mjMDyA2mLrLVUzIVBzTCfWhZ/wxlAGp/eX9D9tATTeEPazJXZcpULPLDM7XQ2jFJH1 KAEZ4nUh31Y9i6ID5IMrN43lC1ISaGDN984/pBNofNKGQVytayyIv/dUZDyJS/baecHF 7z9Cpgy9kYWlOy6+8BczYtRXajs4jM84aQe4H97qUCMeoRxe6VWmvQHE3MNEK68UB3BF wiqelkim7Q5+cmKLpW7ndEXC8XNObg1sAebJlXKESAuAGL1dPhp8lIzHA7R7xkOklqA9 LYdGrl9sFBTQH5KyqV7JHIhVXPhP07o6IU3B0zGvwUx/cmxcKFUHFtPi3LQWW3XVdz7d ubNw== 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 :arc-authentication-results; bh=1JqEW+Zyv2CqnsmBXNt/A0PwbfHTAHHNG/CWkFvPZKE=; b=zv8OHlUeRDKABDF2BBIbgE5koSidiG5bZSP2fUYli7qj9+tH5t+RY6YtAm+uPdMNnz Z+j0koDQiD1jhNBZyXmWxS5IGH+z6tWShpjmEnw0ffoDFe6D8fBc2u10McxAm/HoA4LN eXQDxuqs3jIhJ5PmDB//1yhwXMyHNkuSRVjN7jYPagzL72kCTKsNKFFn5LlE5mQB3jnd xvlM5uL3wUipDtLkAoy1K1dg0PmblIlaC8V3AF359OMgzBWDlFX/IGMmFphhzXvqFEhm xCzM/xiG3IHe4cWKu0mlDtgNOyV2rKXeSE9XWVevtcuiiW469shFoibdGXrDx6zcyxOX 55uQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=f6QLWEmL; 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=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 61-v6si14612627plr.483.2018.07.09.04.29.10; Mon, 09 Jul 2018 04:29:10 -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=@linaro.org header.s=google header.b=f6QLWEmL; 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=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754538AbeGIL3I (ORCPT + 31 others); Mon, 9 Jul 2018 07:29:08 -0400 Received: from mail-wr1-f66.google.com ([209.85.221.66]:41373 "EHLO mail-wr1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754490AbeGIL3E (ORCPT ); Mon, 9 Jul 2018 07:29:04 -0400 Received: by mail-wr1-f66.google.com with SMTP id j5-v6so4076081wrr.8 for ; Mon, 09 Jul 2018 04:29:04 -0700 (PDT) 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=1JqEW+Zyv2CqnsmBXNt/A0PwbfHTAHHNG/CWkFvPZKE=; b=f6QLWEmLD2lDqjkUZeGQ4embRvv0fJ4Xnkhyn6ucvT8PCBROXHsKAF2y8IBTADdpyV TAJlih0zolCTOWrmBDuGcMrNEH5GsQrZSDpcvn6AmOeicgn/JJ+7jHISr1ndwUDA0MEw mI3V2aGi1UMQssHmgtdsZ3/1F04WTyJtg1YOQ= 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=1JqEW+Zyv2CqnsmBXNt/A0PwbfHTAHHNG/CWkFvPZKE=; b=N+w6vAuV4Xbuyr4QfLDxUyXEY3LN1CsAsbJSu3dde8Sc9pa15TL1V8rrWrCRVPYfTD bSUUbBuJH99OEAI3AHr771RUXn/eQtT97WK0taYiU6coqCHA0PMUdwr9g59whScalnyY +bs2iNhSqtABXRyh1poY3WrdE7HUi/LMA5mQTRM6tY9q9ChobwEzzCNrmbQNBXsBRST6 kIZN6ifryQX5oWCXwrsc4HC/FobI3C17ALIe3zDqTW5HV83PUl7H/dbJXNQO+sn9fQCe TXUV8qSzTJLgKXNnUBuDpAam/56BtEFWN0FNihkk+f3aYL8L0Vj51i1nTWwqMT6EhSZf H85g== X-Gm-Message-State: APt69E25NjWojcq4ESzSZgSfISVVIPDfQEyePxs31Ets0IaWVl1azpfI dXnSlFfcRpr6EfRtp8HbXDwcXE6EVd8= X-Received: by 2002:adf:e90c:: with SMTP id f12-v6mr14129316wrm.126.1531135743226; Mon, 09 Jul 2018 04:29:03 -0700 (PDT) Received: from localhost ([49.248.189.240]) by smtp.gmail.com with ESMTPSA id x16-v6sm24804528wme.12.2018.07.09.04.29.01 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 09 Jul 2018 04:29:02 -0700 (PDT) From: Amit Kucheria To: linux-kernel@vger.kernel.org Cc: rnayak@codeaurora.org, linux-arm-msm@vger.kernel.org, bjorn.andersson@linaro.org, edubezval@gmail.com, smohanad@codeaurora.org, vivek.gautam@codeaurora.org, andy.gross@linaro.org, David Brown , Rob Herring , Mark Rutland , Catalin Marinas , Will Deacon , linux-soc@vger.kernel.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org Subject: [PATCH v5 7/7] arm64: dts: sdm845: Add tsens nodes Date: Mon, 9 Jul 2018 16:57:40 +0530 Message-Id: <742cf44d162523a66bb4ce60e15449dfbf88800a.1531133612.git.amit.kucheria@linaro.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: References: In-Reply-To: References: Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org SDM845 has two tsens blocks, one with 13 sensors and the other with 8 sensors. It uses version 2 of the TSENS IP, so use the fallback property to allow more common code. Signed-off-by: Amit Kucheria --- arch/arm64/boot/dts/qcom/sdm845.dtsi | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) -- 2.7.4 diff --git a/arch/arm64/boot/dts/qcom/sdm845.dtsi b/arch/arm64/boot/dts/qcom/sdm845.dtsi index cdaabeb..d97ee00 100644 --- a/arch/arm64/boot/dts/qcom/sdm845.dtsi +++ b/arch/arm64/boot/dts/qcom/sdm845.dtsi @@ -221,6 +221,22 @@ #interrupt-cells = <2>; }; + tsens0: tsens@c222000 { + compatible = "qcom,sdm845-tsens", "qcom,tsens-v2"; + reg = <0xc263000 0x1ff>, /* TM */ + <0xc222000 0x1ff>; /* SROT */ + #qcom,sensors = <13>; + #thermal-sensor-cells = <1>; + }; + + tsens1: tsens@c223000 { + compatible = "qcom,sdm845-tsens", "qcom,tsens-v2"; + reg = <0xc265000 0x1ff>, /* TM */ + <0xc223000 0x1ff>; /* SROT */ + #qcom,sensors = <8>; + #thermal-sensor-cells = <1>; + }; + spmi_bus: spmi@c440000 { compatible = "qcom,spmi-pmic-arb"; reg = <0xc440000 0x1100>,