From patchwork Thu Oct 10 11:39:37 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ulf Hansson X-Patchwork-Id: 175753 Delivered-To: patch@linaro.org Received: by 2002:ac9:3c86:0:0:0:0:0 with SMTP id w6csp2186643ocf; Thu, 10 Oct 2019 04:40:36 -0700 (PDT) X-Google-Smtp-Source: APXvYqzb1jiUJ/UWBEjgv20hUBav4wgVnkBy2lf/r/23RxHbyVX5nSgTT1ZZUdeYC3aptymqB3+r X-Received: by 2002:a17:906:b24c:: with SMTP id ce12mr7576375ejb.327.1570707636344; Thu, 10 Oct 2019 04:40:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1570707636; cv=none; d=google.com; s=arc-20160816; b=Dmjdr3YzorXGacJcE6KBuPvEEJtunBqPFUgys/aGitWtKKFD9PDudsYDasFv8XIYTt SExa2EiyrOk6noWPrao46NVrkm+v6biIh14e96h/iG2bA44lLmPrl4dtC3T+x0IB7Lzk rpJ1pAuCg7WzsE1UuxO2HI5bMUZt3XA3HA/R0yaxn4WoxcTWsgrKSYr88PPRJatjz2Bt xeItslqDG3k3xXRPNtZf7ySCjvnwELR7rMRGMwX1Hsq/yPQ7WEit+CQqHClm2b/FqQey fjDblR3A4SD4o2pjCC1UFEhPdxQZ4XjCPI4zDsEaDY4tGSSPCa1ppjD1NaqP/gnWwhE5 2qtg== 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=seqtCL6qQP1lHpVV6JxVbCofE6J8aEcyzCDtbKaRiuo=; b=Ed9r0NdgH9i6+aRLS0P2muXSOeoQCr92I9T3X1CPI6MfG783iG4ZNAhydu0nKwgS1Y l3KmgBfjod4TfzS69CSFQGhFaHHVAn9iljLYglTN/gPxjxIlbQg3UJcTGD7nIXrfSwKJ s2lYZAE296fH/XRUWmWTL7jQ6s1YBSXjlke4oMwBvS/9KrDkLcV3khn8ZW4IdgLltOk5 YhrLiTj1TFQ9DqZzTzxrE3+ErFszf2joeCrq8N20zS0TxLJvWsdmCegkAD0jz0ARdjOW JKouM32MihzYYji1xt+j+7aHwPWsGa1LQ7Uwqjv/pJFeGp5junk47WFYwkdklAJMy38M RofQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=ttocmxpO; 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=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 i34si3188695ede.37.2019.10.10.04.40.35; Thu, 10 Oct 2019 04:40:36 -0700 (PDT) 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=pass header.i=@linaro.org header.s=google header.b=ttocmxpO; 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=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732944AbfJJLk2 (ORCPT + 15 others); Thu, 10 Oct 2019 07:40:28 -0400 Received: from mail-lj1-f193.google.com ([209.85.208.193]:36111 "EHLO mail-lj1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1732792AbfJJLk2 (ORCPT ); Thu, 10 Oct 2019 07:40:28 -0400 Received: by mail-lj1-f193.google.com with SMTP id v24so5860456ljj.3 for ; Thu, 10 Oct 2019 04:40:26 -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=seqtCL6qQP1lHpVV6JxVbCofE6J8aEcyzCDtbKaRiuo=; b=ttocmxpO4BTiaii5K7cn0npU6eVhqZ9uMEDMEG7dnyW79epK0rCXS/lpw4SkqbYIYg W59Vn7rAze9cJVsyqKmksnN9Di4v2QsCN03gmrmsqBwJ/hkNQiPz0b1pmIgAI601KtUS aSppXlnpANOGQrmU9eDiPdCo6OV3bH+oi46O/xtlYtnNSj1loyozvQ3GaZcs7LOYfHih 30F0tcFKMkGwAo2oAQogPCkIcT9AmDSJ9rlR/88iiStn7tuBkFUijM/paQ7/7P3O8FJp cMKAdQl/TnVG7+eXCp+OBz/Zuzksl0YdnzPxvlspzR/jpoJqQbicu/XpqqncUNiFreNm lOHg== 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=seqtCL6qQP1lHpVV6JxVbCofE6J8aEcyzCDtbKaRiuo=; b=eq+IT0AFfwx6UBZkF788vxUdatkSk2kxbaZl0I2qw01/Ib650qegeijC+cw/7zKrVL KZhlX30k2AuagOJOzH5KaIdqeoLs6rRN08agdlcIATFyK78PPN1fT9fEmBIndkAqStvW QCNYl8qHGW9cBAt2P/omKtwJC0pVKqFt19ydK4o5FrYnHbA70FOu1gh6N7W7GeMcG/mp VaUcY9mu+k7Ul2InSlhPeEvHby5BClBOi0Hhw3+exLzR+2OCRS20Ehylp4zr0FiNQlsM KK1VUf5LpNBOsGptH0+78P0BUl3UTtOBiGHLf82Uqi5b9uXouLDhLm7+9aFmQIoAWhuh EsvA== X-Gm-Message-State: APjAAAVPwwoB/Vy1rEJe8cEszpNH3iTenmkpZipPBt/O0Z1A0Ptt3cKF /l4k7EFn7ZNkiTHewyy9DVfzYg== X-Received: by 2002:a2e:9205:: with SMTP id k5mr6239604ljg.202.1570707626147; Thu, 10 Oct 2019 04:40:26 -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 p3sm1168937ljn.78.2019.10.10.04.40.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 10 Oct 2019 04:40:25 -0700 (PDT) From: Ulf Hansson To: "Rafael J . Wysocki" , Daniel Lezcano , Sudeep Holla , Lorenzo Pieralisi , Mark Rutland , Lina Iyer , linux-pm@vger.kernel.org Cc: Rob Herring , Vincent Guittot , Stephen Boyd , Bjorn Andersson , Kevin Hilman , Ulf Hansson , linux-arm-kernel@lists.infradead.org, linux-arm-msm@vger.kernel.org, Andy Gross , Lina Iyer Subject: [PATCH 13/13] arm64: dts: Convert to the hierarchical CPU topology layout for MSM8916 Date: Thu, 10 Oct 2019 13:39:37 +0200 Message-Id: <20191010113937.15962-14-ulf.hansson@linaro.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20191010113937.15962-1-ulf.hansson@linaro.org> References: <20191010113937.15962-1-ulf.hansson@linaro.org> Sender: linux-arm-msm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.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". Cc: Andy Gross Co-developed-by: Lina Iyer Signed-off-by: Lina Iyer Signed-off-by: Ulf Hansson --- 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 5ea9fb8f2f87..1ece0c763592 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 {