Received: by 2002:a25:c205:0:0:0:0:0 with SMTP id s5csp5665625ybf; Thu, 5 Mar 2020 04:57:33 -0800 (PST) X-Google-Smtp-Source: ADFU+vu/4EGxeF/NJKMuvhPXJWPqN61/GLgAukqEOVCZaW1vQFJCE/6V1fiJstWGAXxSrEyvn6Rx X-Received: by 2002:a9d:372:: with SMTP id 105mr6429066otv.15.1583413052937; Thu, 05 Mar 2020 04:57:32 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1583413052; cv=none; d=google.com; s=arc-20160816; b=syUxkdVj1IbiNyx2g+NaiVdE0lVYWbSSXSBFRKxsmj4+fhzTKdstA94Bq/kF1X3F7n uRFDDKXFJjH7P+1aZlB56iq+3kOdehC8V+wDJh2tf5Hwm+FQiIdnGJtlnBrDRIHHzZ8x bT58R/+aGFrRE/hpP6Nb+8Uxh3xRFhIFDEYMrMZBCCglb7guzSO+KO/9EKniYhTTD8dG T70l4EpkFY4ckAxmhTROdMA4ZlfbSftCf5l8IJkWLEehEEHiYdutNKi2n2ImVeXAtKi8 z1lFEahQXrVCFPX10s13pl8Q9JOdxdxJ+kqIZOcCrRG3UJqdYbvE0UMd15gUSs1J6zQb yXhg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=dP34NIY3vUcrPIJjDeu/Blhnqm3Xgj1V/x7fdPviNVM=; b=LrtwyRzyQs2eH23Dhg2QMHY74D9RBz0Rgv07v2HfkacEJBXo6BEWPIRM3Rce8ysAKn IMtH4/tbixp3yg8+vclJEVe99OgRCy4yIwVOalWbRxvF+nUJyMzTvHk4ZKZPf5PVOrhA qHaucDIWE49ZlV4JOlKuY+uDOAVwsQkqVSHkPm9ytARiT8ndiKM5TFn51EJ1G0R+UO07 VUtzqDv11AOOxTxhLJ9Zxk1D+o0GvnktJbWCwaR6U8CwLTHILbCzpHkb/Ao+2b6Q1tfF m+orSr1XEwPDi4QCTQjutv2in5AQ3/yWsJaBKY6GxQehZ8lCIQnGWaT/P23deGc2i3Qu k22w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="x/GCpm+r"; 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 z20si3038073oib.26.2020.03.05.04.57.21; Thu, 05 Mar 2020 04:57:32 -0800 (PST) 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="x/GCpm+r"; 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 S1726382AbgCEM44 (ORCPT + 99 others); Thu, 5 Mar 2020 07:56:56 -0500 Received: from mail-pg1-f195.google.com ([209.85.215.195]:34602 "EHLO mail-pg1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726162AbgCEM4y (ORCPT ); Thu, 5 Mar 2020 07:56:54 -0500 Received: by mail-pg1-f195.google.com with SMTP id t3so2747044pgn.1 for ; Thu, 05 Mar 2020 04:56:53 -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 :mime-version:content-transfer-encoding; bh=dP34NIY3vUcrPIJjDeu/Blhnqm3Xgj1V/x7fdPviNVM=; b=x/GCpm+r1h1NoS7Eud+OL0RUercw7svJlacWGmfEqgaDRzhtpKleikRLx7oJb0+4NX 63XT1bn1EE1MPiLj1eAkPqpPSWjsKw1VjNep3qZToeZvkig3l5dcbPrc6LPyMyVIaswj OuhiETItkz1V2Jz50M/7N5ROtoerhySQ8tuU0MygcECub83bxBWOgSE58OXGA1DlLgec p0v3tRQUnoQ9gsZ/VjNwr4JuRdD8Yo8w5fmIM/y+QlcZw4O7He4iIHXu1tY6bWoBmIBc eBKlThF/7rGYpksUFIdxHwd/Cq8G5Yq/qzZkCjp6GKFgrY7VJ2nf6FxMA4mfZbOUuF5z FJvg== 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:mime-version:content-transfer-encoding; bh=dP34NIY3vUcrPIJjDeu/Blhnqm3Xgj1V/x7fdPviNVM=; b=rB5+z24YL2XpXZq9otI15b4kIzPeOPH8zPFGQyNaAR+iJ+zBq2Q3v3BkaZ6CC9XJiB e0vYkNGZJjk88w+Cm+IgaC0UMUxXEdv+q4IxnO7PrRKcnKvKaimHaAbcaUYNEfx0ry5j THKdPqTj5NUzryjHol3oGlHFdcsPooBMYhzUZ+BKx2L73DBGuv8FLleG92ycNUciDW9D k/XPgfEvb2Zq4iCZmX+xCoqGosUz72Y2yx67pQVoA6JDFh+3ITjqy6Z/uvqkStvSsh4o uGlXvFQIHqyWB1gbJoLcEMCJFeU4fNkb69VHzsonb9EzgX+WBryjFy9nhkGgnI1+ALE3 X0Jw== X-Gm-Message-State: ANhLgQ0tKpficbyPBrEi2vzVpgeRzWc4yFDi9BF6R3+b18MI5AY5Dz6h gjoUc4V1V0SwJx1NgsY0K8Gq37Vird8= X-Received: by 2002:a62:7890:: with SMTP id t138mr8314473pfc.8.1583413012677; Thu, 05 Mar 2020 04:56:52 -0800 (PST) Received: from localhost ([103.195.202.216]) by smtp.gmail.com with ESMTPSA id j12sm16697389pga.78.2020.03.05.04.56.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 05 Mar 2020 04:56:51 -0800 (PST) From: Amit Kucheria To: linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org, swboyd@chromium.org, mka@chromium.org, daniel.lezcano@linaro.org, Amit Kucheria , Zhang Rui Cc: linux-pm@vger.kernel.org, devicetree@vger.kernel.org Subject: [PATCH v2 1/3] dt-bindings: thermal: Add yaml bindings for thermal sensors Date: Thu, 5 Mar 2020 18:26:41 +0530 Message-Id: <93466e6c031c0084de09bd6b448556a6c5080880.1583412540.git.amit.kucheria@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org As part of moving the thermal bindings to YAML, split it up into 3 bindings: thermal sensors, cooling devices and thermal zones. The property #thermal-sensor-cells is required in each device that acts as a thermal sensor. It is used to uniquely identify the instance of the thermal sensor inside the system. Signed-off-by: Amit Kucheria --- .../bindings/thermal/thermal-sensor.yaml | 72 +++++++++++++++++++ 1 file changed, 72 insertions(+) create mode 100644 Documentation/devicetree/bindings/thermal/thermal-sensor.yaml diff --git a/Documentation/devicetree/bindings/thermal/thermal-sensor.yaml b/Documentation/devicetree/bindings/thermal/thermal-sensor.yaml new file mode 100644 index 0000000000000..920ee7667591d --- /dev/null +++ b/Documentation/devicetree/bindings/thermal/thermal-sensor.yaml @@ -0,0 +1,72 @@ +# SPDX-License-Identifier: (GPL-2.0) +# Copyright 2020 Linaro Ltd. +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/thermal/thermal-sensor.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Thermal sensor binding + +maintainers: + - Amit Kucheria + +description: | + Thermal management is achieved in devicetree by describing the sensor hardware + and the software abstraction of thermal zones required to take appropriate + action to mitigate thermal overloads. + + The following node types are used to completely describe a thermal management + system in devicetree: + - thermal-sensor: device that measures temperature, has SoC-specific bindings + - cooling-device: device used to dissipate heat either passively or artively + - thermal-zones: a container of the following node types used to describe all + thermal data for the platform + + This binding describes the thermal-sensor. + + Thermal sensor devices provide temperature sensing capabilities on thermal + zones. Typical devices are I2C ADC converters and bandgaps. Thermal sensor + devices may control one or more internal sensors. + +properties: + "#thermal-sensor-cells": + description: + Used to uniquely identify a thermal sensor instance within an IC. Will be + 0 on sensor nodes with only a single sensor and at least 1 on nodes + containing several internal sensors. + enum: [0, 1] + +examples: + - | + #include + + // Example 1: SDM845 TSENS + soc: soc@0 { + #address-cells = <2>; + #size-cells = <2>; + + /* ... */ + + tsens0: thermal-sensor@c263000 { + compatible = "qcom,sdm845-tsens", "qcom,tsens-v2"; + reg = <0 0x0c263000 0 0x1ff>, /* TM */ + <0 0x0c222000 0 0x1ff>; /* SROT */ + #qcom,sensors = <13>; + interrupts = , + ; + interrupt-names = "uplow", "critical"; + #thermal-sensor-cells = <1>; + }; + + tsens1: thermal-sensor@c265000 { + compatible = "qcom,sdm845-tsens", "qcom,tsens-v2"; + reg = <0 0x0c265000 0 0x1ff>, /* TM */ + <0 0x0c223000 0 0x1ff>; /* SROT */ + #qcom,sensors = <8>; + interrupts = , + ; + interrupt-names = "uplow", "critical"; + #thermal-sensor-cells = <1>; + }; + }; +... -- 2.20.1