From patchwork Fri Mar 3 21:48:13 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lina Iyer X-Patchwork-Id: 94874 Delivered-To: patch@linaro.org Received: by 10.140.82.71 with SMTP id g65csp443129qgd; Fri, 3 Mar 2017 13:55:52 -0800 (PST) X-Received: by 10.84.208.102 with SMTP id f35mr7418551plh.19.1488578152067; Fri, 03 Mar 2017 13:55:52 -0800 (PST) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id l3si11644861pgl.298.2017.03.03.13.55.51; Fri, 03 Mar 2017 13:55:52 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-arm-msm-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org; spf=pass (google.com: best guess record for domain of linux-arm-msm-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-arm-msm-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752304AbdCCVzo (ORCPT + 9 others); Fri, 3 Mar 2017 16:55:44 -0500 Received: from mail-pg0-f48.google.com ([74.125.83.48]:34116 "EHLO mail-pg0-f48.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752306AbdCCVzm (ORCPT ); Fri, 3 Mar 2017 16:55:42 -0500 Received: by mail-pg0-f48.google.com with SMTP id 77so3699035pgc.1 for ; Fri, 03 Mar 2017 13:55:42 -0800 (PST) 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=eCxvmbPu1OWzznUYiDOu9aLq4Cn4TAdcm0rc0g+TdRQ=; b=eULB9TJpSF9kUqR4t/acEajpsG6rdnZ3TUQD7WxDyRwBxcDzwGn//tnNugslanaD0T HMbP18efaaBmYNsqJZbD7O7Ml1B5rVsXn3UdvqKU4Kf79Zd+luLsjDbfGMjZvbDtXnDr cYWoZCBxbzmdXvZzmvBGh1eewnwFU8lp3TOS4= 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=eCxvmbPu1OWzznUYiDOu9aLq4Cn4TAdcm0rc0g+TdRQ=; b=YABg1/K9UBfRegPMdQ/QDzCMbspVsyz7WPRclLXVJRFtVupnJpx7FVx/EW0rrvuy6M 0igna4plmr5swVzBWMio/GssCb/ICThx/wNC5nYeuESEPZB6HI9brJ9Ve/kewsaZaFLc n9KXuEETO3LDAoaSe/sJvWiVE6OJeUVGfRU6JQZO8d5x8NTqH0PSLXCes430oXFsUUYO rMtj/Hs9vLPAeDIX4CC6n68imXMSojBZdODipyYGeaORTOaFbs2Xu5vebffUgbLERlX/ sBzeglxZ7QELiJX0AI2B7WUVD5rKmp0chxL1juq8MnDYTMFDXneAhSuW8ZcTy+6Kmqxp /JFw== X-Gm-Message-State: AMke39n83N/os3JsI7C1lEz5ijlhk6EYfBIYg0WZDj157GumgjSTGIV9ihuunbl/JkVCYMtZ X-Received: by 10.99.99.1 with SMTP id x1mr5893699pgb.134.1488577707002; Fri, 03 Mar 2017 13:48:27 -0800 (PST) Received: from ubuntu.localdomain (i-global254.qualcomm.com. [199.106.103.254]) by smtp.gmail.com with ESMTPSA id q23sm25200585pfg.63.2017.03.03.13.48.24 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 03 Mar 2017 13:48:25 -0800 (PST) From: Lina Iyer To: ulf.hansson@linaro.org, khilman@kernel.org, rjw@rjwysocki.net, linux-pm@vger.kernel.org, linux-arm-kernel@lists.infradead.org Cc: andy.gross@linaro.org, sboyd@codeaurora.org, linux-arm-msm@vger.kernel.org, brendan.jackman@arm.com, lorenzo.pieralisi@arm.com, sudeep.holla@arm.com, Juri.Lelli@arm.com, Lina Iyer , Mark Rutland Subject: [PATCH V5 2/6] drivers: firmware: psci: Allow OS Initiated suspend mode Date: Fri, 3 Mar 2017 13:48:13 -0800 Message-Id: <1488577697-127445-3-git-send-email-lina.iyer@linaro.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1488577697-127445-1-git-send-email-lina.iyer@linaro.org> References: <1488577697-127445-1-git-send-email-lina.iyer@linaro.org> Sender: linux-arm-msm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org PSCI firmware v1.0 onwards may support 2 different modes for CPU_SUSPEND. Platform coordinated mode is the default and every firmware should support it. OS Initiated mode is optional for the firmware to implement and allow Linux to make an better decision on the state of the CPU cluster heirarchy. With the kernel capable of deciding the state for CPU cluster and coherency domains, the OS Initiated mode may now be used by the kernel, provided the firmware supports it. SET_SUSPEND_MODE is a PSCI function available on v1.0 onwards and can be used to set the mode in the firmware. Cc: Lorenzo Pieralisi Cc: Mark Rutland Signed-off-by: Lina Iyer [Ulf: Rebased on 4.7 rc1] Signed-off-by: Ulf Hansson --- drivers/firmware/psci.c | 42 +++++++++++++++++++++++++++++------------- include/uapi/linux/psci.h | 5 +++++ 2 files changed, 34 insertions(+), 13 deletions(-) -- 2.7.4 -- To unsubscribe from this list: send the line "unsubscribe linux-arm-msm" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/drivers/firmware/psci.c b/drivers/firmware/psci.c index 6c60a50..ec922b8 100644 --- a/drivers/firmware/psci.c +++ b/drivers/firmware/psci.c @@ -53,6 +53,7 @@ * require cooperation with a Trusted OS driver. */ static int resident_cpu = -1; +static bool psci_has_osi; bool psci_tos_resident_on(int cpu) { @@ -558,9 +559,8 @@ static int __init psci_0_2_init(struct device_node *np) int err; err = get_set_conduit_method(np); - if (err) - goto out_put_node; + return err; /* * Starting with v0.2, the PSCI specification introduced a call * (PSCI_VERSION) that allows probing the firmware version, so @@ -568,11 +568,7 @@ static int __init psci_0_2_init(struct device_node *np) * can be carried out according to the specific version reported * by firmware */ - err = psci_probe(); - -out_put_node: - of_node_put(np); - return err; + return psci_probe(); } /* @@ -584,9 +580,8 @@ static int __init psci_0_1_init(struct device_node *np) int err; err = get_set_conduit_method(np); - if (err) - goto out_put_node; + return err; pr_info("Using PSCI v0.1 Function IDs from DT\n"); @@ -610,15 +605,31 @@ static int __init psci_0_1_init(struct device_node *np) psci_ops.migrate = psci_migrate; } -out_put_node: - of_node_put(np); return err; } +static int __init psci_1_0_init(struct device_node *np) +{ + int ret; + + ret = psci_0_2_init(np); + if (ret) + return ret; + + /* Check if PSCI OSI mode is available */ + ret = psci_features(psci_function_id[PSCI_FN_CPU_SUSPEND]); + if (ret & PSCI_1_0_OS_INITIATED) { + if (!psci_features(PSCI_1_0_FN_SET_SUSPEND_MODE)) + psci_has_osi = true; + } + + return 0; +} + static const struct of_device_id psci_of_match[] __initconst = { { .compatible = "arm,psci", .data = psci_0_1_init}, { .compatible = "arm,psci-0.2", .data = psci_0_2_init}, - { .compatible = "arm,psci-1.0", .data = psci_0_2_init}, + { .compatible = "arm,psci-1.0", .data = psci_1_0_init}, {}, }; @@ -627,6 +638,7 @@ int __init psci_dt_init(void) struct device_node *np; const struct of_device_id *matched_np; psci_initcall_t init_fn; + int ret; np = of_find_matching_node_and_match(NULL, psci_of_match, &matched_np); @@ -634,7 +646,11 @@ int __init psci_dt_init(void) return -ENODEV; init_fn = (psci_initcall_t)matched_np->data; - return init_fn(np); + ret = init_fn(np); + + of_node_put(np); + + return ret; } #ifdef CONFIG_ACPI diff --git a/include/uapi/linux/psci.h b/include/uapi/linux/psci.h index 3d7a0fc..7dd778e 100644 --- a/include/uapi/linux/psci.h +++ b/include/uapi/linux/psci.h @@ -48,6 +48,7 @@ #define PSCI_1_0_FN_PSCI_FEATURES PSCI_0_2_FN(10) #define PSCI_1_0_FN_SYSTEM_SUSPEND PSCI_0_2_FN(14) +#define PSCI_1_0_FN_SET_SUSPEND_MODE PSCI_0_2_FN(15) #define PSCI_1_0_FN64_SYSTEM_SUSPEND PSCI_0_2_FN64(14) @@ -93,6 +94,10 @@ #define PSCI_1_0_FEATURES_CPU_SUSPEND_PF_MASK \ (0x1 << PSCI_1_0_FEATURES_CPU_SUSPEND_PF_SHIFT) +#define PSCI_1_0_OS_INITIATED BIT(0) +#define PSCI_1_0_SUSPEND_MODE_PC 0 +#define PSCI_1_0_SUSPEND_MODE_OSI 1 + /* PSCI return values (inclusive of all PSCI versions) */ #define PSCI_RET_SUCCESS 0 #define PSCI_RET_NOT_SUPPORTED -1 From patchwork Fri Mar 3 21:48:15 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lina Iyer X-Patchwork-Id: 94875 Delivered-To: patch@linaro.org Received: by 10.140.82.71 with SMTP id g65csp443204qgd; Fri, 3 Mar 2017 13:56:09 -0800 (PST) X-Received: by 10.98.34.211 with SMTP id p80mr6091579pfj.174.1488578169278; Fri, 03 Mar 2017 13:56:09 -0800 (PST) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id l3si11644861pgl.298.2017.03.03.13.56.09; Fri, 03 Mar 2017 13:56:09 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-arm-msm-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org; spf=pass (google.com: best guess record for domain of linux-arm-msm-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-arm-msm-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752336AbdCCV4I (ORCPT + 9 others); Fri, 3 Mar 2017 16:56:08 -0500 Received: from mail-pf0-f178.google.com ([209.85.192.178]:36038 "EHLO mail-pf0-f178.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752316AbdCCV4I (ORCPT ); Fri, 3 Mar 2017 16:56:08 -0500 Received: by mail-pf0-f178.google.com with SMTP id x66so37109905pfb.3 for ; Fri, 03 Mar 2017 13:56:07 -0800 (PST) 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=LLQLK6gfKneRYNsCbHw6GnSwl9fGy6r9Hg8jLcfeRjk=; b=VSRlHsa+U6REIVwB+GH1yOwbOpszALoZsgwNbPV9oZlnSgsS6py2SuXKcNDUk8hHzU ndCE6LTBASjNch+qkr59iH2Ox6jM+BX/kON3dJXhKG2KE8Su4e/gQs5OjLmtuvydyLoW NdO+0r4KFhNeEAzJNt5/yA3wAknzwcTbn/jm0= 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=LLQLK6gfKneRYNsCbHw6GnSwl9fGy6r9Hg8jLcfeRjk=; b=psL0Tpu28ZzQClzcKa7Q6cXVhBIuOETnhG5k7IPnhKF+tnyMNlbu13f1CTJzi4+QMk k3pmvgkPlj3LVjb/899M//YjtEyxGKr+SZ9iMgf04RPlaT/jYxT2L80+4uA0UovaO9ZY uO74CSneNo9OQ3SPCVPVx3AlmS/bM+9XNmE1k9/LNKnDCiXSFQiY6HJfIaSN7hVT9gL5 iHu4OL5ogOWjobqAFR6FAW1gXJ03KNl7ke4l7r8GRH9/7DHxDVPh7GW9ZfRx+bCa8ODE 5utkupdhrZt9SMPch6HYW48NjKf30/RqbKnJr1rgbwq6css8xSpQSTu4/oj9DH/gMyGA x0Fw== X-Gm-Message-State: AMke39m6CYb+2/+EIo9UH+pUABx4EHkFsD7DEt7SBAwZzMvJFZd0xn+8nXJwhj3vOeY6nHB9 X-Received: by 10.99.146.7 with SMTP id o7mr6013260pgd.6.1488577711601; Fri, 03 Mar 2017 13:48:31 -0800 (PST) Received: from ubuntu.localdomain (i-global254.qualcomm.com. [199.106.103.254]) by smtp.gmail.com with ESMTPSA id q23sm25200585pfg.63.2017.03.03.13.48.29 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 03 Mar 2017 13:48:30 -0800 (PST) From: Lina Iyer To: ulf.hansson@linaro.org, khilman@kernel.org, rjw@rjwysocki.net, linux-pm@vger.kernel.org, linux-arm-kernel@lists.infradead.org Cc: andy.gross@linaro.org, sboyd@codeaurora.org, linux-arm-msm@vger.kernel.org, brendan.jackman@arm.com, lorenzo.pieralisi@arm.com, sudeep.holla@arm.com, Juri.Lelli@arm.com, Lina Iyer Subject: [PATCH V5 4/6] drivers: firmwware: psci: Support hierachical idle states Date: Fri, 3 Mar 2017 13:48:15 -0800 Message-Id: <1488577697-127445-5-git-send-email-lina.iyer@linaro.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1488577697-127445-1-git-send-email-lina.iyer@linaro.org> References: <1488577697-127445-1-git-send-email-lina.iyer@linaro.org> Sender: linux-arm-msm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org Read in the idle state properties for a CPU's idle state from its PM domain, if such a domain exists or use the existing CPU node property. Signed-off-by: Lina Iyer --- drivers/firmware/psci.c | 32 ++++++++++++++++++++++++-------- 1 file changed, 24 insertions(+), 8 deletions(-) -- 2.7.4 -- To unsubscribe from this list: send the line "unsubscribe linux-arm-msm" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/drivers/firmware/psci.c b/drivers/firmware/psci.c index 18ae62d..190d3a7 100644 --- a/drivers/firmware/psci.c +++ b/drivers/firmware/psci.c @@ -292,15 +292,24 @@ static int psci_dt_cpu_init_idle(struct device_node *cpu_node, int cpu) { int i, ret, count = 0; u32 *psci_states; - struct device_node *state_node; - - /* Count idle states */ - while ((state_node = of_parse_phandle(cpu_node, "cpu-idle-states", - count))) { - count++; - of_node_put(state_node); + struct device_node *state_node, *dn; + struct of_phandle_args args; + bool cpu_has_domain = false; + const char *property; + + /* Is there a domain provider for this CPU? */ + ret = of_parse_phandle_with_args(cpu_node, "power-domains", + "#power-domain-cells", 0, &args); + if (!ret) { + dn = args.np; + ret = of_count_phandle_with_args(dn, "domain-idle-states", + NULL); + cpu_has_domain = (ret > 0); } + count = (cpu_has_domain) ? ret : + of_count_phandle_with_args(cpu_node, "cpu-idle-states", NULL); + if (!count) return -ENODEV; @@ -308,10 +317,17 @@ static int psci_dt_cpu_init_idle(struct device_node *cpu_node, int cpu) if (!psci_states) return -ENOMEM; + if (cpu_has_domain) { + property = "domain-idle-states"; + } else { + property = "cpu-idle-states"; + dn = cpu_node; + } + for (i = 0; i < count; i++) { u32 state; - state_node = of_parse_phandle(cpu_node, "cpu-idle-states", i); + state_node = of_parse_phandle(dn, property, i); ret = of_property_read_u32(state_node, "arm,psci-suspend-param", From patchwork Fri Mar 3 21:48:17 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lina Iyer X-Patchwork-Id: 94873 Delivered-To: patch@linaro.org Received: by 10.140.82.71 with SMTP id g65csp443126qgd; Fri, 3 Mar 2017 13:55:51 -0800 (PST) X-Received: by 10.84.241.203 with SMTP id t11mr7426012plm.48.1488578151759; Fri, 03 Mar 2017 13:55:51 -0800 (PST) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id l3si11644861pgl.298.2017.03.03.13.55.51; Fri, 03 Mar 2017 13:55:51 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-arm-msm-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org; spf=pass (google.com: best guess record for domain of linux-arm-msm-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-arm-msm-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752312AbdCCVzn (ORCPT + 9 others); Fri, 3 Mar 2017 16:55:43 -0500 Received: from mail-pg0-f49.google.com ([74.125.83.49]:34850 "EHLO mail-pg0-f49.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752304AbdCCVzm (ORCPT ); Fri, 3 Mar 2017 16:55:42 -0500 Received: by mail-pg0-f49.google.com with SMTP id b129so47949597pgc.2 for ; Fri, 03 Mar 2017 13:55:41 -0800 (PST) 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=ieojVvR1JGs6lkJZj0Qe/O6G7pk3a0MBCyPyJhc5Au8=; b=P3T82Gu7fvG7irvpE4hVg4ETd0ghFsB3eO4/LcvCWRUZU5Vj4IR0n+S58mmkOyLAm0 CHECvhgCbP8WxSTmzuKLAdcwxyRj90LgHlVEUzgQvS1Ei9L/v7RrxobA5EMzeWagDUtp RAAcOON/5pCvINJq9jvRrbi2M6mpVlUhmEJRY= 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=ieojVvR1JGs6lkJZj0Qe/O6G7pk3a0MBCyPyJhc5Au8=; b=DEU8fG8CkIrvrP1Q3/NUTe7VkihbeLyUGhf3kyriE5p5dzRMDQy1hx7XqLx3UINnkG jNxA2+JH78HvL4ypq5ymRTXm/y2MpXAcU+7ZnRpW/XiXEy7St5bGP28EDp50au+Z/Brl fdQSnr/PH8cp7b0eYDlYnSWEexfvQZtM8xuiLW1TWVLTtPahDe2bbK2F3UOKZDrCCTBr fjH3q53HYQRiqj69xe++mONnFGHDL6sDtYil30dPpmIGHDWOebKKA/fx9XvdCSg/U2YK uboyNf78Cbe68D/eclswibb8o8lbYP7S0U0m6ssXCPR+xKk2PLW2CjHwwY8tEmy7j3qP ax1Q== X-Gm-Message-State: AMke39nnWdXYrzNEtfimnahS5AUODBPPbSgWaSbVJghDsJlQhYs7AYN3eMPdaQmZYaER9rfx X-Received: by 10.99.229.5 with SMTP id r5mr2562064pgh.206.1488577716447; Fri, 03 Mar 2017 13:48:36 -0800 (PST) Received: from ubuntu.localdomain (i-global254.qualcomm.com. [199.106.103.254]) by smtp.gmail.com with ESMTPSA id q23sm25200585pfg.63.2017.03.03.13.48.34 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 03 Mar 2017 13:48:35 -0800 (PST) From: Lina Iyer To: ulf.hansson@linaro.org, khilman@kernel.org, rjw@rjwysocki.net, linux-pm@vger.kernel.org, linux-arm-kernel@lists.infradead.org Cc: andy.gross@linaro.org, sboyd@codeaurora.org, linux-arm-msm@vger.kernel.org, brendan.jackman@arm.com, lorenzo.pieralisi@arm.com, sudeep.holla@arm.com, Juri.Lelli@arm.com, Lina Iyer , devicetree@vger.kernel.org Subject: [PATCH V5 6/6] ARM64: dts: Define CPU power domain for MSM8916 Date: Fri, 3 Mar 2017 13:48:17 -0800 Message-Id: <1488577697-127445-7-git-send-email-lina.iyer@linaro.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1488577697-127445-1-git-send-email-lina.iyer@linaro.org> References: <1488577697-127445-1-git-send-email-lina.iyer@linaro.org> Sender: linux-arm-msm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org Define power domain and the power states for the domain as defined by the PSCI firmware. The 8916 firmware supports OS initiated method of powering off the CPU clusters. Cc: Signed-off-by: Lina Iyer --- arch/arm64/boot/dts/qcom/msm8916.dtsi | 53 ++++++++++++++++++++++++++++++++--- 1 file changed, 49 insertions(+), 4 deletions(-) -- 2.7.4 -- To unsubscribe from this list: send the line "unsubscribe linux-arm-msm" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/arch/arm64/boot/dts/qcom/msm8916.dtsi b/arch/arm64/boot/dts/qcom/msm8916.dtsi index f8ff327..ba60276 100644 --- a/arch/arm64/boot/dts/qcom/msm8916.dtsi +++ b/arch/arm64/boot/dts/qcom/msm8916.dtsi @@ -103,7 +103,7 @@ reg = <0x0>; next-level-cache = <&L2_0>; enable-method = "psci"; - cpu-idle-states = <&CPU_SPC>; + power-domains = <&CPU_PD0>; }; CPU1: cpu@1 { @@ -112,7 +112,7 @@ reg = <0x1>; next-level-cache = <&L2_0>; enable-method = "psci"; - cpu-idle-states = <&CPU_SPC>; + power-domains = <&CPU_PD1>; }; CPU2: cpu@2 { @@ -121,7 +121,7 @@ reg = <0x2>; next-level-cache = <&L2_0>; enable-method = "psci"; - cpu-idle-states = <&CPU_SPC>; + power-domains = <&CPU_PD2>; }; CPU3: cpu@3 { @@ -130,7 +130,7 @@ reg = <0x3>; next-level-cache = <&L2_0>; enable-method = "psci"; - cpu-idle-states = <&CPU_SPC>; + power-domains = <&CPU_PD3>; }; L2_0: l2-cache { @@ -147,12 +147,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_PWR_DWN: 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-pd@0 { + #power-domain-cells = <0>; + power-domains = <&CLUSTER_PD>; + domain-idle-states = <&CPU_SPC>; + }; + + CPU_PD1: cpu-pd@1 { + #power-domain-cells = <0>; + power-domains = <&CLUSTER_PD>; + domain-idle-states = <&CPU_SPC>; + }; + + CPU_PD2: cpu-pd@2 { + #power-domain-cells = <0>; + power-domains = <&CLUSTER_PD>; + domain-idle-states = <&CPU_SPC>; + }; + + CPU_PD3: cpu-pd@3 { + #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_PWR_DWN>; + }; }; pmu {