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: 10478213 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id B8CE4601D7 for ; Wed, 20 Jun 2018 17:36:41 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id A0C4528849 for ; Wed, 20 Jun 2018 17:36:41 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 957CF28F32; Wed, 20 Jun 2018 17:36:41 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI autolearn=unavailable version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 3289628849 for ; Wed, 20 Jun 2018 17:36:41 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:References: In-Reply-To:Message-Id:Date:Subject:To:From:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Owner; bh=rD/rBHgr0h5lPglguu8psk1vo5R9wo+XhMNFkfroJcA=; b=BHBL0Fj/s22N+AmIqcdmWPmmew jae0wX/oPUwOaQKsJVwbyn1U4xw93PcLpODKYQCXWObC+kdPdIbZUJZKnxdylb+sFux7ZpoydKm+T cpE2qD84by/FvlXMOEIOX5pqgB1/lTWd4P6VW5F8sUJ8lCurAbASOGeQLbOdd4i4ttgtRwaJ/3H05 oIogCfvTd2H187y18SD2M2UmnjBHFrXQHe/GG6UATv30g0IvTNFuVfkHM7JWBvIU5LNFUThK0e1Wn uWnvFn42UiHqxo5idFHtNuChqo/Q2ihhVtkl+hKvFjrx+QYgZTGMqgpOpYUvyvh4zOJMUyGcApk+3 Ceklgnjg==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1fVh24-0008Ak-2F; Wed, 20 Jun 2018 17:36:36 +0000 Received: from mail-lf0-f67.google.com ([209.85.215.67]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1fVgpK-0005sW-7t for linux-arm-kernel@lists.infradead.org; Wed, 20 Jun 2018 17:24:04 +0000 Received: by mail-lf0-f67.google.com with SMTP id d24-v6so464788lfa.8 for ; Wed, 20 Jun 2018 10:23:24 -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=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=eduYi7XOOjazm1gNsaH67T7hVBneRURwk+2g2qgcDKGaFZNInd/LuqROxEZyaxbNsX 4M4oRVowzA/Us7VpqQRWuwY+Z46eilr/xDLsCz10CBTyRrWaH0Oh96Z3zs2/gV0M6MJE pXl7PEPLD56ACcjpFy1BJQ//okvyczheXznOoJectOJSVG2y1O64i+FaJuskpoKZICxn mbmxJvNy4K47YIDOS65XMwbJ+qUKgBrlQMoRrrPN1HD4ethiSE8kiinLr6uuCMXO3/A+ chLfD7Mf348U4Trrgn+p5kh/jV+huzIyQQnUPoHPYe/QoA514D04YTddL1e9CLax7r48 k89g== X-Gm-Message-State: APt69E2stOH6Sg5p9HG/pxqH7Lr7Zcdjju6+0PnuUd9u8+D75+ls4xC8 PKpWRq7xCWp5kgizK5jV8NFAPQ== 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) 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 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> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20180620_102326_319581_B372C301 X-CRM114-Status: GOOD ( 15.25 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Ulf Hansson , Vincent Guittot , Juri Lelli , Geert Uytterhoeven , Kevin Hilman , Stephen Boyd , linux-arm-msm@vger.kernel.org, Daniel Lezcano , linux-kernel@vger.kernel.org, Lina Iyer , David Brown , Rob Herring , linux-arm-kernel@lists.infradead.org, Andy Gross , Thomas Gleixner , Lina Iyer MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP 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(-) 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 {