Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp1670751yba; Fri, 17 May 2019 03:22:17 -0700 (PDT) X-Google-Smtp-Source: APXvYqxOMleygg/BjLJOLuNdt6ddQKQZttRo9k3l2eATb+eUXdnK3m5VNgMqiCxc3DdU23limBCY X-Received: by 2002:a63:6c83:: with SMTP id h125mr11171793pgc.86.1558088536931; Fri, 17 May 2019 03:22:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1558088536; cv=none; d=google.com; s=arc-20160816; b=IfpXETdr+cRLgOs8SY6omlI8iKY4u2b75QMJ1yDd8sV5CqyvpD/EsnVAYk6CCQzZvt PNrPGouSSXOfS5wqfKWFM9qOOVz87I+8x2PVaYb69esrJ8qlEFVeWjJbPdeA2eyYt6/i PV2ZAtZAJuFL0oZAhX7gK98rJgGs3Jo2J2Eb5z/sxYd/o05pnMd+8qiAehct3x9hsOh+ CAVDXVfK7fwaAVhaAq3BhxzVV2Sc9BeL/rU4ph9v7mhno1IgL/Rfs27JMEeUX+rm6iUa UOTkbJbPzhPS2NJay5zaLd57MPuquFVIwjRQC6a/YNulI8E0zDy4Hg11CAjuJvpfIRbu j9gw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=RDY/8T5oG1sd9/9Tn8BhGcNJt4PUJySH+sHZQHkeoSg=; b=yJomOQcJvPiIhu0ofj32WdbqMQG9hCMClw0AJGVRQvHNgFEWRg7W4bmqmeyUUElsIi Imbtfx6eKBhdf0Q6YLbc2wpua96BFIGEob594CwesiZFytk/NMdab02z9cBsXvnZPBj/ 6W/MfqYHzISuot2FyCGEsMpdc5avW8yQvjEcGai6Ftkfu7Xahm/KR9r17RD9rXuJHjX4 NO5QRFlmDmPDo6vSbpqTLnydFyd9YU94niRhhyRVgIWGMjpLcC53yeKV1ppsmh4XIF7b q5ALcjAWRU/Adwu8Y2/bsN08B0OUWBNJrCri0eFt0+ITBv9I0LSWbtbp4gqWlFfB5x4m 2IPg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=bctqSvnX; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-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 l1si7640878pgi.344.2019.05.17.03.22.01; Fri, 17 May 2019 03:22:16 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-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=bctqSvnX; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-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 S1728703AbfEQJHX (ORCPT + 99 others); Fri, 17 May 2019 05:07:23 -0400 Received: from mail-qk1-f194.google.com ([209.85.222.194]:39981 "EHLO mail-qk1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728422AbfEQJHW (ORCPT ); Fri, 17 May 2019 05:07:22 -0400 Received: by mail-qk1-f194.google.com with SMTP id q197so4005560qke.7 for ; Fri, 17 May 2019 02:07:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=RDY/8T5oG1sd9/9Tn8BhGcNJt4PUJySH+sHZQHkeoSg=; b=bctqSvnX24/0EmDwsbx0gT/9HlxYX9WU+CRUkaRId6ptX9ok5BbWG5IZ+BKEgllupu CNyterzYzW3/Sa/HI5k/yIxg/VDu+llzIfExQ64TLSP3MoXf2OhEyXGhJ3ywrDgtRDpX toxYSmSXSoKL8LRVSFG982d6WLVgHnEsJLishd/vdhwNUV1A850J+hpnu4OD93Q/00D0 KhozlZV5vlPYZByhuQ7L3ZzwcQQzJNfehiYznPcZB1c9AFhPzL+tHk3nnk1DEw8m3/8I HLwzHqjMA6PgpMYJLDOtTCpmbfdKot1QK3ogNer24z5nMu/++CdznbhRO2lUmPWwLakQ VXHg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=RDY/8T5oG1sd9/9Tn8BhGcNJt4PUJySH+sHZQHkeoSg=; b=eKfiK1K8mLZks5jy3plgWlX/Lozn/gkwVZ2sCj1Foq5r3ciCK7GI5xgnkFq11+qOFO 1pireJlXgT5g3eOli0Gwp2uxNadPf4zrI9jCk2v0PioBhYv9oOhHKvHFedPfM87tPpma AoFiMZp5usAebJStk/sH1+o3Z00XFzf7RjZ7Cl1vCR5d29uhpxgrhqooCoPe4t1XCdy1 P5fF15iQG0Z5RRzHiS8DHl0DwMUVqnBSuqNBsNbY26MEYixcWOF18y94E8ctRp0iOY3A gS9Elr0UV4LvOdhtIeP8l+gwVLAL/bN+59EqLDCVbYhOGfshk5cgtKnjtUyWlUrVLsGS E2DA== X-Gm-Message-State: APjAAAXnDSFx39jlN/r90tSx+r3Oxs+IeXyxMt57e84JzI/TFyvVMf6C J0fe4TPbTAUfCg+QsVXkdOqpOly9CZCcg425XbcmsA== X-Received: by 2002:a37:8703:: with SMTP id j3mr42619017qkd.188.1558084041650; Fri, 17 May 2019 02:07:21 -0700 (PDT) MIME-Version: 1.0 References: <8648ba97d49a9f731001e4b36611be9650e37f37.1557486950.git.amit.kucheria@linaro.org> In-Reply-To: From: Amit Kucheria Date: Fri, 17 May 2019 14:37:10 +0530 Message-ID: Subject: Re: [PATCHv1 6/8] arm64: dts: qcom: msm8996: Add PSCI cpuidle low power states To: Niklas Cassel Cc: Linux Kernel Mailing List , linux-arm-msm , Bjorn Andersson , Andy Gross , David Brown , Li Yang , Shawn Guo , devicetree Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, May 14, 2019 at 9:42 PM Niklas Cassel wrote: > > On Fri, May 10, 2019 at 04:59:44PM +0530, Amit Kucheria wrote: > > Add device bindings for cpuidle states for cpu devices. > > > > Signed-off-by: Amit Kucheria > > --- > > arch/arm64/boot/dts/qcom/msm8996.dtsi | 28 +++++++++++++++++++++++++++ > > 1 file changed, 28 insertions(+) > > > > diff --git a/arch/arm64/boot/dts/qcom/msm8996.dtsi b/arch/arm64/boot/dts/qcom/msm8996.dtsi > > index c761269caf80..b615bcb9e351 100644 > > --- a/arch/arm64/boot/dts/qcom/msm8996.dtsi > > +++ b/arch/arm64/boot/dts/qcom/msm8996.dtsi > > @@ -95,6 +95,7 @@ > > compatible = "qcom,kryo"; > > reg = <0x0 0x0>; > > enable-method = "psci"; > > + cpu-idle-states = <&LITTLE_CPU_PD>; > > next-level-cache = <&L2_0>; > > L2_0: l2-cache { > > compatible = "cache"; > > @@ -107,6 +108,7 @@ > > compatible = "qcom,kryo"; > > reg = <0x0 0x1>; > > enable-method = "psci"; > > + cpu-idle-states = <&LITTLE_CPU_PD>; > > next-level-cache = <&L2_0>; > > }; > > > > @@ -115,6 +117,7 @@ > > compatible = "qcom,kryo"; > > reg = <0x0 0x100>; > > enable-method = "psci"; > > + cpu-idle-states = <&BIG_CPU_PD>; > > next-level-cache = <&L2_1>; > > L2_1: l2-cache { > > compatible = "cache"; > > @@ -127,6 +130,7 @@ > > compatible = "qcom,kryo"; > > reg = <0x0 0x101>; > > enable-method = "psci"; > > + cpu-idle-states = <&BIG_CPU_PD>; > > next-level-cache = <&L2_1>; > > }; > > > > @@ -151,6 +155,30 @@ > > }; > > }; > > }; > > + > > + idle-states { > > + entry-method="psci"; > > Please add a space before and after "=". > > > + > > + LITTLE_CPU_PD: little-power-down { > > In Documentation/devicetree/bindings/arm/idle-states.txt > they seem to use labels such as CPU_SLEEP_0_0 for the first > cluster and CPU_SLEEP_1_0 for the second cluster. Will change this to LITTLE_CPU_SLEEP_0. I feel there is value in keeping BIG and LITTLE in the name explicitly to improve readability when correlating the idle state parameters to each CPU. > > Please also consider my comment in patch 4/8. > > > + compatible = "arm,idle-state"; > > + idle-state-name = "standalone-power-collapse"; > > + arm,psci-suspend-param = <0x00000004>; > > + entry-latency-us = <40>; > > + exit-latency-us = <40>; > > Where did you get the latency values from? > Downstream seems to use qcom,latency-us = <80> for "fpc". > Will fix. > (Sure downstream also defines "fpc-def", but that seems to require > additional psci code/calls that doesn't exist upstream.) > > > + min-residency-us = <300>; > > + local-timer-stop; > > Are you sure that the local timer is stopped? > the equivalent DT property to "local-timer-stop" in downstream is > "qcom,use-broadcast-timer", and this property seems to be missing > from this node: > https://source.codeaurora.org/quic/la/kernel/msm-4.4/tree/arch/arm/boot/dts/qcom/msm8996-pm.dtsi?h=msm-4.4#n158 > > You could try to remove "local-timer-stop", if it is really needed, > then the system should hang without this property. Will review and test again. > > > + }; > > + > > + BIG_CPU_PD: big-power-down { > > + compatible = "arm,idle-state"; > > + idle-state-name = "standalone-power-collapse"; > > + arm,psci-suspend-param = <0x00000004>; > > + entry-latency-us = <40>; > > + exit-latency-us = <40>; > > Where did you get the latency values from? > Downstream seems to use qcom,latency-us = <80> for "fpc". > > (Sure downstream also defines "fpc-def", but that seems to require > additional psci code/calls that doesn't exist upstream.) > > > + min-residency-us = <300>; > > + local-timer-stop; > > Are you sure that the local timer is stopped? > the equivalent DT property to "local-timer-stop" in downstream is > "qcom,use-broadcast-timer", and this property seems to be missing > from this node: > https://source.codeaurora.org/quic/la/kernel/msm-4.4/tree/arch/arm/boot/dts/qcom/msm8996-pm.dtsi?h=msm-4.4#n247 > > You could try to remove "local-timer-stop", if it is really needed, > then the system should hang without this property. > > > > + }; > > + }; > > }; > > > > thermal-zones { > > -- > > 2.17.1 > >