From patchwork Tue Jul 11 14:35:14 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Konrad Dybcio X-Patchwork-Id: 701713 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 7CFA1C0015E for ; Tue, 11 Jul 2023 14:35:47 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232985AbjGKOfp (ORCPT ); Tue, 11 Jul 2023 10:35:45 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45110 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230180AbjGKOfo (ORCPT ); Tue, 11 Jul 2023 10:35:44 -0400 Received: from mail-lj1-x236.google.com (mail-lj1-x236.google.com [IPv6:2a00:1450:4864:20::236]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9246619BE for ; Tue, 11 Jul 2023 07:35:22 -0700 (PDT) Received: by mail-lj1-x236.google.com with SMTP id 38308e7fff4ca-2b6fdaf6eefso90363281fa.0 for ; Tue, 11 Jul 2023 07:35:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1689086119; x=1691678119; 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=Oyco5JDx037j3CC/5Ihu7xd9SFL7i1B5RPFit6DU5NA=; b=w23R4XLZWoALYIhRhp+TogWJwABOEn2vt1cbkdZ2tGM9PHf4528vjlapChg8/xYAPt tCMP9c1NZ+Ro/pahFhbg6iIlrdHgeRj7HIwJksVEskQnIMoWVlMT1gmEChCnbODahxfa /DGRtrHzhG9JNGIG6PV4Gqsfj6h+T+wQWqsmCw02FQfOdgB4jU1SdNgb1rMJoEZIiriG GXEBlcgZUl17w/zrEDTfG73ff87Val3pFLoks29DV+UzjE8ODKUgP6dU8QMwsXm9bf02 eQ3DNvACQuEe0KUE2PMEwfPH15Yb2tvH/0Vpr/MkK4Rz3wmlZQPhzKMYrLDj5YqTH/FK R+HQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1689086119; x=1691678119; 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=Oyco5JDx037j3CC/5Ihu7xd9SFL7i1B5RPFit6DU5NA=; b=Hbgh0sg8PKMen1wDatmgf+EAhThW4G981BWXiPhDY1koPMCWyz3LfJzmD+Z3SvHHV9 TAhkVb99tM4qpslzS/nkpQZ4jiKhO+ExmrsCq0hVtd8Q6tH4eP8LgLzZ0g3O52/1DP/A R/gNRopAlq4622InYpIEFm1QaEMGnr+f2YcZB8ioleJ+dthz0PKl8TqMN9BnCPjnFbl/ qmnI8Glvr62bNIvSx+pTJipnOx6GO7zYD7jOeEOh4sYAdeORVotzIhsME/RH39fYfGat l27CMVnNZy0wzNxq8VW3nH7arCNbM8pQSUitlowN+3ebAF4ODloAItxsT9AkywSGZgB5 huPw== X-Gm-Message-State: ABy/qLaldEM2xDAQUtQd1xUsbZKw+D6nh48f7YYJYYkW5yQ8KV0Lpbl4 6ThS8VMpK4lpcls2007p78YMgg== X-Google-Smtp-Source: APBJJlGEYQVfM84jtfrOqvF4dt3dPWC/ym7m72/wY+N6vRgRd3QwMLpt5h8S7fF1Mx3QEV2CJJYb3g== X-Received: by 2002:a2e:8eca:0:b0:2b6:fa92:479e with SMTP id e10-20020a2e8eca000000b002b6fa92479emr14208937ljl.42.1689086119325; Tue, 11 Jul 2023 07:35:19 -0700 (PDT) Received: from [192.168.1.101] (abyl96.neoplus.adsl.tpnet.pl. [83.9.31.96]) by smtp.gmail.com with ESMTPSA id o11-20020a2e90cb000000b002b71c128ea0sm484221ljg.117.2023.07.11.07.35.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 11 Jul 2023 07:35:18 -0700 (PDT) From: Konrad Dybcio Date: Tue, 11 Jul 2023 16:35:14 +0200 Subject: [PATCH 2/4] dt-bindings: interconnect: qcom,msm8998-bwmon: Add SM6350 bwmon instances MIME-Version: 1.0 Message-Id: <20230711-topic-sm638250_bwmon-v1-2-bd4bb96b0673@linaro.org> References: <20230711-topic-sm638250_bwmon-v1-0-bd4bb96b0673@linaro.org> In-Reply-To: <20230711-topic-sm638250_bwmon-v1-0-bd4bb96b0673@linaro.org> To: Andy Gross , Bjorn Andersson , Krzysztof Kozlowski , Georgi Djakov , Rob Herring , Conor Dooley , Krzysztof Kozlowski Cc: Marijn Suijten , linux-arm-msm@vger.kernel.org, linux-pm@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Konrad Dybcio X-Mailer: b4 0.12.2 X-Developer-Signature: v=1; a=ed25519-sha256; t=1689086115; l=1271; i=konrad.dybcio@linaro.org; s=20230215; h=from:subject:message-id; bh=y8JreLdLXyJLqMWdu1OHC8XLto0h/XQOLRW3FKQUVDc=; b=TJkZnuVQFZcromYVHOBquze+DCg5ojW6C/LKh3G/LeyhIhmrHFfzWKs/5+qpl4uzyUR4QwoXf iz/D0silT+1Bfh+PBV4hINAYh4XsIK925W+Rrn4S8jOBTObnPbfPnNQ X-Developer-Key: i=konrad.dybcio@linaro.org; a=ed25519; pk=iclgkYvtl2w05SSXO5EjjSYlhFKsJ+5OSZBjOkQuEms= Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org SM6350 has a BWMONv4 for LLCC and a BWMONv5 for CPU. Document them. Signed-off-by: Konrad Dybcio --- Documentation/devicetree/bindings/interconnect/qcom,msm8998-bwmon.yaml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Documentation/devicetree/bindings/interconnect/qcom,msm8998-bwmon.yaml b/Documentation/devicetree/bindings/interconnect/qcom,msm8998-bwmon.yaml index 51ba6490c951..73f809cdb783 100644 --- a/Documentation/devicetree/bindings/interconnect/qcom,msm8998-bwmon.yaml +++ b/Documentation/devicetree/bindings/interconnect/qcom,msm8998-bwmon.yaml @@ -29,6 +29,7 @@ properties: - qcom,sc7280-cpu-bwmon - qcom,sc8280xp-cpu-bwmon - qcom,sdm845-cpu-bwmon + - qcom,sm6350-llcc-bwmon - qcom,sm8250-cpu-bwmon - qcom,sm8550-cpu-bwmon - const: qcom,sdm845-bwmon # BWMON v4, unified register space @@ -36,6 +37,7 @@ properties: - enum: - qcom,sc7180-llcc-bwmon - qcom,sc8280xp-llcc-bwmon + - qcom,sm6350-cpu-bwmon - qcom,sm8250-llcc-bwmon - qcom,sm8550-llcc-bwmon - const: qcom,sc7280-llcc-bwmon From patchwork Tue Jul 11 14:35:15 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Konrad Dybcio X-Patchwork-Id: 701712 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 20835EB64DC for ; Tue, 11 Jul 2023 14:36:03 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233175AbjGKOgC (ORCPT ); Tue, 11 Jul 2023 10:36:02 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45374 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233213AbjGKOfu (ORCPT ); Tue, 11 Jul 2023 10:35:50 -0400 Received: from mail-lj1-x22a.google.com (mail-lj1-x22a.google.com [IPv6:2a00:1450:4864:20::22a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B2DD110F1 for ; Tue, 11 Jul 2023 07:35:26 -0700 (PDT) Received: by mail-lj1-x22a.google.com with SMTP id 38308e7fff4ca-2b71ae5fa2fso40746121fa.0 for ; Tue, 11 Jul 2023 07:35:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1689086120; x=1691678120; 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=7822Zli8Tp5k/SZN6d8OwvrpyzkoEFi3QjuAaZmR3SA=; b=Huhm4XgNW75OEhw3a42sRrUuoix8e9mjt55v3QngBR/SLmqCP7J80/rmLfx8SeL7fn av2nBMZHP/qhsOPHwHKmW1YF1cYgu9nf7rHjPLTFLebfMGPAuR0ViIf7R/ske/uX9ZxN bLdemNdf6F1LMJduDvr0Vi/jQIhwLn+CsqiAe2PQeiyPv2CF0EJ+ycjMT0y9eDkRx914 +MpSoA1zYqOH2m+qdyZSBvOx6fk6zGngJ2n2ZEd+4HrWlkwyoBl5qAf9D2aHPp7mIm1N HQaL3naVoz67Iq0lE5TjTyRsPajiiLxQ7eCKeRoFxuBRwR10d/n2X+UBt+0utwSukcYV cNFg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1689086120; x=1691678120; 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=7822Zli8Tp5k/SZN6d8OwvrpyzkoEFi3QjuAaZmR3SA=; b=EWiGMyctktHK7M7paCF/r8ZwRjXstJCmh5ja8raC8OIZQFfC2VoVLidiH7MCNeMM4v 3QsIea8KJC6+VVntYjj3n9x0qhLjIbxOPDhAewobBoCxNCFm/NfSaDzOmQAvh7Ud2C/R eX1hjkMDr1CbiFpP9CkU5gq+N20zsiZl4XjVgytv0BrPRaexTllfqiYhS5srkR2gz3CB 8AnUCKiEnJDKlXHC/bDwQvIBxKOcsnHjdGPLp+JA+wWgJN3aUIF4fRwHsp4TrsHrRbv2 U3TegI/6dS4HmYXVKZStmeAz2LaSARVYoRzHyqCGadBN1WuOC07RqnZBlDfh2FqYDg7D Uc7Q== X-Gm-Message-State: ABy/qLYLXZaHNZvsLbwKBFL88/PrsKmhceDfRUd+QUBoNtjdXOpycuPb 8i5PG8Ed49fCBEMSPbSVmEJgNw== X-Google-Smtp-Source: APBJJlEtm3DcykOwcBkltVajL+9CvEs0dUWcZKqIaPepqBP5KYURx7Hji81DhV8F+gjg6+oXQdHEuQ== X-Received: by 2002:a2e:b615:0:b0:2b6:a3a0:5f7 with SMTP id r21-20020a2eb615000000b002b6a3a005f7mr13241124ljn.9.1689086120586; Tue, 11 Jul 2023 07:35:20 -0700 (PDT) Received: from [192.168.1.101] (abyl96.neoplus.adsl.tpnet.pl. [83.9.31.96]) by smtp.gmail.com with ESMTPSA id o11-20020a2e90cb000000b002b71c128ea0sm484221ljg.117.2023.07.11.07.35.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 11 Jul 2023 07:35:20 -0700 (PDT) From: Konrad Dybcio Date: Tue, 11 Jul 2023 16:35:15 +0200 Subject: [PATCH 3/4] arm64: dts: qcom: sm8250: Add BWMONs MIME-Version: 1.0 Message-Id: <20230711-topic-sm638250_bwmon-v1-3-bd4bb96b0673@linaro.org> References: <20230711-topic-sm638250_bwmon-v1-0-bd4bb96b0673@linaro.org> In-Reply-To: <20230711-topic-sm638250_bwmon-v1-0-bd4bb96b0673@linaro.org> To: Andy Gross , Bjorn Andersson , Krzysztof Kozlowski , Georgi Djakov , Rob Herring , Conor Dooley , Krzysztof Kozlowski Cc: Marijn Suijten , linux-arm-msm@vger.kernel.org, linux-pm@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Konrad Dybcio X-Mailer: b4 0.12.2 X-Developer-Signature: v=1; a=ed25519-sha256; t=1689086115; l=3475; i=konrad.dybcio@linaro.org; s=20230215; h=from:subject:message-id; bh=AjSbQFowYEpEAVY6Ao5qGWn/ZAomBZOs9ZzqIelG35Y=; b=vewgiErH5HUNculf4ayVWQLYqVP3SzOhtfH/Uez+HWq49AESmrGxC4z6BnlRAK9IYaPJ5LNOC yFj42ej2mBAC1U2fHUUuaDD3aHylik3JYlO6804wl3j6/ko17hZE/do X-Developer-Key: i=konrad.dybcio@linaro.org; a=ed25519; pk=iclgkYvtl2w05SSXO5EjjSYlhFKsJ+5OSZBjOkQuEms= Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org Add the CPU and LLC BWMONs (skip the NPU ones for now) on sm8250. LPDDR4X levels are skipped, as LPDDR5 seems more popular with SM8250 and voting for inexistent levels doesn't uptick the bus frequency, which results in no increased bandwidth, which results in bwmon deciding we shouldn't go higher.. you see the point! Signed-off-by: Konrad Dybcio --- arch/arm64/boot/dts/qcom/sm8250.dtsi | 122 +++++++++++++++++++++++++++++++++++ 1 file changed, 122 insertions(+) diff --git a/arch/arm64/boot/dts/qcom/sm8250.dtsi b/arch/arm64/boot/dts/qcom/sm8250.dtsi index e03007e23e91..80abd0bdc526 100644 --- a/arch/arm64/boot/dts/qcom/sm8250.dtsi +++ b/arch/arm64/boot/dts/qcom/sm8250.dtsi @@ -3694,6 +3694,128 @@ opp-202000000 { }; }; + pmu@9091000 { + compatible = "qcom,sm8250-llcc-bwmon", "qcom,sc7280-llcc-bwmon"; + reg = <0 0x09091000 0 0x1000>; + + interrupts = ; + + interconnects = <&mc_virt MASTER_LLCC 3 &mc_virt SLAVE_EBI_CH0 3>; + + operating-points-v2 = <&llcc_bwmon_opp_table>; + + llcc_bwmon_opp_table: opp-table { + compatible = "operating-points-v2"; + + opp-800000 { + opp-peak-kBps = <(200 * 4 * 1000)>; + }; + + opp-1200000 { + opp-peak-kBps = <(300 * 4 * 1000)>; + }; + + opp-1804000 { + opp-peak-kBps = <(451 * 4 * 1000)>; + }; + + opp-2188000 { + opp-peak-kBps = <(547 * 4 * 1000)>; + }; + + opp-2724000 { + opp-peak-kBps = <(681 * 4 * 1000)>; + }; + + opp-3072000 { + opp-peak-kBps = <(768 * 4 * 1000)>; + }; + + opp-4068000 { + opp-peak-kBps = <(1017 * 4 * 1000)>; + }; + + /* 1353 MHz, LPDDR4X */ + + opp-6220000 { + opp-peak-kBps = <(1555 * 4 * 1000)>; + }; + + opp-7216000 { + opp-peak-kBps = <(1804 * 4 * 1000)>; + }; + + opp-8368000 { + opp-peak-kBps = <(2092 * 4 * 1000)>; + }; + + /* LPDDR5 */ + opp-10944000 { + opp-peak-kBps = <(2736 * 4 * 1000)>; + }; + }; + }; + + pmu@90b6400 { + compatible = "qcom,sm8250-cpu-bwmon", "qcom,sdm845-bwmon"; + reg = <0 0x090b6400 0 0x600>; + + interrupts = ; + + interconnects = <&gem_noc MASTER_AMPSS_M0 3 &gem_noc SLAVE_LLCC 3>; + operating-points-v2 = <&cpu_bwmon_opp_table>; + + cpu_bwmon_opp_table: opp-table { + compatible = "operating-points-v2"; + + opp-800000 { + opp-peak-kBps = <(200 * 4 * 1000)>; + }; + + opp-1804000 { + opp-peak-kBps = <(451 * 4 * 1000)>; + }; + + opp-2188000 { + opp-peak-kBps = <(547 * 4 * 1000)>; + }; + + opp-2724000 { + opp-peak-kBps = <(681 * 4 * 1000)>; + }; + + opp-3072000 { + opp-peak-kBps = <(768 * 4 * 1000)>; + }; + + /* 1017MHz, 1353 MHz, LPDDR4X */ + + opp-6220000 { + opp-peak-kBps = <(1555 * 4 * 1000)>; + }; + + opp-6832000 { + opp-peak-kBps = <(1708 * 4 * 1000)>; + }; + + opp-8368000 { + opp-peak-kBps = <(2092 * 4 * 1000)>; + }; + + /* 2133MHz, LPDDR4X */ + + /* LPDDR5 */ + opp-10944000 { + opp-peak-kBps = <(2736 * 4 * 1000)>; + }; + + /* LPDDR5 */ + opp-12784000 { + opp-peak-kBps = <(3196 * 4 * 1000)>; + }; + }; + }; + dc_noc: interconnect@90c0000 { compatible = "qcom,sm8250-dc-noc"; reg = <0 0x090c0000 0 0x4200>;