From patchwork Wed Jun 20 17:22:26 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ulf Hansson X-Patchwork-Id: 139394 Delivered-To: patches@linaro.org Received: by 2002:a2e:970d:0:0:0:0:0 with SMTP id r13-v6csp1051176lji; Wed, 20 Jun 2018 10:23:22 -0700 (PDT) X-Received: by 2002:a2e:8455:: with SMTP id u21-v6mr14311859ljh.66.1529515402819; Wed, 20 Jun 2018 10:23:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1529515402; cv=none; d=google.com; s=arc-20160816; b=D4gpwehBCRtbOpBRN+V2xKWfpkQg1jLG7Xl45TnzeMLBwC3JRrBW+7iLKGf45sfxM5 zHK3VCo9qLPl8UxuY9T1gFDqFQL+B9xb+Lfe2QTbamTOHN7RKS6VYsDxht/QBZWWFENA 1MfU+1Jy+69QsoT7UxmcUbBc4C1MVpZAuT4/MVu9sG6oGWFaXfFUzammsJ+MMoPS+uUx t/13mVwpZ5e+RuEnObN9e2vmL8jLouCM6/EPxpNgLAxCkhTzak0fvVFY0wtjeGZHGVPo bGo3H09tseCLp03MsMLiYIrp0IeaCJBWm2xdOQcsJohbMN9LZlwbdj6PFvEFfs76KdjE XKdg== 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=vciKAZrRv7ECOl2ptqOo+/cjgmJMMGADcdSrEduU6CM=; b=OgqoaKj+vOYmPA7Lu4piYCE5s43CFkhTxUxvi2cpeaaLjV35b3MOiSnMMPgQgKD7uH YaHUO3jE39D2FU59LMdobDKOgkJG0Eo8bX+GE1qSg6TSIOai/7+TFU8FtyO75MLO+WuT RUYg5qJfTpPotTyLdRQkxZU83i+q1A9/0IFHHqOBBsixMgDhFO+e+X8lVFkGcCLXCbkO uy0tv5MpTsWGDAYhbmYPQSGhjvjdHAL565Sh0PiHdeF0fvbBFrX+l0IHu2V7PyZNApD5 SAShBgK0cgFBnhjfKnzwg4NFegqvAGqtHfCTl2H+HlzTzPMTY+mYe6m/GMlSPrGd0RLZ urVA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=KkpC0Yn2; 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 a139-v6sor680702lfa.92.2018.06.20.10.23.22 for (Google Transport Security); Wed, 20 Jun 2018 10:23:22 -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=KkpC0Yn2; 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=vciKAZrRv7ECOl2ptqOo+/cjgmJMMGADcdSrEduU6CM=; b=KkpC0Yn2jPtKbAWQ0Aa+Ji7L3B367c355N3cQVkYlkTkk2twnsvqmvJIBt0lBz95/t XfvbnpxB1eMsui6wZaPKw7psnXfl3tiedOF1smCzsikembXej4uH3IllCXfihIZU95aJ auciZjtR8uD/oSbJlLihwNSXeJ9jjhsBOTa70= 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=vciKAZrRv7ECOl2ptqOo+/cjgmJMMGADcdSrEduU6CM=; b=AMDWTxkl7EPtF7A1XUWs5MoWW9UlBaP5f0jH2tQhVZfCvNafi0K1ntg+jg30MEr7xP wuQYxlQgfL6Cj+3NK5vyotgYY9oklAh9W9Hw+UREu2Q1TxGPm1XrtUM2zjrrMg9yc5qx lcf/YrnF4XRZeB2ctsdYag4TPan9QaaeqHCgTXHnUcuBVicV9dhzuWNUEk5MyaZEAGFd fK5jKVIS1ooX8Ae8VT4WnB4uphk43ZbAcG3coUK1Eq1mXdtHWQdtUNLQ9W+F77BhjnvJ Knnl5ECr1GQ1mbKLp4P/6F9mq9Q+Q9obhCUuI2mQLKY9Sqtt5jUKlRIuYYDwngaZDCm3 cI9g== X-Gm-Message-State: APt69E3+6I44SFLwguO1GdxSrSP4iKGdfel6FkcBpvcWQcK1Se1Kwa/m 78Lry+fjxwizfF6jgxstBi0sg/xK X-Google-Smtp-Source: ADUXVKLoRcYNVaAgk3ZjO+D0NDTmmrS1SX7JnugQWo+BRl11ewEOjLapCRe5ahKK5eg4vuZDor2X9w== X-Received: by 2002:a19:eb8c:: with SMTP id f12-v6mr7763384lfk.132.1529515402549; Wed, 20 Jun 2018 10:23:22 -0700 (PDT) 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 b2-v6sm514441lji.85.2018.06.20.10.23.21 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 20 Jun 2018 10:23:21 -0700 (PDT) From: Ulf Hansson To: "Rafael J . Wysocki" , Sudeep Holla , Lorenzo Pieralisi , Mark Rutland , 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 v8 26/26] arm64: dts: Convert to the hierarchical CPU topology layout for MSM8916 Date: Wed, 20 Jun 2018 19:22:26 +0200 Message-Id: <20180620172226.15012-27-ulf.hansson@linaro.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20180620172226.15012-1-ulf.hansson@linaro.org> References: <20180620172226.15012-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 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.17.1 diff --git a/arch/arm64/boot/dts/qcom/msm8916.dtsi b/arch/arm64/boot/dts/qcom/msm8916.dtsi index 650f356f69ca..d67c51090d0c 100644 --- a/arch/arm64/boot/dts/qcom/msm8916.dtsi +++ b/arch/arm64/boot/dts/qcom/msm8916.dtsi @@ -113,10 +113,10 @@ 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>; }; CPU1: cpu@1 { @@ -125,10 +125,10 @@ 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>; }; CPU2: cpu@2 { @@ -137,10 +137,10 @@ 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>; }; CPU3: cpu@3 { @@ -149,10 +149,10 @@ 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>; }; L2_0: l2-cache { @@ -169,12 +169,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 {