From patchwork Wed Nov 27 10:29:14 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ulf Hansson X-Patchwork-Id: 180289 Delivered-To: patches@linaro.org Received: by 2002:a92:38d5:0:0:0:0:0 with SMTP id g82csp5914691ilf; Wed, 27 Nov 2019 02:29:38 -0800 (PST) X-Received: by 2002:ac2:47e6:: with SMTP id b6mr13531042lfp.96.1574850578155; Wed, 27 Nov 2019 02:29:38 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1574850578; cv=none; d=google.com; s=arc-20160816; b=OotCL1FpYJlEgT07iF4TV8Xumt56OdmHtqoP9S+hc1zUC+vLklo3scKFpOQT3XC+Xp MbcvW33Yxubj6+l/+A6AwVZzOtdNa3Xe0td6Mfd4ww+MUX06PJQmUVxBUwDVeEBfJWgz f9W0yz0mvnNuVIg4x440qwkHOkIV2Tj+alI/4jLWa7dZKbHhlqYxEfCoIux1LkzGkowT wDiZYWpUUFKGBePuX8Uc2gIfY6XuhqoIYT0kxfqwz5f5T92/dTVb9tIgGYo1JC3Y4Yst xZfGXyY4LFWyxmItDS2M4Bnqq8XmSBg0yPUMmouc9Wh2kuSoxfpLRlVVEvyX1ik8f/oH Ujxw== 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=YE8YvkurDwcmK3uqareXLGBcqQwJuyVozrMdvAFxIY4=; b=SORwtVHxu36zn6ZW3rBG1kktySWEFn46K3NqK4vRpJNUtw+M4X01Wkikzrrnb8Uh3v 2apxsdI9Yo7M/7gBz+WeaNw4C2PdUAh3NHk0IaH5CZXoRnU4huiicxs+bMRNd0QuzWUi JLKRkB4yYxWRq22GafUk55cOIDBMBwyNDVYz7payOCQrCB4x8xpKqMR6Ijy6ia1YRVd7 A6NbDHvuNvxiOw/kGxIKMcQ0nJoPZTcUYDA70Sa2Mf8YBe+tSWAYzrhHCbpgpx1yKD7i 1ll72IebtkOeWFTZLmp5ss187L8jEm40NNrWVaqw3GqdxKZipnx2XYN7lNroXovXeO8t k4kQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=V0sHWW+6; 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 f9sor3689466lfk.60.2019.11.27.02.29.37 for (Google Transport Security); Wed, 27 Nov 2019 02:29:38 -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=V0sHWW+6; 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=YE8YvkurDwcmK3uqareXLGBcqQwJuyVozrMdvAFxIY4=; b=V0sHWW+6lT6XzspaGhjr68xPBxpq7cPOhMWh1T+Yuzw50GwEW9jikpXcj4Xys51BZG +uEZgF33ABgUWs+x7CUqOSTxvnuanzhxSRePKrmiiqBpnMsbA9sZbF7VmOpPS/SNkGPm BIparBEt6Symbx9RStqtt6zw4wByrXDGWpP1pkjmBBNf+j2SYGbQn7tZOFc8OmK4X6LG HBj6c6FBilNnoTc9kiephZw+sT4KpxSMylomgmXHxbP21AhsU00DviVyClbq2NucHpB2 lPNQAS61sJFOUXirZNTvRAMgUOUuuPQroVBFt2umHunxgvkAe+QY+F9rKUVTNv7HP6o8 Hegg== 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=YE8YvkurDwcmK3uqareXLGBcqQwJuyVozrMdvAFxIY4=; b=Q5g8c/6zClbBxk2r7sy7boUkkvyAz1xlG5ehfzUi2JSArZ0bWF/lfpnA8y0sqjRKll owgA/Y5DF/BiiEO10SaJ0CBQ0q9qxyLlbTfY0uje6Bjiv1DwynuSLfjvstMIPbAP4pa7 cJPlGoeXqSKocTPm7v9EC/ShyywhzkCURg4r6EN5i3wYJaKEDYuipVa2Gyj/3BFQM0Ot Qw06nld1YNqvkrFG2MLKpMgtuwPWKtQ7BPs3zvSueX6vNtNB+WmhFkdCBG7pqIeH0FYx luX0uyAz/x5AMXhl1OBSGmihX3hBsK7lqq83Q0A+M0WDVOCtjDZly0T1TuKDPquSbwwC Bt5w== X-Gm-Message-State: APjAAAUH+Qsnu03RaS1iAcErktT4sV9kId/0FyypXX9zIABsxsukj5I5 j0ps+ymbKEa4iOMocwmZRm/GGjMluCIdxA== X-Google-Smtp-Source: APXvYqzfK7p4G4XeXLmvxRBXQfax0x8CjKcQ8ndzaEP1RnAz44tx+i8EzhOqNotZjQZFL/St0ciykg== X-Received: by 2002:a19:8c4e:: with SMTP id i14mr14761604lfj.90.1574850577700; Wed, 27 Nov 2019 02:29:37 -0800 (PST) Return-Path: Received: from uffe-XPS-13-9360.ideon.se ([85.235.10.227]) by smtp.gmail.com with ESMTPSA id t9sm6868260ljj.19.2019.11.27.02.29.36 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 27 Nov 2019 02:29:37 -0800 (PST) From: Ulf Hansson To: Sudeep Holla , Lorenzo Pieralisi , Rob Herring , linux-pm@vger.kernel.org Cc: "Rafael J . Wysocki" , Daniel Lezcano , Mark Rutland , Lina Iyer , Vincent Guittot , Stephen Boyd , Andy Gross , Bjorn Andersson , Kevin Hilman , Ulf Hansson , linux-arm-kernel@lists.infradead.org, linux-arm-msm@vger.kernel.org, Lina Iyer Subject: [PATCH v3 13/13] arm64: dts: Convert to the hierarchical CPU topology layout for MSM8916 Date: Wed, 27 Nov 2019 11:29:14 +0100 Message-Id: <20191127102914.18729-14-ulf.hansson@linaro.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20191127102914.18729-1-ulf.hansson@linaro.org> References: <20191127102914.18729-1-ulf.hansson@linaro.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". Co-developed-by: Lina Iyer Signed-off-by: Lina Iyer Signed-off-by: Ulf Hansson --- Changes in v3: - None. --- 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 {