Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp5556001yba; Mon, 13 May 2019 12:57:43 -0700 (PDT) X-Google-Smtp-Source: APXvYqz19Pouy9kikVyr1LDxtVUKDW0HPNDH2FYLeo01vJjHMoltlVQCO9eUQtGu58MvK40ByYEH X-Received: by 2002:a63:4c55:: with SMTP id m21mr33437247pgl.66.1557777462973; Mon, 13 May 2019 12:57:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1557777462; cv=none; d=google.com; s=arc-20160816; b=0OetFGsNbA497ItV69KWw9FzbOeYOvor8kyVzAiSfmTnrUKLejSgLUg3Z2R9V0q1/T 0QeQAGGNcfuALBLPwORhhGkD12WjMR2mK/1k7YjrQuZjty1YN2/5O/HFgHBfP49lUW+y OzDzMUKpEsuWmURiUTl/9R9iAArd6xUJ9MDYj9LBXDAQW8IgZLr7Hvbctu2ejAOWCzld QHKDWJbRJtbqqPDP1ZWTTIKCKH3vG1RQnQQP4Hh9kLQCt4mzBzxDbdaz2eaIyGrUgR3M 44bj9gR+wJXXllpKYB3k+ZNDowjPvNBCf9xyRy0jBoEe9LmqWA1GCfwBWrZzm+sg1dyv Zlmg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature; bh=PDEUjjOBUJS5iHQaBAG+Z33WI0zFNAprAtoJyuCQ0PY=; b=gUqR/tPCNC4lvBWEduEflEzjlfuvmee7Ton1lJDHgaGP9CbheBOQPiBP5nrzg86c/8 dLYe3sPDAGK/1z91B8XQYAGaPIHMsX0V8YXA5RH+om6UVjxHSGCKPAaZmsOhw4jlw3Hk NiYSJqr5N2iP98iROogSKrHF4Yd9lIxftGVFQOwNm5+UHZORbVauH19T9e7PqOiCAxYF OE/ybenK6BzV8M6xLJsYqGJ9sk2GubYPozQKTR4KEUYoxiTGKLoXFOyvBMFGvQWn/J1B P/47hJ6/KVBtfoczKaJVIPGnMexjOHZLCacEK9e6s/loaNU18ctwztWBoZVNzzgX2YZz wN2A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=M21k49y1; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id u3si19645401pfa.128.2019.05.13.12.57.26; Mon, 13 May 2019 12:57:42 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=M21k49y1; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727323AbfEMTan (ORCPT + 99 others); Mon, 13 May 2019 15:30:43 -0400 Received: from mail-lf1-f65.google.com ([209.85.167.65]:40472 "EHLO mail-lf1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727294AbfEMTan (ORCPT ); Mon, 13 May 2019 15:30:43 -0400 Received: by mail-lf1-f65.google.com with SMTP id h13so9939655lfc.7 for ; Mon, 13 May 2019 12:30:40 -0700 (PDT) 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=PDEUjjOBUJS5iHQaBAG+Z33WI0zFNAprAtoJyuCQ0PY=; b=M21k49y1eNn330/lF5JvreEZChjrS2M6ynm3TqPbbn/Q9xiZAzxNCYtv/EuxrqqtMM QGsNsvmFxgy9sSC46EshhJEpWH5Pz4ZTv2l1DCMYxEhHs7XqE1HQbPYe5KlbUPpZoz1u CROTIRFp0MmW7feCctSmkdf9rvOLpD1AHPnKXgEBya6wH+hN4dttUD8c/NIeoCMp+8G5 7LZjDpnxdIB9RSMG00FALVcyBAhvnwEyA3AsG5QE2IRgu2aE+wNxXs4Clt22/rk1KpRQ w4c/YO/4ShYOv7C674P9egAkOJOTIQ8CMoR5T4g9Bnk7vkufWL1z+GXWXR2K+l22GP4M zUnw== 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=PDEUjjOBUJS5iHQaBAG+Z33WI0zFNAprAtoJyuCQ0PY=; b=bJq26zCjlSdZhMXSw3/7Mmd1Me53H64weJbDjudolM8ibfopWDzzGaGxcPFXro1Boj 4lnfCCzTUib/y9Ap1+JOGeHa6AkareIdc/UNrRjk6urn28TafGut8kYZcBbLXco3h+IS 10KdwZUFyjRCrfZnrox9NuGhACplUt9W26ifqhUb6uwD65kzlbNTVhyCZ9MrN8+YiDiu ZaMqc+oH77DATUJWnRFaT7/NLWsU3z67HKskYdyLn0NJRh7GfDQ+/fnRzFqF69n9ednl ztA6fMMuwyQ/HNJYfWts2qPz6JJAuwJsLOwIoEFnhNA162cgRk+FEqNQsxqTyENEC5V0 YYYQ== X-Gm-Message-State: APjAAAXpE6ZBKQ0x+2WIGoo/S6uL6mWYmSu4PRINH0mdE/q+H7UcsVTr 7FK9Swt0JlM6f9wYr6kUPhakZg== X-Received: by 2002:a19:e002:: with SMTP id x2mr15509153lfg.16.1557775417282; Mon, 13 May 2019 12:23:37 -0700 (PDT) Received: from localhost.localdomain (h-158-174-22-210.NA.cust.bahnhof.se. [158.174.22.210]) by smtp.gmail.com with ESMTPSA id q21sm3449365lfa.84.2019.05.13.12.23.35 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 13 May 2019 12:23:36 -0700 (PDT) From: Ulf Hansson To: Sudeep Holla , Lorenzo Pieralisi , Mark Rutland , linux-arm-kernel@lists.infradead.org Cc: "Rafael J . Wysocki" , Daniel Lezcano , "Raju P . L . S . S . S . N" , Amit Kucheria , Bjorn Andersson , Stephen Boyd , Niklas Cassel , Tony Lindgren , Kevin Hilman , Lina Iyer , Viresh Kumar , Vincent Guittot , Geert Uytterhoeven , Souvik Chakravarty , linux-pm@vger.kernel.org, linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org, Lina Iyer , Andy Gross , David Brown , Ulf Hansson Subject: [PATCH 17/18] arm64: dts: Convert to the hierarchical CPU topology layout for MSM8916 Date: Mon, 13 May 2019 21:22:59 +0200 Message-Id: <20190513192300.653-18-ulf.hansson@linaro.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20190513192300.653-1-ulf.hansson@linaro.org> References: <20190513192300.653-1-ulf.hansson@linaro.org> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.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 triggers the PSCI driver to enable it. Cc: Andy Gross Cc: David Brown Signed-off-by: Lina Iyer Co-developed-by: Ulf Hansson Signed-off-by: Ulf Hansson --- Changes: - None. --- arch/arm64/boot/dts/qcom/msm8916.dtsi | 57 +++++++++++++++++++++++++-- 1 file changed, 53 insertions(+), 4 deletions(-) diff --git a/arch/arm64/boot/dts/qcom/msm8916.dtsi b/arch/arm64/boot/dts/qcom/msm8916.dtsi index 0803ca8c02da..1bb33f0326b5 100644 --- a/arch/arm64/boot/dts/qcom/msm8916.dtsi +++ b/arch/arm64/boot/dts/qcom/msm8916.dtsi @@ -110,10 +110,11 @@ reg = <0x0>; next-level-cache = <&L2_0>; enable-method = "psci"; - cpu-idle-states = <&CPU_SPC>; clocks = <&apcs>; operating-points-v2 = <&cpu_opp_table>; #cooling-cells = <2>; + power-domains = <&CPU_PD0>; + power-domain-names = "psci"; }; CPU1: cpu@1 { @@ -122,10 +123,11 @@ reg = <0x1>; next-level-cache = <&L2_0>; enable-method = "psci"; - cpu-idle-states = <&CPU_SPC>; clocks = <&apcs>; operating-points-v2 = <&cpu_opp_table>; #cooling-cells = <2>; + power-domains = <&CPU_PD1>; + power-domain-names = "psci"; }; CPU2: cpu@2 { @@ -134,10 +136,11 @@ reg = <0x2>; next-level-cache = <&L2_0>; enable-method = "psci"; - cpu-idle-states = <&CPU_SPC>; clocks = <&apcs>; operating-points-v2 = <&cpu_opp_table>; #cooling-cells = <2>; + power-domains = <&CPU_PD2>; + power-domain-names = "psci"; }; CPU3: cpu@3 { @@ -146,10 +149,11 @@ reg = <0x3>; next-level-cache = <&L2_0>; enable-method = "psci"; - cpu-idle-states = <&CPU_SPC>; clocks = <&apcs>; operating-points-v2 = <&cpu_opp_table>; #cooling-cells = <2>; + power-domains = <&CPU_PD3>; + power-domain-names = "psci"; }; L2_0: l2-cache { @@ -166,12 +170,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 { -- 2.17.1