From patchwork Wed May 31 13:22:36 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Konrad Dybcio X-Patchwork-Id: 687502 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 17C3FC7EE2F for ; Wed, 31 May 2023 13:22:55 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236380AbjEaNWx (ORCPT ); Wed, 31 May 2023 09:22:53 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43572 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236372AbjEaNWv (ORCPT ); Wed, 31 May 2023 09:22:51 -0400 Received: from mail-lf1-x12b.google.com (mail-lf1-x12b.google.com [IPv6:2a00:1450:4864:20::12b]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C6C86B2 for ; Wed, 31 May 2023 06:22:48 -0700 (PDT) Received: by mail-lf1-x12b.google.com with SMTP id 2adb3069b0e04-4f3b9755961so6592473e87.0 for ; Wed, 31 May 2023 06:22:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1685539367; x=1688131367; 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=nof0fcraUf7ziAMYvboreBBmHnbxyW58ozUlb23q/Is=; b=QtNGn/b1WZTG6Icg8tsfvn5PP28xeApGsFniTvTRezvjFcp4V7tcg2dxND3KPbkbN6 Df76+qebEz6t4lD85BCjj8tfEqoZ2KrhYvoy4eQLRbwzsnV0BJk0JBg9D51DVMzPhXVs +UHB63JWhLyfTWW+JioQ00lD8tDNACa3AR1d2NOph2mbIgcJ6rcGWyY0zezfcj3ToQXw kE2ugUnqeb2QqfcbETQEdB34NHStmKJQSvsRe7hE5AaYfmsNVDD3ScBGkttjxc8hGUNs 41pSjULhhbaq/D848Ta11tlNaiWggd1B2VSPRMYu14ANfuGxQ16ysEYaDPqO6URfM+iD s5DQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1685539367; x=1688131367; 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=nof0fcraUf7ziAMYvboreBBmHnbxyW58ozUlb23q/Is=; b=eHld7ZakAp7bZ5m6rl3vkKHlB9xBUkYqcF7eIIduReZLYN9EG6SRc6I0mn6EzfMoZO 7jr8QZVXdEuxxyOIudlCwrc+5ZRpo9sOviTYalUUnkYshqPCx910C51Et3iZ+/I8fFQo ClmUSTOuuYGzLXbDl7J+wpp6wJMgxiFhUPphEMUqk29S/ng18r/UhBWr0xXMBQKg532b 7mRQBPoSDYUpwAlJ2DudCOELPUxvFij7pUofwo9ZUSEqtDrHX21GcYOV2kPGpCaq4ify rRgyjCN8tHrcFHSi5G8M43oN8e9lUO52mryQpGqt6g3nfHUDyB2bY4yr+zNSanWr5zWs 5EYQ== X-Gm-Message-State: AC+VfDwjiF4a3LuPg2Xwa8+YH2eAqVygl9HRHlRgO46jQPLpLpRw/w1Z 7QUY/E2ZpiOHmwN6uMeJw1De2Q== X-Google-Smtp-Source: ACHHUZ4M0YRHPLHmVOuOjWHCRHyP3n9BhL+VVdS/h+4Fv13yJnP3jvo+l3OsdJmkNtqjW+AnwlvCeQ== X-Received: by 2002:ac2:5238:0:b0:4f2:4419:932c with SMTP id i24-20020ac25238000000b004f24419932cmr2539922lfl.23.1685539367031; Wed, 31 May 2023 06:22:47 -0700 (PDT) Received: from [192.168.1.101] (abyj77.neoplus.adsl.tpnet.pl. [83.9.29.77]) by smtp.gmail.com with ESMTPSA id w8-20020ac24428000000b004eb0c51780bsm720138lfl.29.2023.05.31.06.22.45 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 31 May 2023 06:22:46 -0700 (PDT) From: Konrad Dybcio Date: Wed, 31 May 2023 15:22:36 +0200 Subject: [PATCH 2/8] arm64: dts: qcom: sm6350: Add PSCI idle states MIME-Version: 1.0 Message-Id: <20230531-topic-rsc-v1-2-b4a985f57b8b@linaro.org> References: <20230531-topic-rsc-v1-0-b4a985f57b8b@linaro.org> In-Reply-To: <20230531-topic-rsc-v1-0-b4a985f57b8b@linaro.org> To: Andy Gross , Bjorn Andersson , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Melody Olvera , Vinod Koul , Richard Acayan , Lina Iyer , Douglas Anderson , Neil Armstrong , Abel Vesa , Sai Prakash Ranjan Cc: Marijn Suijten , Bartosz Golaszewski , Luca Weiss , linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Andy Gross , Konrad Dybcio , Konrad Dybcio X-Mailer: b4 0.12.2 X-Developer-Signature: v=1; a=ed25519-sha256; t=1685539362; l=7351; i=konrad.dybcio@linaro.org; s=20230215; h=from:subject:message-id; bh=qTMZv+oBuQzxfRAczHq2kgWkd1AVOwgX8ifCX4qtLiA=; b=9GbD5WdJT72ka28Wq714XVJZ4eaxAjvcCPTiOBSxW1SLvBUyVLxp7YDnaizIBfXzDA6v1dGfp XG8VGPt2E/KD/hFwq/TCGeo61bu/yRPK8o2ClNvaO8TUpj2RZhPTy9s X-Developer-Key: i=konrad.dybcio@linaro.org; a=ed25519; pk=iclgkYvtl2w05SSXO5EjjSYlhFKsJ+5OSZBjOkQuEms= Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org Add the PSCI idle states so that the CPU (among other things) can reach lower power states. Signed-off-by: Konrad Dybcio --- arch/arm64/boot/dts/qcom/sm6350.dtsi | 141 +++++++++++++++++++++++++++++++++++ 1 file changed, 141 insertions(+) diff --git a/arch/arm64/boot/dts/qcom/sm6350.dtsi b/arch/arm64/boot/dts/qcom/sm6350.dtsi index 46c29a190f1d..9311bb6bddab 100644 --- a/arch/arm64/boot/dts/qcom/sm6350.dtsi +++ b/arch/arm64/boot/dts/qcom/sm6350.dtsi @@ -56,6 +56,8 @@ CPU0: cpu@0 { interconnects = <&gem_noc MASTER_AMPSS_M0 QCOM_ICC_TAG_ACTIVE_ONLY &clk_virt SLAVE_EBI_CH0 QCOM_ICC_TAG_ACTIVE_ONLY>, <&osm_l3 MASTER_OSM_L3_APPS &osm_l3 SLAVE_OSM_L3>; + power-domains = <&CPU_PD0>; + power-domain-names = "psci"; #cooling-cells = <2>; L2_0: l2-cache { compatible = "cache"; @@ -84,6 +86,8 @@ CPU1: cpu@100 { interconnects = <&gem_noc MASTER_AMPSS_M0 QCOM_ICC_TAG_ACTIVE_ONLY &clk_virt SLAVE_EBI_CH0 QCOM_ICC_TAG_ACTIVE_ONLY>, <&osm_l3 MASTER_OSM_L3_APPS &osm_l3 SLAVE_OSM_L3>; + power-domains = <&CPU_PD1>; + power-domain-names = "psci"; #cooling-cells = <2>; L2_100: l2-cache { compatible = "cache"; @@ -107,6 +111,8 @@ CPU2: cpu@200 { interconnects = <&gem_noc MASTER_AMPSS_M0 QCOM_ICC_TAG_ACTIVE_ONLY &clk_virt SLAVE_EBI_CH0 QCOM_ICC_TAG_ACTIVE_ONLY>, <&osm_l3 MASTER_OSM_L3_APPS &osm_l3 SLAVE_OSM_L3>; + power-domains = <&CPU_PD2>; + power-domain-names = "psci"; #cooling-cells = <2>; L2_200: l2-cache { compatible = "cache"; @@ -130,6 +136,8 @@ CPU3: cpu@300 { interconnects = <&gem_noc MASTER_AMPSS_M0 QCOM_ICC_TAG_ACTIVE_ONLY &clk_virt SLAVE_EBI_CH0 QCOM_ICC_TAG_ACTIVE_ONLY>, <&osm_l3 MASTER_OSM_L3_APPS &osm_l3 SLAVE_OSM_L3>; + power-domains = <&CPU_PD3>; + power-domain-names = "psci"; #cooling-cells = <2>; L2_300: l2-cache { compatible = "cache"; @@ -153,6 +161,8 @@ CPU4: cpu@400 { interconnects = <&gem_noc MASTER_AMPSS_M0 QCOM_ICC_TAG_ACTIVE_ONLY &clk_virt SLAVE_EBI_CH0 QCOM_ICC_TAG_ACTIVE_ONLY>, <&osm_l3 MASTER_OSM_L3_APPS &osm_l3 SLAVE_OSM_L3>; + power-domains = <&CPU_PD4>; + power-domain-names = "psci"; #cooling-cells = <2>; L2_400: l2-cache { compatible = "cache"; @@ -176,6 +186,8 @@ CPU5: cpu@500 { interconnects = <&gem_noc MASTER_AMPSS_M0 QCOM_ICC_TAG_ACTIVE_ONLY &clk_virt SLAVE_EBI_CH0 QCOM_ICC_TAG_ACTIVE_ONLY>, <&osm_l3 MASTER_OSM_L3_APPS &osm_l3 SLAVE_OSM_L3>; + power-domains = <&CPU_PD5>; + power-domain-names = "psci"; #cooling-cells = <2>; L2_500: l2-cache { compatible = "cache"; @@ -199,6 +211,8 @@ CPU6: cpu@600 { interconnects = <&gem_noc MASTER_AMPSS_M0 QCOM_ICC_TAG_ACTIVE_ONLY &clk_virt SLAVE_EBI_CH0 QCOM_ICC_TAG_ACTIVE_ONLY>, <&osm_l3 MASTER_OSM_L3_APPS &osm_l3 SLAVE_OSM_L3>; + power-domains = <&CPU_PD6>; + power-domain-names = "psci"; #cooling-cells = <2>; L2_600: l2-cache { compatible = "cache"; @@ -222,6 +236,8 @@ CPU7: cpu@700 { interconnects = <&gem_noc MASTER_AMPSS_M0 QCOM_ICC_TAG_ACTIVE_ONLY &clk_virt SLAVE_EBI_CH0 QCOM_ICC_TAG_ACTIVE_ONLY>, <&osm_l3 MASTER_OSM_L3_APPS &osm_l3 SLAVE_OSM_L3>; + power-domains = <&CPU_PD7>; + power-domain-names = "psci"; #cooling-cells = <2>; L2_700: l2-cache { compatible = "cache"; @@ -266,6 +282,76 @@ core7 { }; }; }; + + domain-idle-states { + CLUSTER_SLEEP_PC: cluster-sleep-0 { + compatible = "domain-idle-state"; + arm,psci-suspend-param = <0x41000044>; + entry-latency-us = <2752>; + exit-latency-us = <3048>; + min-residency-us = <6118>; + }; + + CLUSTER_SLEEP_CX_RET: cluster-sleep-1 { + compatible = "domain-idle-state"; + arm,psci-suspend-param = <0x41001244>; + entry-latency-us = <3638>; + exit-latency-us = <4562>; + min-residency-us = <8467>; + }; + + CLUSTER_AOSS_SLEEP: cluster-sleep-2 { + compatible = "domain-idle-state"; + arm,psci-suspend-param = <0x4100b244>; + entry-latency-us = <3263>; + exit-latency-us = <6562>; + min-residency-us = <9987>; + }; + }; + + cpu_idle_states: idle-states { + entry-method = "psci"; + + LITTLE_CPU_SLEEP_0: cpu-sleep-0-0 { + compatible = "arm,idle-state"; + idle-state-name = "little-power-collapse"; + arm,psci-suspend-param = <0x40000003>; + entry-latency-us = <549>; + exit-latency-us = <901>; + min-residency-us = <1774>; + local-timer-stop; + }; + + LITTLE_CPU_SLEEP_1: cpu-sleep-0-1 { + compatible = "arm,idle-state"; + idle-state-name = "little-rail-power-collapse"; + arm,psci-suspend-param = <0x40000004>; + entry-latency-us = <702>; + exit-latency-us = <915>; + min-residency-us = <4001>; + local-timer-stop; + }; + + BIG_CPU_SLEEP_0: cpu-sleep-1-0 { + compatible = "arm,idle-state"; + idle-state-name = "big-power-collapse"; + arm,psci-suspend-param = <0x40000003>; + entry-latency-us = <523>; + exit-latency-us = <1244>; + min-residency-us = <2207>; + local-timer-stop; + }; + + BIG_CPU_SLEEP_1: cpu-sleep-1-1 { + compatible = "arm,idle-state"; + idle-state-name = "big-rail-power-collapse"; + arm,psci-suspend-param = <0x40000004>; + entry-latency-us = <526>; + exit-latency-us = <1854>; + min-residency-us = <5555>; + local-timer-stop; + }; + }; }; firmware { @@ -395,6 +481,61 @@ pmu { psci { compatible = "arm,psci-1.0"; method = "smc"; + + CPU_PD0: power-domain-cpu0 { + #power-domain-cells = <0>; + power-domains = <&CLUSTER_PD>; + domain-idle-states = <&LITTLE_CPU_SLEEP_0 &LITTLE_CPU_SLEEP_1>; + }; + + CPU_PD1: power-domain-cpu1 { + #power-domain-cells = <0>; + power-domains = <&CLUSTER_PD>; + domain-idle-states = <&LITTLE_CPU_SLEEP_0 &LITTLE_CPU_SLEEP_1>; + }; + + CPU_PD2: power-domain-cpu2 { + #power-domain-cells = <0>; + power-domains = <&CLUSTER_PD>; + domain-idle-states = <&LITTLE_CPU_SLEEP_0 &LITTLE_CPU_SLEEP_1>; + }; + + CPU_PD3: power-domain-cpu3 { + #power-domain-cells = <0>; + power-domains = <&CLUSTER_PD>; + domain-idle-states = <&LITTLE_CPU_SLEEP_0 &LITTLE_CPU_SLEEP_1>; + }; + + CPU_PD4: power-domain-cpu4 { + #power-domain-cells = <0>; + power-domains = <&CLUSTER_PD>; + domain-idle-states = <&LITTLE_CPU_SLEEP_0 &LITTLE_CPU_SLEEP_1>; + }; + + CPU_PD5: power-domain-cpu5 { + #power-domain-cells = <0>; + power-domains = <&CLUSTER_PD>; + domain-idle-states = <&LITTLE_CPU_SLEEP_0 &LITTLE_CPU_SLEEP_1>; + }; + + CPU_PD6: power-domain-cpu6 { + #power-domain-cells = <0>; + power-domains = <&CLUSTER_PD>; + domain-idle-states = <&BIG_CPU_SLEEP_0 &BIG_CPU_SLEEP_1>; + }; + + CPU_PD7: power-domain-cpu7 { + #power-domain-cells = <0>; + power-domains = <&CLUSTER_PD>; + domain-idle-states = <&BIG_CPU_SLEEP_0 &BIG_CPU_SLEEP_1>; + }; + + CLUSTER_PD: power-domain-cpu-cluster0 { + #power-domain-cells = <0>; + domain-idle-states = <&CLUSTER_SLEEP_PC + &CLUSTER_SLEEP_CX_RET + &CLUSTER_AOSS_SLEEP>; + }; }; reserved_memory: reserved-memory { From patchwork Wed May 31 13:22:38 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Konrad Dybcio X-Patchwork-Id: 687501 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 C5D56C77B73 for ; Wed, 31 May 2023 13:23:01 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236396AbjEaNW7 (ORCPT ); Wed, 31 May 2023 09:22:59 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43588 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236371AbjEaNWx (ORCPT ); Wed, 31 May 2023 09:22:53 -0400 Received: from mail-lf1-x131.google.com (mail-lf1-x131.google.com [IPv6:2a00:1450:4864:20::131]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 29B4FA0 for ; Wed, 31 May 2023 06:22:52 -0700 (PDT) Received: by mail-lf1-x131.google.com with SMTP id 2adb3069b0e04-4f122ff663eso6624223e87.2 for ; Wed, 31 May 2023 06:22:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1685539370; x=1688131370; 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=Ofn+y+PGmsgVQL53Qyo7xRQqsOY2ldRcLbPHWF8Ex50=; b=ar0oLQdwCyoTg4+4Vm94VPv4TNwrDHD+dDpoMUqRwn9fFLxJBiDvsDMTSc+fw1/IjF Pcgok4c/qqCJjExCjFyeRfj/nzhTg6kP8HLsVZdl6tafKZpQ5fpk5HXwwGjyZNme6qRs dvQb+l011lHg1Ztk+agtcn0KGWDUMxAVc1NshZBi9/CtYx/ZZtAAB4zTVp4uttvdDAGl wgBnZziyrpK5rYmiTSe+8XvPDhZGqAD4tQLj7z/IohF/0K0xoa2Y187rgNrR77Mj6vBJ 25TBxXT3LjhkWgrqf9X+Rwjnn/ZfFjYWSTlczQBgXk4MdERqrV5fdMjoZK7TTPJQJ28p FZ/A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1685539370; x=1688131370; 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=Ofn+y+PGmsgVQL53Qyo7xRQqsOY2ldRcLbPHWF8Ex50=; b=cSjPsFoKaHpnOIddYCkkeHVhzQxYmG++LQnWMVDa9vZRZ9nctfuvTFIzQnAhDWxDC4 qirmjsvYOLsVk7YlptBIOD/MJ8w/UK7B0aX323rl6+6yrLO7b14woQYnwCZaB5xCi6q/ b+91a7hXsLSItiPHYZoeRbrr2RXmn1gvrFjEYCHl3QAJ3GqveYraemz2qGv4CzFeCY+h 4AWwsqiUDAzxRVCHULyb37SMItTo94vMvoyeMSvKTF9f8dN7A4DHz5DlFv34D4MhXMnB Nz6z2PtYOmM1xFQCKTVVRV64b8psIfHPJshuKnL36j3jvWlEucTwL78C5SmK4vUi3bY2 Y15w== X-Gm-Message-State: AC+VfDyWl2aVHxNJYMWU04ZWVKhDuM6x8bru6/RA3gzcDMkCXTbyBurA F+9XQepBrMAhi8cljMffOcF6pA== X-Google-Smtp-Source: ACHHUZ4tuT1gnRZKjhJiiDqEeYOxTr040+EXB8lVn3cc8+vVSJNaOXxUKQXk6hB354n6VjIGtLGcmg== X-Received: by 2002:a05:6512:41b:b0:4f3:a812:5ae with SMTP id u27-20020a056512041b00b004f3a81205aemr2601995lfk.37.1685539370547; Wed, 31 May 2023 06:22:50 -0700 (PDT) Received: from [192.168.1.101] (abyj77.neoplus.adsl.tpnet.pl. [83.9.29.77]) by smtp.gmail.com with ESMTPSA id w8-20020ac24428000000b004eb0c51780bsm720138lfl.29.2023.05.31.06.22.48 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 31 May 2023 06:22:49 -0700 (PDT) From: Konrad Dybcio Date: Wed, 31 May 2023 15:22:38 +0200 Subject: [PATCH 4/8] arm64: dts: qcom: sc8180x: Flush RSC sleep & wake votes MIME-Version: 1.0 Message-Id: <20230531-topic-rsc-v1-4-b4a985f57b8b@linaro.org> References: <20230531-topic-rsc-v1-0-b4a985f57b8b@linaro.org> In-Reply-To: <20230531-topic-rsc-v1-0-b4a985f57b8b@linaro.org> To: Andy Gross , Bjorn Andersson , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Melody Olvera , Vinod Koul , Richard Acayan , Lina Iyer , Douglas Anderson , Neil Armstrong , Abel Vesa , Sai Prakash Ranjan Cc: Marijn Suijten , Bartosz Golaszewski , Luca Weiss , linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Andy Gross , Konrad Dybcio , Konrad Dybcio X-Mailer: b4 0.12.2 X-Developer-Signature: v=1; a=ed25519-sha256; t=1685539362; l=971; i=konrad.dybcio@linaro.org; s=20230215; h=from:subject:message-id; bh=cKOapMBIii+fL2wQU7lC3ue35ogY5raQDF5oY+5d6gw=; b=Q+osHJ0Dqpj6i+/TSyJc4+DBCPPXg5metQbQTebGzUk2lqRBcOQyi8USKRHKdlq+j4gEQhgdR SHePggS83qYD+dUfe9fvU4uvSt41aCOOXwmBhE1R0KOjYW0ePJB5nc3 X-Developer-Key: i=konrad.dybcio@linaro.org; a=ed25519; pk=iclgkYvtl2w05SSXO5EjjSYlhFKsJ+5OSZBjOkQuEms= Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org The rpmh driver will cache sleep and wake votes until the cluster power-domain is about to enter idle, to avoid unnecessary writes. So associate the apps_rsc with the cluster pd, so that it can be notified about this event. Without this, only AMC votes are being commited. Fixes: 8575f197b077 ("arm64: dts: qcom: Introduce the SC8180x platform") Signed-off-by: Konrad Dybcio --- arch/arm64/boot/dts/qcom/sc8180x.dtsi | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/arm64/boot/dts/qcom/sc8180x.dtsi b/arch/arm64/boot/dts/qcom/sc8180x.dtsi index e8613a00fcab..573c542b1ce8 100644 --- a/arch/arm64/boot/dts/qcom/sc8180x.dtsi +++ b/arch/arm64/boot/dts/qcom/sc8180x.dtsi @@ -3495,6 +3495,7 @@ apps_rsc: rsc@18200000 { , ; label = "apps_rsc"; + power-domains = <&CLUSTER_PD>; apps_bcm_voter: bcm-voter { compatible = "qcom,bcm-voter"; From patchwork Wed May 31 13:22:40 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Konrad Dybcio X-Patchwork-Id: 687500 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 79C5EC77B73 for ; Wed, 31 May 2023 13:23:15 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236413AbjEaNXN (ORCPT ); Wed, 31 May 2023 09:23:13 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43588 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236381AbjEaNXJ (ORCPT ); Wed, 31 May 2023 09:23:09 -0400 Received: from mail-lf1-x133.google.com (mail-lf1-x133.google.com [IPv6:2a00:1450:4864:20::133]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BBC7E189 for ; Wed, 31 May 2023 06:22:55 -0700 (PDT) Received: by mail-lf1-x133.google.com with SMTP id 2adb3069b0e04-4f3a873476bso6519818e87.1 for ; Wed, 31 May 2023 06:22:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1685539374; x=1688131374; 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=tol9A9dtGHcljHA66FOclMfTsKdcHJMB2d8cTDTmgAo=; b=e8Y3CLw/f/V4tCjLk1sQ6W6ZugdpMnijFSP/xU/Zw4cfrLClvUO5rS1mwdooroa7HP aYZhKvFzszVsXp0/L0XXYUmeYzsSDa413Tjwq9pAcjFzZXw/0wmncxulUAvxbICTvO99 qMC7AG9eQm84UQOXechsyf0gDG28MU9tgLrrxlVqF6+1IpIaTxs3Be/n4cKpIHwi7BMm V4qPwqlWmoU+/IZ0YaIT5Tzba1mEFsxCWOyJmh6ZYsi91KEg6y3cSrQ7auLzCQK6bGgR 4lAFndm8NkPFAOejA7MbLy9bt3WJU1QPuJhhnrSJEHVFC3Lfez8pfD1VGveB0kK1wXIw xaFA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1685539374; x=1688131374; 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=tol9A9dtGHcljHA66FOclMfTsKdcHJMB2d8cTDTmgAo=; b=O8ETelcaEOt/JeUz0KOMTg4s0sML/VanrJW/EvJyEZ701lDNHKyWvS/oTBNXImMYfy xvN84ji6TESB0SGappYGQvL4m1/bDLUKL/Zxwx/duROEiJUCYtJpdDN1fPzhrbKJSDIE +e0d/CGDWs+jMtFyIK7ENRzmicUExEunCfOoQ/+JqtmpqflsZoeDvIBOSk/V5F6z/DUR JF2fcVO1GSQX1QyaynoR/pfDZrxDXgfUBge8twcPr52FVI6W3vd/OAZ3ugSr2RYeu0AC GI4tU/isHwvkZYSan5BEBChHVVllQM78HQV5nku4CYWJsn2yHSV6ojQKf2pLoQlpntZO 2/9A== X-Gm-Message-State: AC+VfDycF/Ir5jK2L0k4Vz1kEEwqBhkeh6N+2Hk0u4aiMigYRDhxpr/N vnStzf2wtsIJkzEyCy//BxqHPQ== X-Google-Smtp-Source: ACHHUZ4wr1et8fG1AVns6Kla1jezuM1cYJt+yFsgoC5YdDjgAGfzwcT0T/8h6i/9aWAnZ6p2cMA5dg== X-Received: by 2002:a19:ac45:0:b0:4f3:b1e6:4b46 with SMTP id r5-20020a19ac45000000b004f3b1e64b46mr2632154lfc.12.1685539373825; Wed, 31 May 2023 06:22:53 -0700 (PDT) Received: from [192.168.1.101] (abyj77.neoplus.adsl.tpnet.pl. [83.9.29.77]) by smtp.gmail.com with ESMTPSA id w8-20020ac24428000000b004eb0c51780bsm720138lfl.29.2023.05.31.06.22.52 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 31 May 2023 06:22:53 -0700 (PDT) From: Konrad Dybcio Date: Wed, 31 May 2023 15:22:40 +0200 Subject: [PATCH 6/8] arm64: dts: qcom: sdm845: Flush RSC sleep & wake votes MIME-Version: 1.0 Message-Id: <20230531-topic-rsc-v1-6-b4a985f57b8b@linaro.org> References: <20230531-topic-rsc-v1-0-b4a985f57b8b@linaro.org> In-Reply-To: <20230531-topic-rsc-v1-0-b4a985f57b8b@linaro.org> To: Andy Gross , Bjorn Andersson , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Melody Olvera , Vinod Koul , Richard Acayan , Lina Iyer , Douglas Anderson , Neil Armstrong , Abel Vesa , Sai Prakash Ranjan Cc: Marijn Suijten , Bartosz Golaszewski , Luca Weiss , linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Andy Gross , Konrad Dybcio , Konrad Dybcio X-Mailer: b4 0.12.2 X-Developer-Signature: v=1; a=ed25519-sha256; t=1685539362; l=956; i=konrad.dybcio@linaro.org; s=20230215; h=from:subject:message-id; bh=Ji2UGqd5wvE0QH520QUaPwq9VzlZOXRjNLOcK3RP5/U=; b=7BHvx2rPgpUf4NGxNs3Ob3YsDzbMYUXZaXhT4iudfbPuf7mxO1f4JTGjJOz4Djv+l7lVa47md ups4U6P+9cuASntmk4hnty2tNaFVYB7hiRjRBwJqPR3fS/DrU543Qi8 X-Developer-Key: i=konrad.dybcio@linaro.org; a=ed25519; pk=iclgkYvtl2w05SSXO5EjjSYlhFKsJ+5OSZBjOkQuEms= Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org The rpmh driver will cache sleep and wake votes until the cluster power-domain is about to enter idle, to avoid unnecessary writes. So associate the apps_rsc with the cluster pd, so that it can be notified about this event. Without this, only AMC votes are being commited. Fixes: c83545d95376 ("arm64: dts: sdm845: Add rpmh-rsc node") Signed-off-by: Konrad Dybcio --- arch/arm64/boot/dts/qcom/sdm845.dtsi | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/arm64/boot/dts/qcom/sdm845.dtsi b/arch/arm64/boot/dts/qcom/sdm845.dtsi index 950305aad44d..707550ef4990 100644 --- a/arch/arm64/boot/dts/qcom/sdm845.dtsi +++ b/arch/arm64/boot/dts/qcom/sdm845.dtsi @@ -5138,6 +5138,7 @@ apps_rsc: rsc@179c0000 { , , ; + power-domains = <&CLUSTER_PD>; apps_bcm_voter: bcm-voter { compatible = "qcom,bcm-voter"; From patchwork Wed May 31 13:22:42 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Konrad Dybcio X-Patchwork-Id: 687499 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 1EA98C77B73 for ; Wed, 31 May 2023 13:23:23 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236398AbjEaNXS (ORCPT ); Wed, 31 May 2023 09:23:18 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44026 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236422AbjEaNXK (ORCPT ); Wed, 31 May 2023 09:23:10 -0400 Received: from mail-lf1-x129.google.com (mail-lf1-x129.google.com [IPv6:2a00:1450:4864:20::129]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id F0E111AD for ; Wed, 31 May 2023 06:22:58 -0700 (PDT) Received: by mail-lf1-x129.google.com with SMTP id 2adb3069b0e04-4f4e71a09a7so1225761e87.1 for ; Wed, 31 May 2023 06:22:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1685539377; x=1688131377; 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=xFK+Ou6t+IM+Z0lJFsVgxMPKX7db6qU21GRYqBnVGs8=; b=xheckUJTFHHmw4+nyIEBDwWhPOuL3vNKlQo5u212RJIkGqB0ZD30MnU7ZHr5rC/T4u MrR4IesMXrVF2zTudxQF/tx/VlT3exAyrfdtPMtHmFleB2shWS5Z1IHFzUDcy+Okd8fm ud/KpK48LlzoZWJY3QwpGOa7VhapJvoik6tUP1WAmT5bbv8gLgsIDzgekdghaBBg9TcR l901P//oMpyKUdJ1dwtjVYMRJVFMfBhhP0P335oOalSNIQcaolStpPTFoTM+Q+lanTWp qLeuRVO10oKbCP/2izLOCoMb/Os8AHwyB2V6duXywxrqzTsl+W4iDd0uDDhqYcmlZFEV qVvQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1685539377; x=1688131377; 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=xFK+Ou6t+IM+Z0lJFsVgxMPKX7db6qU21GRYqBnVGs8=; b=RbFjY2ronNsE1D8jhHjWo5IYKnIuSoCRkmp/7R1Yn7eER1zQ0d/khjbwkzfH1axQ8W JYlrF/PYfHpu+MWKAew7HAcU8EHzRTU/JJKkxYjUjMWSdB6b2DyuvSx06lpvsr2mDB8l ji5tue9Jdrxci6yXxjsbiBwvsrwuq13/PjS5CjJVDmeoJlIlqyZdK9pfa/g3xpbWPX7M cV5zPLM6NW5OGR/LZN0bjR76jurqF+HWIfj8cejSvoUZRxEL1j8vZDLOmj8rLshBUQzX izql8jLfWBcV8SWDDOaO0WtUvFJpTuKyKPPgft32xsb54EmcVs6Bxa7+U/j1Q8UamZLc DZ3Q== X-Gm-Message-State: AC+VfDyXx2scysf0MgM4KdJr/Ye+emnqUZ7abkHYU+0pdpX8fVH2Z9dY efr71GWa3GshB++ozv5yLywcdw== X-Google-Smtp-Source: ACHHUZ4AkcgCPt1BOGb6Lkh6GQHDiODuTCyRIATpixy8K5JY7ZGBzaZZQmjg1UxN8xHAOlOH9yiwVw== X-Received: by 2002:ac2:5df6:0:b0:4f3:b242:aa98 with SMTP id z22-20020ac25df6000000b004f3b242aa98mr1822980lfq.30.1685539377267; Wed, 31 May 2023 06:22:57 -0700 (PDT) Received: from [192.168.1.101] (abyj77.neoplus.adsl.tpnet.pl. [83.9.29.77]) by smtp.gmail.com with ESMTPSA id w8-20020ac24428000000b004eb0c51780bsm720138lfl.29.2023.05.31.06.22.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 31 May 2023 06:22:56 -0700 (PDT) From: Konrad Dybcio Date: Wed, 31 May 2023 15:22:42 +0200 Subject: [PATCH 8/8] arm64: dts: qcom: sm8550: Flush RSC sleep & wake votes MIME-Version: 1.0 Message-Id: <20230531-topic-rsc-v1-8-b4a985f57b8b@linaro.org> References: <20230531-topic-rsc-v1-0-b4a985f57b8b@linaro.org> In-Reply-To: <20230531-topic-rsc-v1-0-b4a985f57b8b@linaro.org> To: Andy Gross , Bjorn Andersson , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Melody Olvera , Vinod Koul , Richard Acayan , Lina Iyer , Douglas Anderson , Neil Armstrong , Abel Vesa , Sai Prakash Ranjan Cc: Marijn Suijten , Bartosz Golaszewski , Luca Weiss , linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Andy Gross , Konrad Dybcio , Konrad Dybcio X-Mailer: b4 0.12.2 X-Developer-Signature: v=1; a=ed25519-sha256; t=1685539362; l=1011; i=konrad.dybcio@linaro.org; s=20230215; h=from:subject:message-id; bh=3LQbT1pkRcM60cyga6zU0z4GuxAMPjHrb5uo6UzkAYI=; b=Qt8SrZzczur1fTmSMEih1/4sXuG2wBrLyUhegwmgObDm6zu6aVcZgfgo883vtVdYv7Eq/MOZp vxQB0wJ3fvZA06kosIaS1r3hX01+7SKs0Mhnoc7nvCKPAnImrnb99XD X-Developer-Key: i=konrad.dybcio@linaro.org; a=ed25519; pk=iclgkYvtl2w05SSXO5EjjSYlhFKsJ+5OSZBjOkQuEms= Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org The rpmh driver will cache sleep and wake votes until the cluster power-domain is about to enter idle, to avoid unnecessary writes. So associate the apps_rsc with the cluster pd, so that it can be notified about this event. Without this, only AMC votes are being commited. Fixes: ffc50b2d3828 ("arm64: dts: qcom: Add base SM8550 dtsi") Signed-off-by: Konrad Dybcio --- arch/arm64/boot/dts/qcom/sm8550.dtsi | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/arm64/boot/dts/qcom/sm8550.dtsi b/arch/arm64/boot/dts/qcom/sm8550.dtsi index 75cd374943eb..6a06373a3779 100644 --- a/arch/arm64/boot/dts/qcom/sm8550.dtsi +++ b/arch/arm64/boot/dts/qcom/sm8550.dtsi @@ -3621,6 +3621,7 @@ apps_rsc: rsc@17a00000 { qcom,drv-id = <2>; qcom,tcs-config = , , , ; + power-domains = <&CLUSTER_PD>; apps_bcm_voter: bcm-voter { compatible = "qcom,bcm-voter";