From patchwork Wed Apr 19 12:23:20 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Konrad Dybcio X-Patchwork-Id: 675112 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 84E44C77B7E for ; Wed, 19 Apr 2023 12:23:45 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233093AbjDSMXo (ORCPT ); Wed, 19 Apr 2023 08:23:44 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41798 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233160AbjDSMX1 (ORCPT ); Wed, 19 Apr 2023 08:23:27 -0400 Received: from mail-lj1-x22e.google.com (mail-lj1-x22e.google.com [IPv6:2a00:1450:4864:20::22e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 11A105582 for ; Wed, 19 Apr 2023 05:23:25 -0700 (PDT) Received: by mail-lj1-x22e.google.com with SMTP id 38308e7fff4ca-2a8baeac4d1so25351351fa.1 for ; Wed, 19 Apr 2023 05:23:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1681907003; x=1684499003; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=rpIrKGGSuGWfWoM6hvqicgJY+QR4yE0dRd/xAmGj4Vk=; b=azVSMzjNenkmgem6Oe0hWPFKOwsCHgbHWMLXJ28e6ZxNmp7PCJvtCCaDdygiIrjwyr tScYR7rXvC+Lg10tvwGReL1RV9nKYyuEz9e3BJuajHu2g5PyWpFdIzP8Lg3WvlwnB2ph JVEq+U032vYj21ScvJXWgrdlbdxU43eOov5ZAYs0/d7Qg8LvHZnXWkQdxK+Fkzp34EWM Z5HhLOrpNrsP9rwyqCQA9LepbxFv5+X5vfschdJrltUEgMracRVa1qrZOJfmoXJ4aUVr uVT/p+BI7NdJDnwkJw8NlfE/GIPsbRWY6qFjQkzytpnRfIKsGOV/10UENqmy6uvpBnJ2 wm4Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1681907003; x=1684499003; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=rpIrKGGSuGWfWoM6hvqicgJY+QR4yE0dRd/xAmGj4Vk=; b=k6OzcsnC9v+akELBEK1V6aUBSXy/40UwjClOOZzmndmSfIiiEuwINBmWSQtWMyVR9+ A/3brc/vsQxh3K9FMjxnbz9Ogqa8Aw2rvK+EHutPjSOZd0t6qfHimAMBFvFFYK+O8wCa OWAcfH7LjjyyjtdCsVw9Nb8xcnIem1aJAN8iN4lW7LAUG3cX+sBw5oeyapy6t8r28bO2 Xd1FLcsCx2UvLHgBjEefv9k6mk6/58daiREHn6/pZtNKpqT0CO5V8vcd+BAr4dcQLnDs 3ZtxR0HX5nA/qfJ3Ds8kIrTtj3w7+dOuW3VBvZpIuCGAmcGX03x25lmnxfr/t6kYJXk8 VtZw== X-Gm-Message-State: AAQBX9cRGGsF/Mm3D5eHkRguHPk358cozWP/X/HUIvul33JZXIhJlQ98 DFNvHdWg08DlNTm/g3NIcA2+Hw== X-Google-Smtp-Source: AKy350YUWVlbiha/VXyCsQIxcwwqUaHjLH3eUPzyALQnO3vkbpfApgWBZx5XkVFDC48tTqGMUUuSFA== X-Received: by 2002:a19:f71a:0:b0:4ed:d4ac:1e17 with SMTP id z26-20020a19f71a000000b004edd4ac1e17mr1539663lfe.49.1681907003424; Wed, 19 Apr 2023 05:23:23 -0700 (PDT) Received: from [192.168.1.101] (abyj144.neoplus.adsl.tpnet.pl. [83.9.29.144]) by smtp.gmail.com with ESMTPSA id a23-20020a2e8317000000b002a79d7ceb93sm2925550ljh.9.2023.04.19.05.23.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 19 Apr 2023 05:23:23 -0700 (PDT) From: Konrad Dybcio Date: Wed, 19 Apr 2023 14:23:20 +0200 Subject: [PATCH v5 1/2] dt-bindings: soc: qcom: Add RPM Master stats MIME-Version: 1.0 Message-Id: <20230405-topic-master_stats-v5-1-2e1c98a8b63e@linaro.org> References: <20230405-topic-master_stats-v5-0-2e1c98a8b63e@linaro.org> In-Reply-To: <20230405-topic-master_stats-v5-0-2e1c98a8b63e@linaro.org> To: Andy Gross , Bjorn Andersson , Rob Herring , Krzysztof Kozlowski Cc: Marijn Suijten , linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Konrad Dybcio , Manivannan Sadhasivam , Krzysztof Kozlowski X-Mailer: b4 0.12.2 X-Developer-Signature: v=1; a=ed25519-sha256; t=1681907001; l=3242; i=konrad.dybcio@linaro.org; s=20230215; h=from:subject:message-id; bh=p+kMF2wI4gUD7vWxW6rNWesT2Ay4RZ53dQRi1h/ATdY=; b=q1DsNMEJ7vggCx+E2l6mlDctPkj30e8vrqGILNMEjQZu/dcOjiT04Xcutcj2BpdCzw+0QJ6FMmYB tA/Q3z4hDRcHlc8C0Y+YQ9jtMgZgAmn+vBk35D67i/yTOKGMZN10 X-Developer-Key: i=konrad.dybcio@linaro.org; a=ed25519; pk=iclgkYvtl2w05SSXO5EjjSYlhFKsJ+5OSZBjOkQuEms= Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org The RPM MSG RAM contains per-RPM-master (e.g. APPS, ADSP etc.) sleep statistics. They let one assess which core is actively preventing the system from entering a true low-power mode. Reviewed-by: Krzysztof Kozlowski Signed-off-by: Konrad Dybcio --- .../bindings/soc/qcom/qcom,rpm-master-stats.yaml | 69 ++++++++++++++++++++++ 1 file changed, 69 insertions(+) diff --git a/Documentation/devicetree/bindings/soc/qcom/qcom,rpm-master-stats.yaml b/Documentation/devicetree/bindings/soc/qcom/qcom,rpm-master-stats.yaml new file mode 100644 index 000000000000..8a654979ce92 --- /dev/null +++ b/Documentation/devicetree/bindings/soc/qcom/qcom,rpm-master-stats.yaml @@ -0,0 +1,69 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/soc/qcom/qcom,rpm-master-stats.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Qualcomm Technologies, Inc. (QTI) RPM Master Stats + +maintainers: + - Konrad Dybcio + +description: | + The Qualcomm RPM (Resource Power Manager) architecture includes a concept + of "RPM Masters". They can be thought of as "the local gang leaders", usually + spanning a single subsystem (e.g. APSS, ADSP, CDSP). All of the RPM decisons + (particularly around entering hardware-driven low power modes: XO shutdown + and total system-wide power collapse) are first made at Master-level, and + only then aggregated for the entire system. + + The Master Stats provide a few useful bits that can be used to assess whether + our device has entered the desired low-power mode, how long it took to do so, + the duration of that residence, how long it took to come back online, + how many times a given sleep state was entered and which cores are actively + voting for staying awake. + + This scheme has been used on various SoCs in the 2013-2023 era, with some + newer or higher-end designs providing this information through an SMEM query. + +properties: + compatible: + const: qcom,rpm-master-stats + + qcom,rpm-msg-ram: + $ref: /schemas/types.yaml#/definitions/phandle-array + description: Phandle to an RPM MSG RAM slice containing the master stats + minItems: 1 + maxItems: 5 + + qcom,master-names: + $ref: /schemas/types.yaml#/definitions/string-array + description: + The name of the RPM Master which owns the MSG RAM slice where this + instance of Master Stats resides + minItems: 1 + maxItems: 5 + +required: + - compatible + - qcom,rpm-msg-ram + - qcom,master-names + +additionalProperties: false + +examples: + - | + stats { + compatible = "qcom,rpm-master-stats"; + qcom,rpm-msg-ram = <&apss_master_stats>, + <&mpss_master_stats>, + <&adsp_master_stats>, + <&cdsp_master_stats>, + <&tz_master_stats>; + qcom,master-names = "APSS", + "MPSS", + "ADSP", + "CDSP", + "TZ"; + }; +...