From patchwork Wed Oct 16 07:34:03 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Amit Kucheria X-Patchwork-Id: 176429 Delivered-To: patch@linaro.org Received: by 2002:a92:7e96:0:0:0:0:0 with SMTP id q22csp6992749ill; Wed, 16 Oct 2019 00:34:43 -0700 (PDT) X-Google-Smtp-Source: APXvYqzGt4cHVUsMV1T3UqB90Vq8vxBeuhIxtvFP78qmv2NUN5276x1tZKsOe3gPuwsc8ZPvAf6l X-Received: by 2002:a05:6402:19bd:: with SMTP id o29mr36979876edz.42.1571211283400; Wed, 16 Oct 2019 00:34:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1571211283; cv=none; d=google.com; s=arc-20160816; b=wJrxaComugsRJZu4ErIOz6/zF8BMHjrI1FVmHV7domB2uAzcc2HZ/QGGwlQxd/XSxN x9Z60DPPfHt+8dg7EfEnykFdWd9Qw/whAO4jzjeNkECUHBlNLbpj8+Ntf3DFWSEwyUjS +MLYQzzFYwIlJrozaOOwQNYY3rJ8q8DMN5/JXMA1/GcI4ijY9JfkRfQ1qCCrQZawdwLU u1Vh1XVVY/Tjs+QR9s5YKF9UVo2tXyAoMguSIkYWT3/jYGIj+bfN5vKAXD7l04ChWjYy Qh1Rm2DujlI7MMHzUG8RODLghge/YKLJ4JbvZRW1TCHT2piRhyBPisj6wIK13c8WigkY ZhqA== 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=X8pbmbvndxxAH4F0z0Ew7Vd1EABZ+OrJe/0vppnAxes=; b=rs+/grywuHA4cCfhCwQNTrwaBXwZ+VjasnZp0bTwyU/nlac5Nc6qh9cNeqWeWlVZjE 3eVtEZjYkAke2OCNUC5ESOOu6T6VlUeg8FaBIipiRkE8fbyLT3tt9TkC4/AEHpwxCElJ TgdxQNyu4rPmgj20pyHuJiqEnzAwqQiRL0xRhiEJ9Bt7l28dz5HI1eA20V1C9/uuat/m GpO14nJp8+VmwdYFz9Z/zgePP4WR4zlwIkW9RX/zSPx15F0nJjrKMbDyZbpqAFOdDU6L ZVkD+KF0gw2C7nFpOR+CaZacfh2kHrlj/jF3G2aw6FSgTbZGJRV6LJSfbcNneqgNoLCZ OTEw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=m2blUIER; 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 i27si14998447ejg.249.2019.10.16.00.34.43; Wed, 16 Oct 2019 00:34:43 -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=m2blUIER; 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 S1733007AbfJPHek (ORCPT + 26 others); Wed, 16 Oct 2019 03:34:40 -0400 Received: from mail-pg1-f194.google.com ([209.85.215.194]:42456 "EHLO mail-pg1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1732835AbfJPHej (ORCPT ); Wed, 16 Oct 2019 03:34:39 -0400 Received: by mail-pg1-f194.google.com with SMTP id f14so8642802pgi.9 for ; Wed, 16 Oct 2019 00:34:38 -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=X8pbmbvndxxAH4F0z0Ew7Vd1EABZ+OrJe/0vppnAxes=; b=m2blUIERT53SNTEyx5WOy2++HB63Jg2q6qsys2oeOGLlXKv8Gq+exfQEtDm14SPsVy JLRh6aKmCGJfxndpb4LMK3V7snH4kMI5ksP1H8pzeuzTqd3DN0MoyRLtdgzQBn8wWAxY B7PFn1D2IbPS/zgrdzHuGfeoPQm0QkLvGohG4gqBs6l+s2tdnDUKRvywOLk1uyNHR9Yt Gpy+kDsIJtaQ/ubsggnQ5yzSKH0i+88450twFBnyfGEYgGUZ2pO9d+qAcl8AE2Mxc5sg WL9tdFWK2NuX8kB5asflDsKPtdvxN5G2Pz+UDMhK9XLiQhQiM7UzjLZtVgIpbokCMOj7 HoHQ== 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=X8pbmbvndxxAH4F0z0Ew7Vd1EABZ+OrJe/0vppnAxes=; b=Ub1bo5uysGSlqjBAiaWTvP/hFEZnJ5cy2XPPs1vTkMcg9EPdWIbDobQcYvVYnsC6it kp2iUV/wR+UC9yDhC719Oik8x/vxaaRSuWjxiEkmF15eCRmnugYrPsPJsXzTEbGtwlGt KPCi9PXuKwpJdtvbEeuhxJ+KhvKTH4+uOtxyKeSEpmAjrZrPDYmD7KfUv2Qo/IlEIK7s AiELD5tOA57eNxkOfsL+vGLU9BLA3HmVfN5QfYXtYHGk4IS6fREFbnd0ceBkG9CjYGGJ I8iNpT2YqReKVqNR6vcyZIAHoeyPXAH7ZddahgXWc2W9605fb2umfWfwHJhRmJiunoXd 8eGw== X-Gm-Message-State: APjAAAWwCmuEjBWNCXYETsZciX+dodcEGYdVPUkUHBmsqxG9FWBeBIda 3w9XVI0fjRkjxakR08cwkLb6oq+sgKZnWw== X-Received: by 2002:a17:90a:b304:: with SMTP id d4mr3327236pjr.27.1571211277615; Wed, 16 Oct 2019 00:34:37 -0700 (PDT) Received: from localhost ([49.248.175.127]) by smtp.gmail.com with ESMTPSA id v19sm23786315pff.46.2019.10.16.00.34.36 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 16 Oct 2019 00:34:37 -0700 (PDT) From: Amit Kucheria To: linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org, bjorn.andersson@linaro.org, edubezval@gmail.com, agross@kernel.org, masneyb@onstation.org, swboyd@chromium.org, Amit Kucheria , Daniel Lezcano , Mark Rutland , Rob Herring , Zhang Rui Cc: linux-pm@vger.kernel.org Subject: [PATCH 04/15] drivers: thermal: tsens: Add debugfs support Date: Wed, 16 Oct 2019 13:04:03 +0530 Message-Id: <16e39c1bbfc18b5cf6274620cd72cc63205f53a5.1571210269.git.amit.kucheria@linaro.org> X-Mailer: git-send-email 2.17.1 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 Dump some basic version info and sensor details into debugfs. Example from qcs404 below: --(/sys/kernel/debug) $ ls tsens/ 4a9000.thermal-sensor version --(/sys/kernel/debug) $ cat tsens/version 1.4.0 --(/sys/kernel/debug) $ cat tsens/4a9000.thermal-sensor/sensors max: 11 num: 10 id slope offset ------------------------ 0 3200 404000 1 3200 404000 2 3200 404000 3 3200 404000 4 3200 404000 5 3200 404000 6 3200 404000 7 3200 404000 8 3200 404000 9 3200 404000 Signed-off-by: Amit Kucheria Reviewed-by: Stephen Boyd --- drivers/thermal/qcom/tsens-common.c | 83 +++++++++++++++++++++++++++++ drivers/thermal/qcom/tsens.c | 2 + drivers/thermal/qcom/tsens.h | 6 +++ 3 files changed, 91 insertions(+) -- 2.17.1 diff --git a/drivers/thermal/qcom/tsens-common.c b/drivers/thermal/qcom/tsens-common.c index 7437bfe196e5..ea2c46cc6a66 100644 --- a/drivers/thermal/qcom/tsens-common.c +++ b/drivers/thermal/qcom/tsens-common.c @@ -3,6 +3,7 @@ * Copyright (c) 2015, The Linux Foundation. All rights reserved. */ +#include #include #include #include @@ -139,6 +140,77 @@ int get_temp_common(struct tsens_sensor *s, int *temp) return 0; } +#ifdef CONFIG_DEBUG_FS +static int dbg_sensors_show(struct seq_file *s, void *data) +{ + struct platform_device *pdev = s->private; + struct tsens_priv *priv = platform_get_drvdata(pdev); + int i; + + seq_printf(s, "max: %2d\nnum: %2d\n\n", + priv->feat->max_sensors, priv->num_sensors); + + seq_puts(s, " id slope offset\n--------------------------\n"); + for (i = 0; i < priv->num_sensors; i++) { + seq_printf(s, "%8d %8d %8d\n", priv->sensor[i].hw_id, + priv->sensor[i].slope, priv->sensor[i].offset); + } + + return 0; +} + +static int dbg_version_show(struct seq_file *s, void *data) +{ + struct platform_device *pdev = s->private; + struct tsens_priv *priv = platform_get_drvdata(pdev); + u32 maj_ver, min_ver, step_ver; + int ret; + + if (tsens_ver(priv) > VER_0_1) { + ret = regmap_field_read(priv->rf[VER_MAJOR], &maj_ver); + if (ret) + return ret; + ret = regmap_field_read(priv->rf[VER_MINOR], &min_ver); + if (ret) + return ret; + ret = regmap_field_read(priv->rf[VER_STEP], &step_ver); + if (ret) + return ret; + seq_printf(s, "%d.%d.%d\n", maj_ver, min_ver, step_ver); + } else { + seq_puts(s, "0.1.0\n"); + } + + return 0; +} + +DEFINE_SHOW_ATTRIBUTE(dbg_version); +DEFINE_SHOW_ATTRIBUTE(dbg_sensors); + +static void tsens_debug_init(struct platform_device *pdev) +{ + struct tsens_priv *priv = platform_get_drvdata(pdev); + struct dentry *root, *file; + + root = debugfs_lookup("tsens", NULL); + if (!root) + priv->debug_root = debugfs_create_dir("tsens", NULL); + else + priv->debug_root = root; + + file = debugfs_lookup("version", priv->debug_root); + if (!file) + debugfs_create_file("version", 0444, priv->debug_root, + pdev, &dbg_version_fops); + + /* A directory for each instance of the TSENS IP */ + priv->debug = debugfs_create_dir(dev_name(&pdev->dev), priv->debug_root); + debugfs_create_file("sensors", 0444, priv->debug, pdev, &dbg_sensors_fops); +} +#else +static inline void tsens_debug_init(struct platform_device *pdev) {} +#endif + static const struct regmap_config tsens_config = { .name = "tm", .reg_bits = 32, @@ -199,6 +271,15 @@ int __init init_common(struct tsens_priv *priv) goto err_put_device; } + if (tsens_ver(priv) > VER_0_1) { + for (i = VER_MAJOR; i <= VER_STEP; i++) { + priv->rf[i] = devm_regmap_field_alloc(dev, priv->srot_map, + priv->fields[i]); + if (IS_ERR(priv->rf[i])) + return PTR_ERR(priv->rf[i]); + } + } + priv->rf[TSENS_EN] = devm_regmap_field_alloc(dev, priv->srot_map, priv->fields[TSENS_EN]); if (IS_ERR(priv->rf[TSENS_EN])) { @@ -238,6 +319,8 @@ int __init init_common(struct tsens_priv *priv) } } + tsens_debug_init(op); + return 0; err_put_device: diff --git a/drivers/thermal/qcom/tsens.c b/drivers/thermal/qcom/tsens.c index 06c6bbd69a1a..772aa76b50e1 100644 --- a/drivers/thermal/qcom/tsens.c +++ b/drivers/thermal/qcom/tsens.c @@ -3,6 +3,7 @@ * Copyright (c) 2015, The Linux Foundation. All rights reserved. */ +#include #include #include #include @@ -176,6 +177,7 @@ static int tsens_remove(struct platform_device *pdev) { struct tsens_priv *priv = platform_get_drvdata(pdev); + debugfs_remove_recursive(priv->debug_root); if (priv->ops->disable) priv->ops->disable(priv); diff --git a/drivers/thermal/qcom/tsens.h b/drivers/thermal/qcom/tsens.h index 84e5447c5686..00899c17e848 100644 --- a/drivers/thermal/qcom/tsens.h +++ b/drivers/thermal/qcom/tsens.h @@ -293,6 +293,8 @@ struct tsens_context { * @feat: features of the IP * @fields: bitfield locations * @ops: pointer to list of callbacks supported by this device + * @debug_root: pointer to debugfs dentry for all tsens + * @debug: pointer to debugfs dentry for tsens controller * @sensor: list of sensors attached to this device */ struct tsens_priv { @@ -306,6 +308,10 @@ struct tsens_priv { const struct tsens_features *feat; const struct reg_field *fields; const struct tsens_ops *ops; + + struct dentry *debug_root; + struct dentry *debug; + struct tsens_sensor sensor[0]; }; From patchwork Wed Oct 16 07:34:04 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Amit Kucheria X-Patchwork-Id: 176430 Delivered-To: patch@linaro.org Received: by 2002:a92:7e96:0:0:0:0:0 with SMTP id q22csp6992830ill; Wed, 16 Oct 2019 00:34:49 -0700 (PDT) X-Google-Smtp-Source: APXvYqyKNWSKZ35XYhsZ9E9j5/zcMDlbA2Rhar+T6tNoGJ2b8b61mxWWat7k6En/v9N1sDk3pYxT X-Received: by 2002:a50:9f68:: with SMTP id b95mr37179839edf.301.1571211289173; Wed, 16 Oct 2019 00:34:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1571211289; cv=none; d=google.com; s=arc-20160816; b=XdvufevBO8+yyku2UCpkPk8JkA8jitOD6jTG+QPgdk18iNt4G0n26gfNyWgR4LHNUf 3ns98BAaXpPm1RACDy2hglmlG9mP5PjDmQioHhpXbY8LncnOoOkzfdJf2zG93zUaAfZG +MnZ8nxyLoxVytXh1bVC7TF7IoNSVmNtOI8vjYfIZFBWS181qAbK7SCoINFOXA5kXMsF UX+T0/wz9d8kbMnhsi9cl3ae1fbzRWREg7P5Zhv4GCP9qIE0EgEtXrOzPUaV5TlSIPbA l0Y/ep8NW5EQas5Dv71YXvIFc+DDIS/HuP6UAAY0cfcU3WenPM2Ew5nn4rKSqeAwVMbG xTEw== 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=N1sFZqwPmR4rpLnTH9EOl8Ec1vu8lx2vJgOvXRwWkdo=; b=u8/qHwroh0y1Yui8G1FZUDPfsiX92KpD5FU5XCuNTPzULY2TGh3iNpsIXgrqQj0BOL 0Ks/uOgeBuKFhQvMHYdTsuEFORdVZ6weYJ5/5W/bYcaMVGqJ79Jk6DKKiaGaPW80IbUg E7aYBmn7k5uJR66aMfQBzUirNMlK51Sgxt43UgVLE3p6ekbxUVpxCR3MGkDVHwAImORa 6zynz2gBFNhW9pAfl7v7t+sTwT7tTrH2qEiUXjIIEqm8EpYMZykQpB+hAlx8/uC9djSp SXSwoYTr3pBEo3unLykVSSHyBEY02oCfmh8J5Bi4wqpNYccPkZmYR34LzWqlwCqTy0CZ YM1Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=nHQTggvo; 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 l45si16276411edc.185.2019.10.16.00.34.48; Wed, 16 Oct 2019 00:34:49 -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=nHQTggvo; 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 S1733238AbfJPHen (ORCPT + 26 others); Wed, 16 Oct 2019 03:34:43 -0400 Received: from mail-pg1-f193.google.com ([209.85.215.193]:41268 "EHLO mail-pg1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1733052AbfJPHem (ORCPT ); Wed, 16 Oct 2019 03:34:42 -0400 Received: by mail-pg1-f193.google.com with SMTP id t3so13751493pga.8 for ; Wed, 16 Oct 2019 00:34:41 -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=N1sFZqwPmR4rpLnTH9EOl8Ec1vu8lx2vJgOvXRwWkdo=; b=nHQTggvoUfAdmuLIISJfzQD+E5MdYiRMIJMZhsaRyVJooc3Na6gQvHL8n7SYjjZ6wr HacXvujAglqyTWjGUDxGzUEeDyCh6z7o+6VceXISis/Ik5gJ5jn6r1FnZiGxjfI+X603 i/Fgm6YM1XcAl7XVQ0QbisND0p7J4xB0MZTTgkhwH2q4pploc79rciwHb8pTFgspqMac q89VeCtNrikU1tlUyyXDFXK/1AA6wQRfjr51H8oVtfUJ9WLHvB+8+v8pPucUf3iNjohO V5QI5nL/N58L01MA7oWhRVM3rLTH0I23adq8XWtwe6hBqX/7iwPy3xFTtSVUq9t1qL6W shHw== 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=N1sFZqwPmR4rpLnTH9EOl8Ec1vu8lx2vJgOvXRwWkdo=; b=oZlnRNlFQqByOdm42hH2AorFul0aMxbmzUA0OzdrUeYXfuR2NhdWodzIgSrdN+INmw P8B76P2LPe68J2G+6bNSnpSh7DmdzcqWup4assXwS15GtymC9NxLd0PQhwTeRaZW/Bz1 iOclYXFNEGq5vuPig7cLusrE4Vvsc6AzhLM+sNO7Df8rYVBU/PKaO8VSQ6j3cIkQtdT2 EOFO8T0zsYMSW4qYf9KEZ/UwYQh31k7z6bcchGzSgrvOfQYu9OEFewp1XaZPvOg0kTb9 Ev7cIKGAaXVoEE9adP/AfMyu5aHauXF5JTjlX2p5v1ja1SuO0QfrMIAtbj093Cgmod1+ cxaA== X-Gm-Message-State: APjAAAWxRW6EwVfjFaCSDETUiUM/WXna/0hbxggFDLMAjfZXsucpD1Tj 0TArGJtLdSs2ot35M5msG2+7367e6heCYg== X-Received: by 2002:a17:90a:ac06:: with SMTP id o6mr3233009pjq.133.1571211281067; Wed, 16 Oct 2019 00:34:41 -0700 (PDT) Received: from localhost ([49.248.175.127]) by smtp.gmail.com with ESMTPSA id p190sm29052416pfb.160.2019.10.16.00.34.40 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 16 Oct 2019 00:34:40 -0700 (PDT) From: Amit Kucheria To: linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org, bjorn.andersson@linaro.org, edubezval@gmail.com, agross@kernel.org, masneyb@onstation.org, swboyd@chromium.org, Amit Kucheria , Daniel Lezcano , Mark Rutland , Rob Herring , Zhang Rui Cc: devicetree@vger.kernel.org Subject: [PATCH 05/15] arm: dts: msm8974: thermal: Add thermal zones for each sensor Date: Wed, 16 Oct 2019 13:04:04 +0530 Message-Id: <72cc755c16888976edea555f1df60a299daa8a1e.1571210269.git.amit.kucheria@linaro.org> X-Mailer: git-send-email 2.17.1 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 msm8974 has 11 sensors connected to a single TSENS IP. Define a thermal zone for each of those sensors to expose the temperature of each zone. Signed-off-by: Amit Kucheria Tested-by: Brian Masney Reviewed-by: Stephen Boyd --- arch/arm/boot/dts/qcom-msm8974.dtsi | 90 +++++++++++++++++++++++++++++ 1 file changed, 90 insertions(+) -- 2.17.1 diff --git a/arch/arm/boot/dts/qcom-msm8974.dtsi b/arch/arm/boot/dts/qcom-msm8974.dtsi index 369e58f64145..33c534370fd5 100644 --- a/arch/arm/boot/dts/qcom-msm8974.dtsi +++ b/arch/arm/boot/dts/qcom-msm8974.dtsi @@ -217,6 +217,96 @@ }; }; }; + + q6-dsp-thermal { + polling-delay-passive = <250>; + polling-delay = <1000>; + + thermal-sensors = <&tsens 1>; + + trips { + q6_dsp_alert0: trip-point0 { + temperature = <90000>; + hysteresis = <2000>; + type = "hot"; + }; + }; + }; + + modemtx-thermal { + polling-delay-passive = <250>; + polling-delay = <1000>; + + thermal-sensors = <&tsens 2>; + + trips { + modemtx_alert0: trip-point0 { + temperature = <90000>; + hysteresis = <2000>; + type = "hot"; + }; + }; + }; + + video-thermal { + polling-delay-passive = <250>; + polling-delay = <1000>; + + thermal-sensors = <&tsens 3>; + + trips { + video_alert0: trip-point0 { + temperature = <95000>; + hysteresis = <2000>; + type = "hot"; + }; + }; + }; + + wlan-thermal { + polling-delay-passive = <250>; + polling-delay = <1000>; + + thermal-sensors = <&tsens 4>; + + trips { + wlan_alert0: trip-point0 { + temperature = <105000>; + hysteresis = <2000>; + type = "hot"; + }; + }; + }; + + gpu-thermal-top { + polling-delay-passive = <250>; + polling-delay = <1000>; + + thermal-sensors = <&tsens 9>; + + trips { + gpu1_alert0: trip-point0 { + temperature = <90000>; + hysteresis = <2000>; + type = "hot"; + }; + }; + }; + + gpu-thermal-bottom { + polling-delay-passive = <250>; + polling-delay = <1000>; + + thermal-sensors = <&tsens 10>; + + trips { + gpu2_alert0: trip-point0 { + temperature = <90000>; + hysteresis = <2000>; + type = "hot"; + }; + }; + }; }; cpu-pmu { From patchwork Wed Oct 16 07:34:06 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Amit Kucheria X-Patchwork-Id: 176433 Delivered-To: patch@linaro.org Received: by 2002:a92:7e96:0:0:0:0:0 with SMTP id q22csp6993026ill; Wed, 16 Oct 2019 00:34:59 -0700 (PDT) X-Google-Smtp-Source: APXvYqyL8zB1G2yflY6pKgtNYwFRh+YOKv9w8iRcwMCaijdHogqMdJN7ixmrT3R4vSJfgu+rGgZW X-Received: by 2002:aa7:d807:: with SMTP id v7mr36967064edq.220.1571211299833; Wed, 16 Oct 2019 00:34:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1571211299; cv=none; d=google.com; s=arc-20160816; b=OlZaO48xw7l4750zXTZ+0DAYgXvjQLKtGLxlLNKjVWR2dttltwhvVJl7UrnKA4ceLw sZNonm5yVLX/R+NSJRp6aG2nfrGMFZd7gDRSDSjow0o/PQ7wqsXKZTzpHaoTzFenQQxJ KguSmLcocUSZfSBDfvMnQ/0jJVRDuUAczB/RtzxnSeDyQVI+KF5W/1I8lXLXxW9qRtI7 D7qmyYGlrpjv/aS0zZAPmTldBUS3iI0INxjrJwlQiAT9zf+YNNiaoCPcoWE3B9CDMdeX URBUCoGsxeLiubhAgdl/2FyEq3kBv0POfLGSoztmEHsoU8pUP69H7De36XwSyGcbwbfD t7CQ== 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=o1n3hiXAD5eewTTz2SUMbD7SrZji7TFMiwE3m9ZwcRg=; b=VImifI4moRqQvxUNcShqtmY/mYF702VphPeTmYEAHWRopTjpbfbVx3otYh0LHDziyy q8NCD3yr8R8WeGZx8ew7DW4t52fqdfgxysQcjWufxmqs9ziZVz79Q370wZiY/yZlpsZB MgiHmTfuhEos3Xy8qtPuj3B1A2oui/XtF7dkoz+E36+EUNRoQN68cMTMZfxpiiumHLR6 DLaGXNN68YO3qCaUhdPkKYdB0k2rfx7fi6p1NIthODi/a2r9srlumtlBowuoF0vaSNss 6O82YBPlu9xZ74fcubjKbnzDxl2iqNIAD+EOLkH2ekn50UBM8vUnJEoQ8i9xJSlLFgjP SNsA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=FZ1QcHMU; 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 a94si15903525edf.110.2019.10.16.00.34.59; Wed, 16 Oct 2019 00:34:59 -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=FZ1QcHMU; 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 S2389335AbfJPHev (ORCPT + 26 others); Wed, 16 Oct 2019 03:34:51 -0400 Received: from mail-pg1-f196.google.com ([209.85.215.196]:36974 "EHLO mail-pg1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2389204AbfJPHet (ORCPT ); Wed, 16 Oct 2019 03:34:49 -0400 Received: by mail-pg1-f196.google.com with SMTP id p1so13757462pgi.4 for ; Wed, 16 Oct 2019 00:34:49 -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=o1n3hiXAD5eewTTz2SUMbD7SrZji7TFMiwE3m9ZwcRg=; b=FZ1QcHMUsgYQzcEwY6lCVBW3Y7LVGnLAJLnaPCYXUZVTjGTBJ166W53Gwlc9IC0q8a 0cqQG2VYbTU7v7Sw6j/binXdgZG8lhZe6L8L3xJ3B6Xu66ts+ZgqT9vaezwGXJFX9cMn W9VAhXb4oFIyvF5dVxXDz9ijszAKlzpM+yeUZjS0SayGBl2tjW8PHNFPXcZsp9vcTTBK RGvACTEblgF50GJzwZJrP+amvXGMW5wtAEM1CLr5eSMDw+YKZJmYYqx6FSgAGLb5ayls MxJ+u+Nvct+go3fPqkrS+Sdb5q8Ns9jvH/WvfmeA973owSYC4iC8Q6ar87+FfLMHmAiJ pf7Q== 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=o1n3hiXAD5eewTTz2SUMbD7SrZji7TFMiwE3m9ZwcRg=; b=C4LrjQ8thbYn+ff4XzqBGA6Lk4oC+AxxfajEDMzwyB/uuPgrr8grSpmxY1aUCWyKSS pi4iqSs5FOzCqxmtVLpLIqnVxHfe//h72azd7mRyKCcQCDABbYC7r4I0KN8V+8Lkzh6N PgkwXYzHcelxjiky3U6W4MA3nFEtvT2KjqsUX/dOep8yWcC0xXzdkFaEX0mE3Nc0mmO+ d1dbSZh+76ohJS6xdmbznlEGo0OeOraQS6ZKqOsXSgvT2g2QFpnN7l6J1BY3G4nDDg3f 5V2GErad2JSi4b2h4edtHU+KULOzOYaBo4QePEPxWseRpWtVY/1vwXwZzcCMgk2gsu3Z 9UZw== X-Gm-Message-State: APjAAAW5wyerTt0yA8aIkPtl/t7PGmaYjfBG4ABwmXZEHWshUhNVxOyG CiC4PWAZ2r7gNY6cRLQbqlAP4duveDJH1g== X-Received: by 2002:a17:90a:d141:: with SMTP id t1mr3186556pjw.103.1571211288614; Wed, 16 Oct 2019 00:34:48 -0700 (PDT) Received: from localhost ([49.248.175.127]) by smtp.gmail.com with ESMTPSA id t3sm1787408pje.7.2019.10.16.00.34.47 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 16 Oct 2019 00:34:48 -0700 (PDT) From: Amit Kucheria To: linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org, bjorn.andersson@linaro.org, edubezval@gmail.com, agross@kernel.org, masneyb@onstation.org, swboyd@chromium.org, Amit Kucheria , Daniel Lezcano , Mark Rutland , Rob Herring , Zhang Rui Cc: linux-pm@vger.kernel.org, devicetree@vger.kernel.org Subject: [PATCH 07/15] dt-bindings: thermal: tsens: Convert over to a yaml schema Date: Wed, 16 Oct 2019 13:04:06 +0530 Message-Id: X-Mailer: git-send-email 2.17.1 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 Older IP only supports the 'uplow' interrupt, but newer IP supports 'uplow' and 'critical' interrupts. Document interrupt support in the tsens driver by converting over to a YAML schema. Suggested-by: Stephen Boyd Signed-off-by: Amit Kucheria Reviewed-by: Rob Herring --- .../bindings/thermal/qcom-tsens.txt | 55 ------ .../bindings/thermal/qcom-tsens.yaml | 168 ++++++++++++++++++ MAINTAINERS | 1 + 3 files changed, 169 insertions(+), 55 deletions(-) delete mode 100644 Documentation/devicetree/bindings/thermal/qcom-tsens.txt create mode 100644 Documentation/devicetree/bindings/thermal/qcom-tsens.yaml -- 2.17.1 diff --git a/Documentation/devicetree/bindings/thermal/qcom-tsens.txt b/Documentation/devicetree/bindings/thermal/qcom-tsens.txt deleted file mode 100644 index 673cc1831ee9..000000000000 --- a/Documentation/devicetree/bindings/thermal/qcom-tsens.txt +++ /dev/null @@ -1,55 +0,0 @@ -* QCOM SoC Temperature Sensor (TSENS) - -Required properties: -- compatible: - Must be one of the following: - - "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 - register spaces separately, with order being TM before SROT. - See Example 2, below. - -- #thermal-sensor-cells : Should be 1. See ./thermal.txt for a description. -- #qcom,sensors: Number of sensors in tsens block -- Refer to Documentation/devicetree/bindings/nvmem/nvmem.txt to know how to specify -nvmem cells - -Example 1 (legacy support before a fallback tsens-v2 property was introduced): -tsens: thermal-sensor@900000 { - compatible = "qcom,msm8916-tsens"; - reg = <0x4a8000 0x2000>; - nvmem-cells = <&tsens_caldata>, <&tsens_calsel>; - nvmem-cell-names = "caldata", "calsel"; - #thermal-sensor-cells = <1>; - }; - -Example 2 (for any platform containing v2 of the TSENS IP): -tsens0: thermal-sensor@c263000 { - compatible = "qcom,sdm845-tsens", "qcom,tsens-v2"; - reg = <0xc263000 0x1ff>, /* TM */ - <0xc222000 0x1ff>; /* SROT */ - #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>; - }; diff --git a/Documentation/devicetree/bindings/thermal/qcom-tsens.yaml b/Documentation/devicetree/bindings/thermal/qcom-tsens.yaml new file mode 100644 index 000000000000..23afc7bf5a44 --- /dev/null +++ b/Documentation/devicetree/bindings/thermal/qcom-tsens.yaml @@ -0,0 +1,168 @@ +# SPDX-License-Identifier: (GPL-2.0 OR MIT) +# Copyright 2019 Linaro Ltd. +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/thermal/qcom-tsens.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: QCOM SoC Temperature Sensor (TSENS) + +maintainers: + - Amit Kucheria + +description: | + QCOM SoCs have TSENS IP to allow temperature measurement. There are currently + three distinct major versions of the IP that is supported by a single driver. + The IP versions are named v0.1, v1 and v2 in the driver, where v0.1 captures + everything before v1 when there was no versioning information. + +properties: + compatible: + oneOf: + - description: v0.1 of TSENS + items: + - enum: + - qcom,msm8916-tsens + - qcom,msm8974-tsens + - const: qcom,tsens-v0_1 + + - description: v1 of TSENS + items: + - enum: + - qcom,qcs404-tsens + - const: qcom,tsens-v1 + + - description: v2 of TSENS + items: + - enum: + - qcom,msm8996-tsens + - qcom,msm8998-tsens + - qcom,sdm845-tsens + - const: qcom,tsens-v2 + + reg: + maxItems: 2 + items: + - description: TM registers + - description: SROT registers + + nvmem-cells: + minItems: 1 + maxItems: 2 + description: + Reference to an nvmem node for the calibration data + + nvmem-cells-names: + minItems: 1 + maxItems: 2 + items: + - enum: + - caldata + - calsel + + "#qcom,sensors": + allOf: + - $ref: /schemas/types.yaml#/definitions/uint32 + - minimum: 1 + - maximum: 16 + description: + Number of sensors enabled on this platform + + "#thermal-sensor-cells": + const: 1 + description: + Number of cells required to uniquely identify the thermal sensors. Since + we have multiple sensors this is set to 1 + +allOf: + - if: + properties: + compatible: + contains: + enum: + - qcom,msm8916-tsens + - qcom,msm8974-tsens + - qcom,qcs404-tsens + - qcom,tsens-v0_1 + - qcom,tsens-v1 + then: + properties: + interrupts: + items: + - description: Combined interrupt if upper or lower threshold crossed + interrupt-names: + items: + - const: uplow + + else: + properties: + interrupts: + items: + - description: Combined interrupt if upper or lower threshold crossed + - description: Interrupt if critical threshold crossed + interrupt-names: + items: + - const: uplow + - const: critical + +required: + - compatible + - reg + - "#qcom,sensors" + - interrupts + - interrupt-names + - "#thermal-sensor-cells" + +examples: + - | + #include + // Example 1 (legacy: for pre v1 IP): + tsens1: thermal-sensor@900000 { + compatible = "qcom,msm8916-tsens", "qcom,tsens-v0_1"; + reg = <0x4a9000 0x1000>, /* TM */ + <0x4a8000 0x1000>; /* SROT */ + + nvmem-cells = <&tsens_caldata>, <&tsens_calsel>; + nvmem-cell-names = "caldata", "calsel"; + + interrupts = ; + interrupt-names = "uplow"; + + #qcom,sensors = <5>; + #thermal-sensor-cells = <1>; + }; + + - | + #include + // Example 2 (for any platform containing v1 of the TSENS IP): + tsens2: 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"; + + interrupts = ; + interrupt-names = "uplow"; + + #qcom,sensors = <10>; + #thermal-sensor-cells = <1>; + }; + + - | + #include + // Example 3 (for any platform containing v2 of the TSENS IP): + tsens3: thermal-sensor@c263000 { + compatible = "qcom,sdm845-tsens", "qcom,tsens-v2"; + reg = <0xc263000 0x1ff>, + <0xc222000 0x1ff>; + + interrupts = , + ; + interrupt-names = "uplow", "critical"; + + #qcom,sensors = <13>; + #thermal-sensor-cells = <1>; + }; +... diff --git a/MAINTAINERS b/MAINTAINERS index a69e6db80c79..c4df814b87b0 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -13513,6 +13513,7 @@ L: linux-pm@vger.kernel.org L: linux-arm-msm@vger.kernel.org S: Maintained F: drivers/thermal/qcom/ +F: Documentation/devicetree/bindings/thermal/qcom-tsens.yaml QUALCOMM VENUS VIDEO ACCELERATOR DRIVER M: Stanimir Varbanov From patchwork Wed Oct 16 07:34:08 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Amit Kucheria X-Patchwork-Id: 176434 Delivered-To: patch@linaro.org Received: by 2002:a92:7e96:0:0:0:0:0 with SMTP id q22csp6993109ill; Wed, 16 Oct 2019 00:35:05 -0700 (PDT) X-Google-Smtp-Source: APXvYqyVanT71q6Kn/FWrut6/ZMxkKbdSHmjXZ/zaNgRk7+bV0CbXdkmHmbW3PmffdEQQkFRDlSQ X-Received: by 2002:aa7:c513:: with SMTP id o19mr36993721edq.75.1571211304991; Wed, 16 Oct 2019 00:35:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1571211304; cv=none; d=google.com; s=arc-20160816; b=CX3PMAmFT1x8Fv0NyNAmqZDRhySf0EuFikFMpKQoZ6VU/pK3ScW+xAtabiqhPKDE10 q5Ed5hMXCY6Oe8G8PhIulVzyCLgar3hAbsPIHHxnOPPCkRW3ohgaf5+vIX2YN7iOoreG eJiz/qr+vCTdOeY8iYXmsV63+nAVUMqVZVzrheaDgwzpLgGaUmd2FMKsm8rYX/vnM1Se 4/jirz7jNbbvu0io4AweAxDTVZgzNv7YcuMeACjeIqcWUTvWPMawJDY42poo0Q1cld5U F1UBo0FHtm+iDOFvLTatfAJGAjEXS++aV8mx7mes5/QxNV3YGF9s3cKJsx6qIilzuqgN PVPA== 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=4K812X2lC+GYM/4odmaRwgr1rxs2vpAuXCpq25weRAs=; b=qk8yAYA80AFhuWNsfllkg+wT/2u36zXwAIyOz51r/Cx9rHkG4PWplLvfEj/XsuuOjf 59I5QiB1HTKOqH6KqIOfRKNdOgfJg3PXkNQ93fUwnkKOpJ9/fi8LM+lsPE5xqAqG6tWK AorJYfaGwOW1KM86bQLskmMSQuzW/krTkRUqd4JVO7nZJXXYZrZ7Jvxo/A0W/a39eBrt UMljpcc9/oK2zfJour6N8mSByO8tz1ATPw4xvDcLWjto3zmcHOnxjXx072buAYa6AKKi M/ty01J8iU9Oe+A7lxIZ4Rc3VYzn/+dgrrDvfFbTaSlKyg3SWWM0DUYfTMfu0HK5fN39 SSew== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Xx6xD6kV; 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 a36si17044991edf.123.2019.10.16.00.35.04; Wed, 16 Oct 2019 00:35:04 -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=Xx6xD6kV; 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 S2389898AbfJPHfB (ORCPT + 26 others); Wed, 16 Oct 2019 03:35:01 -0400 Received: from mail-pg1-f196.google.com ([209.85.215.196]:36310 "EHLO mail-pg1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2389821AbfJPHe6 (ORCPT ); Wed, 16 Oct 2019 03:34:58 -0400 Received: by mail-pg1-f196.google.com with SMTP id 23so13770705pgk.3 for ; Wed, 16 Oct 2019 00:34:56 -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=4K812X2lC+GYM/4odmaRwgr1rxs2vpAuXCpq25weRAs=; b=Xx6xD6kVfeR3/JFqZsiOJQRbB4MJyUPL5aomJ+HRatBXvwNIGYCZjEjWCS80qXfNha hNqIwJsDPgQdeKOb32Dg77GT22ekUALjj76wpjLT9ABAIEL+/gUSPy+GRMmPvjkpfTA3 n5D9wn7VRoQxvbYu6jbl2nIIch1FgwueJwQuxGi29QBC0pam23Lhv0dJV8hG2bfZWCDp iBRqu6DCgCVSaCnonaxu/YYl542PtlaI3LO1O7TkjAmbsY6JEPgi9eECLZy6DjB4gW8U DDexwG4JUORqW+tF2aTQr7okJCJFMmVirrMncKV5ty2XEIOqeIe1K7c0yymYkDnLTHME XxbA== 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=4K812X2lC+GYM/4odmaRwgr1rxs2vpAuXCpq25weRAs=; b=tu+qaIWTzPmV5fNW1/PaNonHx7MGlwGwlvPVvGwscdsDGx3ZjjqcFxeSXYkG24W2nK RYjCm5eZnu3eWdYYlPs7h+McjdW9x1HoFCZ5O0j1Ih9NGBZuxeAD8NwWKQAotAVP2gRK KjE6qYdksU6sX7FCcTxgPqBbpFTMTbtZHU8MxnydSWDL6v8InSf2v0XRbQbF2R1KSICf WG1ClQmES2bxqYP35GSOk/zPko55DahzY5TXWFngBJl3O/wArwdCB1ZFbbR90oP37g3J zSIQO4KVr8ADxLwxpYRFnNw6+naTgyS9WxAj9exN6O5DAcRJ2Ag9o46ijqZjPk59p10r 2JIA== X-Gm-Message-State: APjAAAV0B7oL7s2OTdcgFAI8i8ZahbfuEFzYu9LCfsdu8QORfQJHrLEZ iuA3O6n75W7HbVfHTVYs6zcX6MTIhlcNJQ== X-Received: by 2002:a63:b907:: with SMTP id z7mr5209236pge.142.1571211295665; Wed, 16 Oct 2019 00:34:55 -0700 (PDT) Received: from localhost ([49.248.175.127]) by smtp.gmail.com with ESMTPSA id h70sm22045544pgc.48.2019.10.16.00.34.54 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 16 Oct 2019 00:34:55 -0700 (PDT) From: Amit Kucheria To: linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org, bjorn.andersson@linaro.org, edubezval@gmail.com, agross@kernel.org, masneyb@onstation.org, swboyd@chromium.org, Amit Kucheria , Daniel Lezcano , Mark Rutland , Rob Herring , Zhang Rui Cc: devicetree@vger.kernel.org Subject: [PATCH 09/15] arm64: dts: msm8996: thermal: Add interrupt support Date: Wed, 16 Oct 2019 13:04:08 +0530 Message-Id: X-Mailer: git-send-email 2.17.1 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 Register upper-lower interrupts for each of the two tsens controllers. Signed-off-by: Amit Kucheria --- arch/arm64/boot/dts/qcom/msm8996.dtsi | 4 ++++ 1 file changed, 4 insertions(+) -- 2.17.1 diff --git a/arch/arm64/boot/dts/qcom/msm8996.dtsi b/arch/arm64/boot/dts/qcom/msm8996.dtsi index 87f4d9c1b0d4..4ca2e7b44559 100644 --- a/arch/arm64/boot/dts/qcom/msm8996.dtsi +++ b/arch/arm64/boot/dts/qcom/msm8996.dtsi @@ -591,6 +591,8 @@ reg = <0x4a9000 0x1000>, /* TM */ <0x4a8000 0x1000>; /* SROT */ #qcom,sensors = <13>; + interrupts = ; + interrupt-names = "uplow"; #thermal-sensor-cells = <1>; }; @@ -599,6 +601,8 @@ reg = <0x4ad000 0x1000>, /* TM */ <0x4ac000 0x1000>; /* SROT */ #qcom,sensors = <8>; + interrupts = ; + interrupt-names = "uplow"; #thermal-sensor-cells = <1>; }; From patchwork Wed Oct 16 07:34:12 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Amit Kucheria X-Patchwork-Id: 176438 Delivered-To: patch@linaro.org Received: by 2002:a92:7e96:0:0:0:0:0 with SMTP id q22csp6993314ill; Wed, 16 Oct 2019 00:35:14 -0700 (PDT) X-Google-Smtp-Source: APXvYqxcWHjNC2Krs4l889X2G1UDmZdJpM57q3otG0NMl2hflqgAsUFAPBVUvID5xoph/EoH9H63 X-Received: by 2002:aa7:cd06:: with SMTP id b6mr38958238edw.58.1571211314513; Wed, 16 Oct 2019 00:35:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1571211314; cv=none; d=google.com; s=arc-20160816; b=oAy4inyQhY5Os8WOvLkAbtA56dSAVBPLGfo7ZQJCVqa9l0ILFOXXtdAzIT/t3K9H+4 WtSHrJMsaYvOHL75iNGB5tfUBHTGsbMYCKoKQJfXIFZKnlXU94y3ZdtQ/BuKShEDnhw5 K68TzejlpOdIYqEyi4KhkwRmzTfcX3j+Dn8l6+ceKUqDHPzO2ZwMOD6m8WQtNW5FNTq9 n6yoD/DeDPDJgA4kVj77EHZ6H/IookmrTLhBfypqtxcu+ASAiOFBtr5rRHLJNR7x2gVC hCDSeToUfXrDVCxHqmR5upAWKEH4oh0Rnp96AOugILXMP2m/7vedAD2yQ6wfLVn/UD4z 7CLQ== 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=03jpeb+1aJx4bxpcdPiavfJJhVJ5WBvL1EOxBoz3J+I=; b=quelzIYi8tTxK84s5n2Nni3Rn5nBquNQOYT1yGBphVBX1tAW48Yt3uQoenIXC4DfZd z1BFxVIIVfYrXyugIGbNdhbNTnNqFT5x48VSbzRb1Vp76bxnZAfeRuahsQImOPa/5Kxb +hSD5QP4LSDUv0PdKl60o/9fNxiZbsPCFAScHD/7Z3G77Ay4dMxf0Cm9bu8LIYqD6KTi hFcCbwsAvbgBelKcenZtQSGstKx9Cf6wUPj8szpasUjHVC4cpnQAXp9OeZE9Sbt0fWYP Wh+xnBQYM0DDO8mEnjcfvMSir5MOME9ACcJMDg9a4WW1vsfZkCu/UbeNrWUPojqb94Nq bOzg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="X4D5Ac/v"; 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 l12si18986313edk.444.2019.10.16.00.35.14; Wed, 16 Oct 2019 00:35:14 -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="X4D5Ac/v"; 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 S2390755AbfJPHfN (ORCPT + 26 others); Wed, 16 Oct 2019 03:35:13 -0400 Received: from mail-pf1-f194.google.com ([209.85.210.194]:42437 "EHLO mail-pf1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2390610AbfJPHfL (ORCPT ); Wed, 16 Oct 2019 03:35:11 -0400 Received: by mail-pf1-f194.google.com with SMTP id q12so14153859pff.9 for ; Wed, 16 Oct 2019 00:35:10 -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=03jpeb+1aJx4bxpcdPiavfJJhVJ5WBvL1EOxBoz3J+I=; b=X4D5Ac/vX8qbhhnG/SRIM90B0+FmV6AycTSj/JtrullgPcisRI70iJjTkjiIMfyi/H QhssR6y42idqaSNfRGO5AVREd9915qBuIXFx5EV+4gIzMHAQr/p1a8REtGA9cfSZKsmI PWp5a2RaRyTOA8Ki2AoHQ3/WAxaO3Rg2RGtb1Z1GvMXas458/hA1SSPuRzfojyFyWFL7 td8pqUQrvLIhjkogvgzcfK4BGdZzYFhJsEFJxSn26/snm4bs1h1urgmrwhLPPNyIxmWz ONpJaLJ3eApPbWqGwuOBFv5BOLamb9huJXIkx7cabTmnkVM7sFciLLaBHM7zV6jpwMvN g+ww== 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=03jpeb+1aJx4bxpcdPiavfJJhVJ5WBvL1EOxBoz3J+I=; b=eme3pwQjqelPDVPTixPo4G4iHHiGbj1af9TPYSXuPRKX8Ly6yj24BbZ6zjYvk3U/Bs WdDoPzhj9zioH9HgmVI88XeT7HIo/wI4u+VzLwZnb3/iQgc3TI2reAok9Ibd4X3aWmmX 22SPLa8x0W8WDMZVDRvExz5qseHPGzadDdwyXjiDd1SlWmQJrtGgMzf/lnibrr8IBQs3 4GrH0Y+MUb0ILVQIxnQP0+LFpyQhoZMWVncRhMQeOfz0Ujo+FtGLfwppps2LX1WnT0gH 9t6fxskgDd4M5EiNoi/TtpPEUEvlkJpgz2djHthLJr56HkFVlqYS9aNYyCw1OkFWrOpE mEag== X-Gm-Message-State: APjAAAWWqFzNQdPSo4BmgvHpsho/t+ASsWXHA2K2xmVQWf/KOtaOPl0Y OAbdCUK81QALsE1Q2R6n8fmjUYOhfa3cYQ== X-Received: by 2002:a63:c748:: with SMTP id v8mr43605412pgg.348.1571211310066; Wed, 16 Oct 2019 00:35:10 -0700 (PDT) Received: from localhost ([49.248.175.127]) by smtp.gmail.com with ESMTPSA id z4sm27413149pfn.45.2019.10.16.00.35.09 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 16 Oct 2019 00:35:09 -0700 (PDT) From: Amit Kucheria To: linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org, bjorn.andersson@linaro.org, edubezval@gmail.com, agross@kernel.org, masneyb@onstation.org, swboyd@chromium.org, Amit Kucheria , Daniel Lezcano , Mark Rutland , Rob Herring , Zhang Rui Cc: devicetree@vger.kernel.org Subject: [PATCH 13/15] arm64: dts: msm8916: thermal: Add interrupt support Date: Wed, 16 Oct 2019 13:04:12 +0530 Message-Id: <88eff964b708c8aff57b24370d2e14389ace09e9.1571210269.git.amit.kucheria@linaro.org> X-Mailer: git-send-email 2.17.1 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 Register upper-lower interrupt for the tsens controller. Signed-off-by: Amit Kucheria --- arch/arm64/boot/dts/qcom/msm8916.dtsi | 2 ++ 1 file changed, 2 insertions(+) -- 2.17.1 diff --git a/arch/arm64/boot/dts/qcom/msm8916.dtsi b/arch/arm64/boot/dts/qcom/msm8916.dtsi index 8686e101905c..807f86a4535e 100644 --- a/arch/arm64/boot/dts/qcom/msm8916.dtsi +++ b/arch/arm64/boot/dts/qcom/msm8916.dtsi @@ -816,6 +816,8 @@ nvmem-cells = <&tsens_caldata>, <&tsens_calsel>; nvmem-cell-names = "calib", "calib_sel"; #qcom,sensors = <5>; + interrupts = ; + interrupt-names = "uplow"; #thermal-sensor-cells = <1>; };