From patchwork Wed Mar 14 16:58:35 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ulf Hansson X-Patchwork-Id: 131694 Delivered-To: patches@linaro.org Received: by 10.80.210.197 with SMTP id q5csp411007edg; Wed, 14 Mar 2018 09:59:48 -0700 (PDT) X-Received: by 2002:a19:1081:: with SMTP id 1-v6mr4138041lfq.86.1521046788677; Wed, 14 Mar 2018 09:59:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1521046788; cv=none; d=google.com; s=arc-20160816; b=AzanabPBmWIyOSrm2PZrstU+12rLe9N+vYDm0O4r9Q9uGKmmMFye/HNiyIl8RpEeoo mjDsW4ijAz6IgRA6pwpk5QCGpoasElAOvXBCx8EaBu94wHms1TCIL2Xt4sih1VUtcIvl 6Z0JmQg9LpJywZuEUeQPA0/nz96cL0qvJi2GUg98JZaNpqGahkPVB8NRl+yZdtpX1+5D lEGfvLoBVEw/OsLYzQiinrm5nSmZ0MszXSNkkcxx7vdYGm6tIJUKEz04UGgXb2fhIlYm xVBGmdCKKYam/+001IyPbX+cioy6ywySjkbFlwsVdHMQVah8L4GYtRQzmuK87+f9Q6zY +Y3Q== 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:arc-authentication-results; bh=a3jkCZvx1U461Q2GeJTWADmT4rq+6YqC8J2+3ScQv1w=; b=xjgBO3Rcomt60s7zbakHpQydMo9RlCLVjlSTxKIX/Y7rPqLTrgDvERFNYFhKnk36IW onHPTW0gwZN8FezvzQOG35gHli8hlOHYFiY7RUactAVjx6jVVpwLj1uILr+OsiulCIYL fsj593Lq4hn0zPPDO7+ktAPjjhomaqcO6mAUWE3rC9xSuwE2Bv0LYlijHPe42ciNEnrK J+c0M34ImqI4ncZ7MBohGoJZNsyr7Eoz1AdGQMOeLBFcF6KhhLp4oiGSxLppobyYAHr4 rE4H1rlHqsEXmRfw3TPtX4p2pzNmUy1WA/M2pSPV9KhqlKsPeN9RYhkSG9WKkdNH/2ZH nuVg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=e3bZuzOn; 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 x5sor826066ljc.95.2018.03.14.09.59.48 for (Google Transport Security); Wed, 14 Mar 2018 09:59:48 -0700 (PDT) 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=e3bZuzOn; 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=a3jkCZvx1U461Q2GeJTWADmT4rq+6YqC8J2+3ScQv1w=; b=e3bZuzOnUm7xyCPYmuWLgM4bc+VwmCrNXy3CM7L9wifhibIxFZhzryB9aJ9u8wyfdx Y06usBSFRdBekiqjrQOe5WCtYB/J7dmf+B0hmRsb53+4vt/LfTJsI7L8tTBGvI95U6Fb vwusqnC+5Bh2OKwbsfeOKKH2NCKnpS5psLu6w= 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=a3jkCZvx1U461Q2GeJTWADmT4rq+6YqC8J2+3ScQv1w=; b=J8a4lrWWqayuWWpAd4f+ciLBs9ZBe/El5dHuJeqoplBAcbj2K1esjn+Db4Xi5qH9YU 0fuHXaaKzRRFjS5oOVt4opWJ6+uWnRRa1U5wCdGuI0kuAqrAxkU4B9S1jbGx1jh3q/t9 TYErlsjDxZ5upnnItzM/QhayGknh712EPKMPL05bljYmeyWGgF5RH/9GeBIzOqOPHLXQ n9KiWPdRNlcbcNFRD1Cdhh69O8UA3+LYQeFEo8Y7KKyTwQK5M+lkwfx5MOkX9dZgfW6y EBZ/qHBSOUd9MtIBj1nnsCijZ3Lvy4bPDkxpataFEW92Ioogrrkj2BpvDVzkDrurCdvR pKUA== X-Gm-Message-State: AElRT7EOe41z/609sEWKiIDY1EDq++THemcAp2Rq8H+YRcZzTqPrKvA5 zGXvcwMjlFy2coJ5BvJIroY9rB7N X-Google-Smtp-Source: AG47ELvqnPQc3sLZ5QQAMHQbEJspnlvOmyenvWMs/vGnqPmEy/G2BOCGc5Zk1VAyALpybNE2djgQ7g== X-Received: by 10.46.87.8 with SMTP id l8mr3392652ljb.116.1521046788392; Wed, 14 Mar 2018 09:59:48 -0700 (PDT) Return-Path: Received: from uffe-XPS-13-9360.ideon.se ([85.235.10.227]) by smtp.gmail.com with ESMTPSA id t24-v6sm724849lfi.30.2018.03.14.09.59.46 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 14 Mar 2018 09:59:47 -0700 (PDT) From: Ulf Hansson To: "Rafael J . Wysocki" , Sudeep Holla , Lorenzo Pieralisi , linux-pm@vger.kernel.org Cc: Kevin Hilman , Lina Iyer , Lina Iyer , Ulf Hansson , Rob Herring , Daniel Lezcano , Thomas Gleixner , Vincent Guittot , Stephen Boyd , Juri Lelli , Geert Uytterhoeven , linux-arm-kernel@lists.infradead.org, linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org, Andy Gross , David Brown Subject: [PATCH v6 25/25] arm64: dts: Convert to the hierarchical CPU topology layout for MSM8916 Date: Wed, 14 Mar 2018 17:58:35 +0100 Message-Id: <1521046715-30683-26-git-send-email-ulf.hansson@linaro.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1521046715-30683-1-git-send-email-ulf.hansson@linaro.org> References: <1521046715-30683-1-git-send-email-ulf.hansson@linaro.org> From: Lina Iyer In the hierarchical layout, we are creating power domains around each CPU and describes the idle states for them inside the power domain provider node. Note that, the CPU's idle states still needs to be compatible with "arm,idle-state". Furthermore, represent the CPU cluster as a separate master power domain, powering the CPU's power domains. The cluster node, contains the idle states for the cluster and each idle state needs to be compatible with the "domain-idle-state". If the running platform is using a PSCI FW that supports the OS initiated CPU suspend mode, which likely should be the case unless the PSCI FW is very old, this change makes the PSCI driver to enable it. Cc: Andy Gross Cc: David Brown Cc: Lina Iyer Signed-off-by: Lina Iyer Co-developed-by: Ulf Hansson Signed-off-by: Ulf Hansson --- arch/arm64/boot/dts/qcom/msm8916.dtsi | 53 ++++++++++++++++++++++++++++++++--- 1 file changed, 49 insertions(+), 4 deletions(-) -- 2.7.4 diff --git a/arch/arm64/boot/dts/qcom/msm8916.dtsi b/arch/arm64/boot/dts/qcom/msm8916.dtsi index e51b049..d0bb0b9 100644 --- a/arch/arm64/boot/dts/qcom/msm8916.dtsi +++ b/arch/arm64/boot/dts/qcom/msm8916.dtsi @@ -112,7 +112,7 @@ reg = <0x0>; next-level-cache = <&L2_0>; enable-method = "psci"; - cpu-idle-states = <&CPU_SPC>; + power-domains = <&CPU_PD0>; }; CPU1: cpu@1 { @@ -121,7 +121,7 @@ reg = <0x1>; next-level-cache = <&L2_0>; enable-method = "psci"; - cpu-idle-states = <&CPU_SPC>; + power-domains = <&CPU_PD1>; }; CPU2: cpu@2 { @@ -130,7 +130,7 @@ reg = <0x2>; next-level-cache = <&L2_0>; enable-method = "psci"; - cpu-idle-states = <&CPU_SPC>; + power-domains = <&CPU_PD2>; }; CPU3: cpu@3 { @@ -139,7 +139,7 @@ reg = <0x3>; next-level-cache = <&L2_0>; enable-method = "psci"; - cpu-idle-states = <&CPU_SPC>; + power-domains = <&CPU_PD3>; }; L2_0: l2-cache { @@ -156,12 +156,57 @@ min-residency-us = <2000>; local-timer-stop; }; + + CLUSTER_RET: cluster-retention { + compatible = "domain-idle-state"; + arm,psci-suspend-param = <0x1000010>; + entry-latency-us = <500>; + exit-latency-us = <500>; + min-residency-us = <2000>; + }; + + CLUSTER_PWRDN: cluster-gdhs { + compatible = "domain-idle-state"; + arm,psci-suspend-param = <0x1000030>; + 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_SPC>; + }; + + CPU_PD1: cpu-pd1 { + #power-domain-cells = <0>; + power-domains = <&CLUSTER_PD>; + domain-idle-states = <&CPU_SPC>; + }; + + CPU_PD2: cpu-pd2 { + #power-domain-cells = <0>; + power-domains = <&CLUSTER_PD>; + domain-idle-states = <&CPU_SPC>; + }; + + CPU_PD3: cpu-pd3 { + #power-domain-cells = <0>; + power-domains = <&CLUSTER_PD>; + domain-idle-states = <&CPU_SPC>; + }; + + CLUSTER_PD: cluster-pd { + #power-domain-cells = <0>; + domain-idle-states = <&CLUSTER_RET>, <&CLUSTER_PWRDN>; + }; }; pmu {