From patchwork Wed Dec 11 15:43:43 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ulf Hansson X-Patchwork-Id: 181275 Delivered-To: patches@linaro.org Received: by 2002:a92:3001:0:0:0:0:0 with SMTP id x1csp702043ile; Wed, 11 Dec 2019 07:44:15 -0800 (PST) X-Received: by 2002:a2e:3c1a:: with SMTP id j26mr2544241lja.79.1576079055272; Wed, 11 Dec 2019 07:44:15 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1576079055; cv=none; d=google.com; s=arc-20160816; b=nueWwHuhW+6IpU9LzYj2276nA8o6z3MXitQOGeF1krWpLWzLvB4P5jDHOHndrS9gkx E0GXjGqCEGVyxJwZe0mz2+wdcfdnaBCEkacGFyzqOIUpfqsr7HqOEoNtmuLACTRL4riL nEwwWJIQYQ5pfRN3Z3YdZBOPFL9d+ihas+chkWlySKnXFkreGFLCmBT67Hm7ovCRyPj2 rwPggjWAWvdod1uAPrQ1AIaYNH1yI1DDS17hbleNNx9mCX16MQoOpsxnL5hCFQo2mvF9 /cRDG6Y9iXaAElMfJQLXQDNme2jBFHJSFB/lkW+QVPINOtDvlYcwSEVZkYbTDb497BXE pa2w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=57/Z02+ucp7qKhXMSKtjmCrn1ezz0VtvAepCcM3y9Cc=; b=xL7A6JgvZb2/TRujGuKHCgma7YTk7ACHehBi7k+gbHxX9eDUlacelb0Sbl8XsDmcTE GB2T/L93T/VI1m1Bhf7JBMFVcOqQRTv4V4bH+OSdBSsfbV7Dg22IA9iH34WtO9ylUMxn JRUBKFhxOhwUwg8AnB+pcpZVV8RE0LmYaH5odOuILMcstPsGsRc89dpUQaKQv4985AMP jzGziZU3NH1DvM38SM0gL6mqr9yrMKJuMWGfFkkGhH7cmonmkX1wsFLQPzZWcYyylS9p DbYMLjNf0bTA/+EO5x9/LCcEUJ9Agv2m3HcSeD70kH9ERW55vGbgUMrz6ipJfI1T1IrP G5/A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=HxhRgIlM; spf=pass (google.com: domain of ulf.hansson@linaro.org designates 209.85.220.65 as permitted sender) smtp.mailfrom=ulf.hansson@linaro.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from mail-sor-f65.google.com (mail-sor-f65.google.com. [209.85.220.65]) by mx.google.com with SMTPS id x21sor1659032lji.44.2019.12.11.07.44.15 for (Google Transport Security); Wed, 11 Dec 2019 07:44:15 -0800 (PST) Received-SPF: pass (google.com: domain of ulf.hansson@linaro.org designates 209.85.220.65 as permitted sender) client-ip=209.85.220.65; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=HxhRgIlM; spf=pass (google.com: domain of ulf.hansson@linaro.org designates 209.85.220.65 as permitted sender) smtp.mailfrom=ulf.hansson@linaro.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org 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; bh=57/Z02+ucp7qKhXMSKtjmCrn1ezz0VtvAepCcM3y9Cc=; b=HxhRgIlMOIogsf/2YoKGG7lRsb3JKtwXbwg/B+A9tR9+NMsIdFtsixap/nqd8MoTzl GrsbrUO2vFmbPPehEfbKpSxV4uRB5sF4pttcQGE99l4RzImTKaTkL0IcD36XP4L7dJ/Z uOmVdMlWnzD/2tACIb9pT5g95D31moKGr2rPMGIAA/K+0+7tNSoIGnEOij7XTsdzCqer 8pCULS86IVVXtAU2cZTeDeXSfa2471IKM+MKNCENeTwL9O5RjcszBs2eWIt4fiRulCqz ID9ddiWjUdxsimsGUzcppKKFQCiwiP0R+vH4htW5jcYdC+0JVhykOaS0qCE4RupNX0TO CiKg== 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; bh=57/Z02+ucp7qKhXMSKtjmCrn1ezz0VtvAepCcM3y9Cc=; b=so+LIZ9LBwRpbvw5dlizFXYpQCGvdVep+Vfl6DTjFwSt6UyKDgKFrWa8PCEFYkxH1u SRjzM0Gn8LG/tg179eLeqU6mERlT7bC2+y7hpgwGQVXWTryVXxs7nsYuxjC/Cg6W0jQe mryTuuQonmNgX+7aGsGinei3U7j7fU++DEJWR0mUxZF9I37D5/k9TM8bNWkD0DTf0/ip c2Fw7HBSEetuNt72Y/m/nT7yR7enQvJzGEi4QHTil1EQEJ3G9hoi2YK72r1Cnx8xkT4b 5XFfA5jLMEEInD4Bd7VvSC9v7PdejoPGbGVxVW+aCZWe1I1gGhGKftQ6665Dko/VRGbU f9lg== X-Gm-Message-State: APjAAAXsqT7X16znpKJXd/Kf1a7y6LBQLqpAQMFizh3Z4Y3FyQ6ugja+ cDfCr+gc6UPeLZ1DkF/d8gpgyynu X-Google-Smtp-Source: APXvYqyzctDkVvnOP0bzJjLRPlg3nz19kJBie5gSq1vN5AM9HWkLvEF/wbc9WcyDRH9/GLpw3TU3WQ== X-Received: by 2002:a2e:97cf:: with SMTP id m15mr2609300ljj.130.1576079054866; Wed, 11 Dec 2019 07:44:14 -0800 (PST) Return-Path: Received: from localhost.localdomain (h-158-174-22-210.NA.cust.bahnhof.se. [158.174.22.210]) by smtp.gmail.com with ESMTPSA id b14sm1389608lff.68.2019.12.11.07.44.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 11 Dec 2019 07:44:14 -0800 (PST) From: Ulf Hansson To: Sudeep Holla , Lorenzo Pieralisi , Rob Herring , linux-pm@vger.kernel.org Cc: "Rafael J . Wysocki" , Daniel Lezcano , Mark Rutland , Lina Iyer , Vincent Guittot , Stephen Boyd , Andy Gross , Bjorn Andersson , Kevin Hilman , Ulf Hansson , linux-arm-kernel@lists.infradead.org, linux-arm-msm@vger.kernel.org, Lina Iyer Subject: [PATCH v4 14/14] arm64: dts: Convert to the hierarchical CPU topology layout for MSM8916 Date: Wed, 11 Dec 2019 16:43:43 +0100 Message-Id: <20191211154343.29765-15-ulf.hansson@linaro.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20191211154343.29765-1-ulf.hansson@linaro.org> References: <20191211154343.29765-1-ulf.hansson@linaro.org> To enable the OS to better support PSCI OS initiated CPU suspend mode, let's convert from the flattened layout to the hierarchical layout. In the hierarchical layout, let's create a power domain provider per CPU and describe the idle states for each CPU inside the power domain provider node. To group the CPUs into a cluster, let's add another power domain provider and make it act as the master domain. Note that, the CPU's idle states remains compatible with "arm,idle-state", while the cluster's idle state becomes compatible with "domain-idle-state". Co-developed-by: Lina Iyer Signed-off-by: Lina Iyer Signed-off-by: Ulf Hansson --- Changes in v4: - None. --- arch/arm64/boot/dts/qcom/msm8916.dtsi | 57 +++++++++++++++++++++++++-- 1 file changed, 53 insertions(+), 4 deletions(-) -- 2.17.1 diff --git a/arch/arm64/boot/dts/qcom/msm8916.dtsi b/arch/arm64/boot/dts/qcom/msm8916.dtsi index 8686e101905c..282c36c8fa3b 100644 --- a/arch/arm64/boot/dts/qcom/msm8916.dtsi +++ b/arch/arm64/boot/dts/qcom/msm8916.dtsi @@ -102,10 +102,11 @@ reg = <0x0>; next-level-cache = <&L2_0>; enable-method = "psci"; - cpu-idle-states = <&CPU_SLEEP_0>; clocks = <&apcs>; operating-points-v2 = <&cpu_opp_table>; #cooling-cells = <2>; + power-domains = <&CPU_PD0>; + power-domain-names = "psci"; }; CPU1: cpu@1 { @@ -114,10 +115,11 @@ reg = <0x1>; next-level-cache = <&L2_0>; enable-method = "psci"; - cpu-idle-states = <&CPU_SLEEP_0>; clocks = <&apcs>; operating-points-v2 = <&cpu_opp_table>; #cooling-cells = <2>; + power-domains = <&CPU_PD1>; + power-domain-names = "psci"; }; CPU2: cpu@2 { @@ -126,10 +128,11 @@ reg = <0x2>; next-level-cache = <&L2_0>; enable-method = "psci"; - cpu-idle-states = <&CPU_SLEEP_0>; clocks = <&apcs>; operating-points-v2 = <&cpu_opp_table>; #cooling-cells = <2>; + power-domains = <&CPU_PD2>; + power-domain-names = "psci"; }; CPU3: cpu@3 { @@ -138,10 +141,11 @@ reg = <0x3>; next-level-cache = <&L2_0>; enable-method = "psci"; - cpu-idle-states = <&CPU_SLEEP_0>; clocks = <&apcs>; operating-points-v2 = <&cpu_opp_table>; #cooling-cells = <2>; + power-domains = <&CPU_PD3>; + power-domain-names = "psci"; }; L2_0: l2-cache { @@ -161,12 +165,57 @@ min-residency-us = <2000>; local-timer-stop; }; + + CLUSTER_RET: cluster-retention { + compatible = "domain-idle-state"; + arm,psci-suspend-param = <0x41000012>; + entry-latency-us = <500>; + exit-latency-us = <500>; + min-residency-us = <2000>; + }; + + CLUSTER_PWRDN: cluster-gdhs { + compatible = "domain-idle-state"; + arm,psci-suspend-param = <0x41000032>; + entry-latency-us = <2000>; + exit-latency-us = <2000>; + min-residency-us = <6000>; + }; }; }; psci { compatible = "arm,psci-1.0"; method = "smc"; + + CPU_PD0: cpu-pd0 { + #power-domain-cells = <0>; + power-domains = <&CLUSTER_PD>; + domain-idle-states = <&CPU_SLEEP_0>; + }; + + CPU_PD1: cpu-pd1 { + #power-domain-cells = <0>; + power-domains = <&CLUSTER_PD>; + domain-idle-states = <&CPU_SLEEP_0>; + }; + + CPU_PD2: cpu-pd2 { + #power-domain-cells = <0>; + power-domains = <&CLUSTER_PD>; + domain-idle-states = <&CPU_SLEEP_0>; + }; + + CPU_PD3: cpu-pd3 { + #power-domain-cells = <0>; + power-domains = <&CLUSTER_PD>; + domain-idle-states = <&CPU_SLEEP_0>; + }; + + CLUSTER_PD: cluster-pd { + #power-domain-cells = <0>; + domain-idle-states = <&CLUSTER_RET>, <&CLUSTER_PWRDN>; + }; }; pmu {