From patchwork Thu Nov 29 17:46:59 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ulf Hansson X-Patchwork-Id: 152450 Delivered-To: patches@linaro.org Received: by 2002:a2e:299d:0:0:0:0:0 with SMTP id p29-v6csp2672750ljp; Thu, 29 Nov 2018 09:47:55 -0800 (PST) X-Received: by 2002:a19:200b:: with SMTP id g11mr1629857lfg.58.1543513675556; Thu, 29 Nov 2018 09:47:55 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1543513675; cv=none; d=google.com; s=arc-20160816; b=QNCwTNcs4PQLS4ikvn5WlurBykoEesCoCog+6rBaKJkTpGYkUdIx5aHSKwukZ0aOe0 8vC2tX26/lJj0m9UsGZU4eTmAq198iSAQ/Z8WavPgH8apHTYGOqW251PC/CpsNqQWB2s FkiEsnT4xzJ5rB0aaoPHMC0Nec6FB8kVzrJnMLC0TiNjD5u3/8BVgeUN+mEnIa511WXr nk9dMJhjVqo+3fZ6DV3WC2v3pFa2znC8l77FLTlaTc9G/NgSXEk93hCNeiBe/oNz06aB W/9qpO20oANiixUaANXWuVzhPeMWT2wxiI+ZPsxYtqDhGxToUM9QS9KSUZeNpknHXzfx wKEQ== 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=Qhm2IiUZApJ/TAq2ykdaaOR5m9yofOsDK7mxY+y8g9A=; b=s/CYrauXZ1cDunHEbyeIdXaHjcfZemcAwhI5kbxvCReU2czu7cf7SGcMVeZnu2T5t9 LJgQcrSr6LHtq4/XtIe5xQqtUJ3ihxr8R/oqKuNaDjEeaBGS2c9M4uMow4eBfRSrHdoU xHN6lLey5qNgLxPLN5YzUJ3KOyZVqJ5LUUoYgyeT8+qxGR7nUsPAZjCrMFF+8zXiD0e3 Uri7TmM5YDbUSsh70pVLsDD/Qk+BxiYV4hyEFq2hebzvAThYC3DLeA0fZZt2eDLDetOn J0sfg44DVCH8B3DiPDdohz/JWSyK1XwXf0Vu68eNpjvvMD4xH7z29PJdrgzLO7yC3qeN VNRA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=f1AF3JDL; 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 v15-v6sor1769556ljj.43.2018.11.29.09.47.55 for (Google Transport Security); Thu, 29 Nov 2018 09:47:55 -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=f1AF3JDL; 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=Qhm2IiUZApJ/TAq2ykdaaOR5m9yofOsDK7mxY+y8g9A=; b=f1AF3JDLkqgKfUHBCg9Mlk5vpshh2imO1hpXNe/KWlxh0ZKLVnssZTlbDOENbV7aeJ KqsGLAj5CWrkGjuCTQpzFxwYqwNbzolo4Dl4XL5+HnFiOQTJ4kXyTWJw7WFVYu5mgsT8 /LpslPfUFTqndoYSJljDH6vvWB8L4zHCOtmdI= 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=Qhm2IiUZApJ/TAq2ykdaaOR5m9yofOsDK7mxY+y8g9A=; b=mHG42BBmi9X7yvuKogeZdaCYtkpcd2v3b775zhNDB6HS91r6QhwcYMTKFAZUwaP6TS x+s2v9hqAbil/r1y+8lF85Y5aGUBYQ/sINz0CriHFdAgZ9biX9pf1tuFe+D/GtNX0oIx UJ93YYF/BfhC0Q731ylDU/hUL0v+HrREg4A0nB0v3mLkCwRwjGTvOLgSaBwroQf2egVf XXqmEjJ09sYFob9EX8FIyGDET+q1wCm3Iji/1SIFw/3MlmV7WR9ZYR8U8ZVlhQ4KkFQQ vABaLCMCtrCm2Litb2/EjEtdrwk+1DZqk57m9ZrHeHpdnJlW+mcsou1uIAyO3WQuRG4h 9uww== X-Gm-Message-State: AA+aEWZep9vXANo7HyjJs/TOFnq66tJhD1rUM2OOMgvOfQDWF/4G/Z1p LmvDm3SRQtpL4OysTW4CbZYiRuv9 X-Google-Smtp-Source: AFSGD/VpdNjWwHYOSKVaOwFj+iKJH8+CQrAUJfEIVXU94bMoGWr9Vi7reDmC0tycSePMwDsONANRFw== X-Received: by 2002:a2e:5b1d:: with SMTP id p29-v6mr1717026ljb.176.1543513675268; Thu, 29 Nov 2018 09:47:55 -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 j76-v6sm393983ljb.12.2018.11.29.09.47.53 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 29 Nov 2018 09:47:54 -0800 (PST) From: Ulf Hansson To: "Rafael J . Wysocki" , Sudeep Holla , Lorenzo Pieralisi , Mark Rutland , Daniel Lezcano , linux-pm@vger.kernel.org Cc: "Raju P . L . S . S . S . N" , Stephen Boyd , Tony Lindgren , Kevin Hilman , Lina Iyer , Ulf Hansson , Viresh Kumar , Vincent Guittot , Geert Uytterhoeven , linux-arm-kernel@lists.infradead.org, linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org, Lina Iyer , Andy Gross , David Brown Subject: [PATCH v10 26/27] arm64: dts: Convert to the hierarchical CPU topology layout for MSM8916 Date: Thu, 29 Nov 2018 18:46:59 +0100 Message-Id: <20181129174700.16585-27-ulf.hansson@linaro.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20181129174700.16585-1-ulf.hansson@linaro.org> References: <20181129174700.16585-1-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 triggers 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 --- Changes in v10: - Added power-domain-names property to the CPU nodes, as to avoid possible future churns, if ever multiple power-domains specifiers. --- 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 d302d8d639a1..cfafce4bfdf0 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 0>; 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 0>; 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 0>; 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 0>; 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 {