Received: by 2002:a05:6358:489b:b0:bb:da1:e618 with SMTP id x27csp4970037rwn; Mon, 12 Sep 2022 02:09:09 -0700 (PDT) X-Google-Smtp-Source: AA6agR6GWT5PaLrnn3Jwp4aa/td/nukSbXn9oLtNZ5UyhSbzPCFvdKXJBr5b6E1d6GF4QkS4n2l7 X-Received: by 2002:a17:907:3e08:b0:774:3e36:f019 with SMTP id hp8-20020a1709073e0800b007743e36f019mr13926615ejc.226.1662973749209; Mon, 12 Sep 2022 02:09:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1662973749; cv=none; d=google.com; s=arc-20160816; b=SxXDsnW2HJZ/kKdh/YEQYxvYOzuSUO0OM44SaYU0br4MVfKiDRaBEHlWI7lx/wFvtb 9LN/m3VM4PeM5E3ccyMx/vSyoYAjdK2NJISATwM4uJ9PmMoU44vlQZ5W78Tls0CMNG4v 2GfoTADENRKI/Px24P64MjhZ2UFvIL2EcrnkMWlqMD9trUGSPSwRWn8ru0e0qKIQqk9i 0breO99y/z2vbsns/schheXB4/VQUfB0onmWG5FX2tpVxEZmPxoY1w7uqXn3rWuVnn5r IiQcEzR7J1ZTtfAbHzdzW5GHWFRxKS1Wvkg0GSuxNDkFlCh1mGlmridn+7umtQ2QsuPN pZqg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=cW0iJRf8+xA5COcXhAJlFmlOVxkiZHTZTL93C3LInnc=; b=vn4eR6Ip7oPI1tfVwWYFm0pyju6B9TDPlVRUPVCt0XaNEDrryr6Dq48QA4K5cspujm y8GgppBbF2qOPfwq082+bvNrW9i9xaD4gjag1WbZ7Z/55GOB7/pJp8mPnMjNMd8wS/wm WtXGtJ3KiE2lgDGLuBsn1Pip3PEUGnZVhqGiF6SGibZRe0yX3FUc0O1+ShZiIzEwuJL3 TViabsRYZ1lmi0gc4cbq+z2n2dsEs0A9Pr7ykPyzzSRfTKjoHnYHbj+QbW1GiCeFaO+V mgF5axipSuNk64+bQjcieO8LTIjvSvLLHE/sIIdYTmA4tce2QapdqnpL074MGZpAufng rj+Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=srYaZbbQ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 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 out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id ds18-20020a170907725200b0073d61fab74bsi7729424ejc.249.2022.09.12.02.08.43; Mon, 12 Sep 2022 02:09:09 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=srYaZbbQ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 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 S230370AbiILIvi (ORCPT + 99 others); Mon, 12 Sep 2022 04:51:38 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55374 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230239AbiILIv0 (ORCPT ); Mon, 12 Sep 2022 04:51:26 -0400 Received: from mail-pf1-x42d.google.com (mail-pf1-x42d.google.com [IPv6:2607:f8b0:4864:20::42d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 19A892B192 for ; Mon, 12 Sep 2022 01:51:15 -0700 (PDT) Received: by mail-pf1-x42d.google.com with SMTP id e68so7966336pfe.1 for ; Mon, 12 Sep 2022 01:51:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date; bh=cW0iJRf8+xA5COcXhAJlFmlOVxkiZHTZTL93C3LInnc=; b=srYaZbbQ+5ULu/L0xi/5apWf3Fm7EWWe9T3NJjdWY7T4y1QltC/uAf2AxZK0toIecP EpzyZMldCUZm6CXBfx65FpzzXhsE2BuwX4YvynXPDupeTV2hw1Q0i1PnTBvqcL/7QrGR YQ9fBYNymtPPRGdhKmboNt4/7HjIjqqRBSQt5UIu5sriJAAheKJlED0LmHGiKWFZnlQd INpQBVonBqXENyVM5UAf0H/ftRi9Ujh8vIZKATl/3mdmxncb4qUOzRhITLSE1k+1UtRE iO4HpkUFtobSw8mb+i8HWNzgoLqkRfPmBKdYpxzKzGzz/SmuClIKp9yU+iMNi8C7kr/f Xe2A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date; bh=cW0iJRf8+xA5COcXhAJlFmlOVxkiZHTZTL93C3LInnc=; b=7RoJ6PAzNOHd6v7VhmmbUHtTL96ADfq3nYT7ev2/Tzwq7IcUoGMvrOf3DoQ8165lS5 khf4Ts7jgo9+hSI6VLY44QmWTLkrTN4zP8px0tr9rgXwrhia7YX9NdrDlIMzUqrHkFmI 0HflSqtID2hXd1NMzH1iyP9Fng4M08ILm4hsj7L+Lh88kL9HEJFHZMWdW2FnjJLv6n3w a5kwQsUg5xn003TbQhTo9rHtHBrBmU4BLAfW6mMXijw4hslcMdaUGmktzt5qiBuT+9yj j+pMUUSIt4ua6Iv6ZGaOH45bBUgUUrtNuUvyDzpXdvtGtjp7RxRNCVG8KFnnZpc+aRvN isNA== X-Gm-Message-State: ACgBeo123ZWCbM2WHlxxrpWnENEXpgW2vpbDv0zOBCFEhGtu7YsCck16 iVETNA/UIKwIBcVfS+qyYJg0Exy0ok5tKw== X-Received: by 2002:a63:ff55:0:b0:438:fa5d:af36 with SMTP id s21-20020a63ff55000000b00438fa5daf36mr3754995pgk.533.1662972675200; Mon, 12 Sep 2022 01:51:15 -0700 (PDT) Received: from localhost.localdomain ([2401:4900:1c60:5362:9d7f:2354:1d0a:78e3]) by smtp.gmail.com with ESMTPSA id h13-20020a170902f54d00b00172897952a0sm5326699plf.283.2022.09.12.01.51.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 12 Sep 2022 01:51:14 -0700 (PDT) From: Bhupesh Sharma To: linux-kernel@vger.kernel.org, linux-pm@vger.kernel.org, devicetree@vger.kernel.org Cc: agross@kernel.org, linux-arm-msm@vger.kernel.org, daniel.lezcano@linaro.org, robh@kernel.org, andersson@kernel.org, rafael@kernel.org, bhupesh.sharma@linaro.org, bhupesh.linux@gmail.com Subject: [PATCH 3/4] dt-bindings: thermal: Add qcom,qmi-tmd-device and qcom,tmd-device yaml bindings Date: Mon, 12 Sep 2022 14:20:48 +0530 Message-Id: <20220912085049.3517140-4-bhupesh.sharma@linaro.org> X-Mailer: git-send-email 2.37.1 In-Reply-To: <20220912085049.3517140-1-bhupesh.sharma@linaro.org> References: <20220912085049.3517140-1-bhupesh.sharma@linaro.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Add qcom,qmi-tmd-device and qcom,tmd-device yaml bindings. Qualcomm QMI based TMD cooling device(s) are used for various mitigations for remote subsystem(s) including remote processor mitigation, rail voltage restriction etc. Each child node represents one remote subsystem and each child of this subsystem in-turn represents separate TMD cooling device. Cc: daniel.lezcano@linaro.org Cc: rafael@kernel.org Cc: andersson@kernel.org Cc: robh@kernel.org Signed-off-by: Bhupesh Sharma --- .../bindings/thermal/qcom,qmi-tmd-device.yaml | 78 +++++++++++ .../bindings/thermal/qcom,tmd-device.yaml | 122 ++++++++++++++++++ include/dt-bindings/thermal/qcom,tmd.h | 14 ++ 3 files changed, 214 insertions(+) create mode 100644 Documentation/devicetree/bindings/thermal/qcom,qmi-tmd-device.yaml create mode 100644 Documentation/devicetree/bindings/thermal/qcom,tmd-device.yaml create mode 100644 include/dt-bindings/thermal/qcom,tmd.h diff --git a/Documentation/devicetree/bindings/thermal/qcom,qmi-tmd-device.yaml b/Documentation/devicetree/bindings/thermal/qcom,qmi-tmd-device.yaml new file mode 100644 index 000000000000..dfda5b611a93 --- /dev/null +++ b/Documentation/devicetree/bindings/thermal/qcom,qmi-tmd-device.yaml @@ -0,0 +1,78 @@ +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) + +%YAML 1.2 +--- +$id: "http://devicetree.org/schemas/thermal/qcom,qmi-tmd-device.yaml#" +$schema: "http://devicetree.org/meta-schemas/core.yaml#" + +title: Qualcomm QMI based thermal mitigation (TMD) cooling devices. + +maintainers: + - Bhupesh Sharma + +description: + Qualcomm QMI based TMD cooling device(s) are used for various + mitigations for remote subsystem(s) including remote processor + mitigation, rail voltage restriction etc. + +properties: + $nodename: + const: qmi-tmd-devices + + compatible: + items: + - const: qcom,qmi-tmd-devices + + modem0: + $ref: /schemas/thermal/qcom,tmd-device.yaml# + + adsp: + $ref: /schemas/thermal/qcom,tmd-device.yaml# + + cdsp: + $ref: /schemas/thermal/qcom,tmd-device.yaml# + + slpi: + $ref: /schemas/thermal/qcom,tmd-device.yaml# + +required: + - compatible + +unevaluatedProperties: false + +examples: + - | + #include + qmi-tmd-devices { + compatible = "qcom,qmi-tmd-devices"; + + modem0 { + qcom,instance-id = ; + + modem0_pa: tmd-device0 { + label = "pa"; + #cooling-cells = <2>; + }; + + modem0_proc: tmd-device1 { + label = "modem"; + #cooling-cells = <2>; + }; + + modem0_current: tmd-device2 { + label = "modem_current"; + #cooling-cells = <2>; + }; + + modem0_skin: tmd-device3 { + label = "modem_skin"; + #cooling-cells = <2>; + }; + + modem0_vdd: tmd-device4 { + label = "cpuv_restriction_cold"; + #cooling-cells = <2>; + }; + }; + }; +... diff --git a/Documentation/devicetree/bindings/thermal/qcom,tmd-device.yaml b/Documentation/devicetree/bindings/thermal/qcom,tmd-device.yaml new file mode 100644 index 000000000000..38ac62f03376 --- /dev/null +++ b/Documentation/devicetree/bindings/thermal/qcom,tmd-device.yaml @@ -0,0 +1,122 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) + +%YAML 1.2 +--- +$id: "http://devicetree.org/schemas/thermal/qcom,tmd-device.yaml#" +$schema: "http://devicetree.org/meta-schemas/core.yaml#" + +title: Qualcomm thermal mitigation (TMD) cooling devices + +maintainers: + - Bhupesh Sharma + +description: + Qualcomm thermal mitigation (TMD) cooling devices. Each child node + represents one remote subsystem and each child of this subsystem in-turn + represents separate cooling devices. + +properties: + $nodename: + pattern: "^(modem|adsp|cdsp|slpi[0-9])?$" + + qcom,instance-id: + $ref: /schemas/types.yaml#/definitions/uint32 + description: + Remote subsystem QMI server instance id to be used for communicating with QMI. + +patternProperties: + "^tmd-device[0-9]?$": + type: object + description: + Subnodes indicating tmd cooling device of a specific category. + properties: + label: + maxItems: 1 + description: | + Remote subsystem device identifier. Acceptable device names - + "pa" -> for pa cooling device, + "cpuv_restriction_cold" -> for vdd restriction, + "cx_vdd_limit" -> for vdd limit, + "modem" -> for processor passive cooling device, + "modem_current" -> for current limiting device, + "modem_bw" -> for bus bandwidth limiting device, + "cpr_cold" -> for cpr restriction. + + "#cooling-cells": + const: 2 + + required: + - label + - "#cooling-cells" + + additionalProperties: false + +required: + - qcom,instance-id + +additionalProperties: false + +examples: + - | + #include + modem0 { + qcom,instance-id = ; + + modem0_pa: tmd-device0 { + label = "pa"; + #cooling-cells = <2>; + }; + + modem0_proc: tmd-device1 { + label = "modem"; + #cooling-cells = <2>; + }; + + modem0_current: tmd-device2 { + label = "modem_current"; + #cooling-cells = <2>; + }; + + modem0_skin: tmd-device3 { + label = "modem_skin"; + #cooling-cells = <2>; + }; + + modem0_vdd: tmd-device4 { + label = "cpuv_restriction_cold"; + #cooling-cells = <2>; + }; + }; + + - | + #include + adsp { + qcom,instance-id = ; + + adsp_vdd: tmd-device1 { + label = "cpuv_restriction_cold"; + #cooling-cells = <2>; + }; + }; + + - | + #include + cdsp { + qcom,instance-id = ; + + cdsp_vdd: tmd-device1 { + label = "cpuv_restriction_cold"; + #cooling-cells = <2>; + }; + }; + + - | + #include + slpi { + qcom,instance-id = ; + + slpi_vdd: tmd-device1 { + label = "cpuv_restriction_cold"; + #cooling-cells = <2>; + }; + }; diff --git a/include/dt-bindings/thermal/qcom,tmd.h b/include/dt-bindings/thermal/qcom,tmd.h new file mode 100644 index 000000000000..5ede4422e04e --- /dev/null +++ b/include/dt-bindings/thermal/qcom,tmd.h @@ -0,0 +1,14 @@ +/* SPDX-License-Identifier: GPL-2.0 */ +/* + * This header provides constants for the Qualcomm TMD instances. + */ + +#ifndef _DT_BINDINGS_THERMAL_QCOM_TMD_H_ +#define _DT_BINDINGS_THERMAL_QCOM_TMD_H_ + +#define MODEM0_INSTANCE_ID 0x0 +#define ADSP_INSTANCE_ID 0x1 +#define CDSP_INSTANCE_ID 0x43 +#define SLPI_INSTANCE_ID 0x53 + +#endif -- 2.37.1