Received: by 2002:a05:7412:b995:b0:f9:9502:5bb8 with SMTP id it21csp1276032rdb; Sat, 23 Dec 2023 00:06:34 -0800 (PST) X-Google-Smtp-Source: AGHT+IH1oeCTbKgmE2mP4qepbig1yqDIQZdPBly11mzTIb6VjJ98/L9uVHW5wSDyOzhQZWkJ5Uzt X-Received: by 2002:aa7:8e5a:0:b0:6d9:6262:b30d with SMTP id d26-20020aa78e5a000000b006d96262b30dmr2818794pfr.27.1703318793755; Sat, 23 Dec 2023 00:06:33 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1703318793; cv=none; d=google.com; s=arc-20160816; b=qrK/1r9ZyoVUCgFZ83AEgdKxrZIKzBr+NpYoHKXr6WQH9Wyyz30yVlxZQPZGGaKbSI wh83aouvVHf8m2akxaND3ZYHQkJ+jL0/S68g5E3O+AEfF68ZYxVVdvQhXEkVDCRGPu2r myrhYZf9gwOiCAszyU9gXylbB2nST0DInt8IOJyeHknlM26p+NLr6iAHBqPzW7SN/xq+ 8QHu887egP95XZkBy17xTyJya7PkNbo2WVw0YwsKBRn0V8Hkd57vBSa2mxqCG6hC2J8i /oNYGd7k2m7OJYkREASU+JJC3JsD37kFlyLQ2dWqZ6hpg74zUri5mCeeDOJm0nO5jmTQ 0eRA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date:dkim-signature; bh=i6ZxgRx7nmQb7moSGFkKKNZcevRObEcFjULD+P2t0yw=; fh=N8/X0ejHQ0xwzHCeh+n48TG8L30AAXta2lV/9U00xfI=; b=pT4MjV4RvV2f2lQIk7DcsyAu7GCwIOvcMCTqQo0Q1vD8lTy+X79t2NmNnAaGaverBE 7VAyVObZc5GS9wPG3TIrMvaVjHiSuAiblQDxYObT1b6NmxNzmCiJ1lftiZ9udyqYD/Gt 0XmaAp271cH7scKXNEpUh5gZ24ScK7PivrSZCaFVkjNDRUoO5chcSoqL21cC55elpj+Y xisqlw9D7WjsFc6DpaVSnFSUzSSS+i/IKQ1HyUeWVy++rq94dcrp/AKZ4stwbPfXES+4 VAZioHbKhtI6R3peGpM+teffgU7UDH5gL1IRU2mYU0nqaHSjAJRVw5VLIlf3uqcj8j0u 0kzA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@trvn.ru header.s=mail header.b=iNm7uSiv; spf=pass (google.com: domain of linux-kernel+bounces-10340-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-10340-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=trvn.ru Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id t7-20020a63f347000000b005cdf9a1eca3si2097203pgj.228.2023.12.23.00.06.33 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 23 Dec 2023 00:06:33 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-10340-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; dkim=pass header.i=@trvn.ru header.s=mail header.b=iNm7uSiv; spf=pass (google.com: domain of linux-kernel+bounces-10340-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-10340-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=trvn.ru Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id 620962858FD for ; Sat, 23 Dec 2023 08:06:33 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 0C4138C07; Sat, 23 Dec 2023 08:06:25 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=trvn.ru header.i=@trvn.ru header.b="iNm7uSiv" X-Original-To: linux-kernel@vger.kernel.org Received: from box.trvn.ru (box.trvn.ru [194.87.146.52]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 750B58BE0; Sat, 23 Dec 2023 08:06:21 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=trvn.ru Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=trvn.ru Received: from authenticated-user (box.trvn.ru [194.87.146.52]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (No client certificate requested) by box.trvn.ru (Postfix) with ESMTPSA id B252441BD2; Sat, 23 Dec 2023 13:05:33 +0500 (+05) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=trvn.ru; s=mail; t=1703318736; bh=e08FoWdtPSBF5xVKc91iPWDm+2CtVdPEztlQEzzLCXQ=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=iNm7uSivuY3lLD2FvO/siVeJpH5oY+zOTe++KykAHZBgFklLQbxJ0VeWGVKonQMk7 2Q4EgDbFs5VxzLt5Gm6KpfnWJsaHLIuuMvEauc6xfHA/e3WZdnnyG1iIQ2GrqwTOHm 5cpFnfqpunmLiQB0VDGSEeR8xbO/i/k10nfuctLmmOVwGDCbNVw9BJwEyDfMIHMdcW nHRZ34p64tLw0udA1b7jAiEsoqyflT/18ivYQNRz0DxA8zZm5V3fbOW2JVVnZ2M4Ia rVw4DYiPZ1VC+nqjKUiacDYyclQTyJYgajJ6eblr1E4D7pY1NwUNy6EiI1pbv1MDG9 xKzhDWvl5pxkw== Date: Sat, 23 Dec 2023 13:05:29 +0500 From: Nikita Travkin To: Chia-I Wu Cc: cros-qcom-dts-watchers@chromium.org, Andy Gross , Bjorn Andersson , Konrad Dybcio , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Maulik Shah , Ulf Hansson , linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v3] arm64: dts: qcom: sc7280: revert back to PSCI PC mode for herobrine Message-ID: References: <20231222190311.3344572-1-olvaffe@gmail.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20231222190311.3344572-1-olvaffe@gmail.com> On Fri, Dec 22, 2023 at 11:03:03AM -0800, Chia-I Wu wrote: > Commit 7925ca85e9561 ("arm64: dts: qcom: sc7280: Add power-domains for > cpuidle states") transitioned all SC7280 devices to PSCI OS initiated > mode, which doesn't work on TFA-based SC7280 devices. This effectively > revert the commit for sc7280-herobrine. > Hi! I believe modern TF-A includes OSI mode, and it was added pretty much specifically for sc7280, as described in [1]. More to that, I think the original commit that introduced OSI mode for sc7280 did it using the TF-A specific suspend params (I believe they are different from qcom firmware) so the leftover state of the base soc dtsi would be weird... I can't understand why this change is needed... Nikita [1] https://trustedfirmware-a.readthedocs.io/en/latest/design_documents/psci_osi_mode.html > Fixes: 7925ca85e9561 ("arm64: dts: qcom: sc7280: Add power-domains for cpuidle states") > Signed-off-by: Chia-I Wu > --- > > v2: improved commit message > v3: improved commit message. I hope it's better now! > > .../boot/dts/qcom/sc7280-firmware-tfa.dtsi | 107 ++++++++++++++++++ > .../arm64/boot/dts/qcom/sc7280-herobrine.dtsi | 1 + > arch/arm64/boot/dts/qcom/sc7280.dtsi | 4 +- > 3 files changed, 110 insertions(+), 2 deletions(-) > create mode 100644 arch/arm64/boot/dts/qcom/sc7280-firmware-tfa.dtsi > > diff --git a/arch/arm64/boot/dts/qcom/sc7280-firmware-tfa.dtsi b/arch/arm64/boot/dts/qcom/sc7280-firmware-tfa.dtsi > new file mode 100644 > index 0000000000000..b3fc03da244d6 > --- /dev/null > +++ b/arch/arm64/boot/dts/qcom/sc7280-firmware-tfa.dtsi > @@ -0,0 +1,107 @@ > +// SPDX-License-Identifier: BSD-3-Clause > + > +/* > + * Devices that use SC7280 with TrustedFirmware-A > + * need PSCI PC mode instead of the OSI mode provided > + * by Qualcomm firmware. > + */ > + > +&CPU0 { > + /delete-property/ power-domains; > + /delete-property/ power-domain-names; > + > + cpu-idle-states = <&LITTLE_CPU_SLEEP_0 > + &LITTLE_CPU_SLEEP_1 > + &CLUSTER_SLEEP_0>; > +}; > + > +&CPU1 { > + /delete-property/ power-domains; > + /delete-property/ power-domain-names; > + > + cpu-idle-states = <&LITTLE_CPU_SLEEP_0 > + &LITTLE_CPU_SLEEP_1 > + &CLUSTER_SLEEP_0>; > +}; > + > +&CPU2 { > + /delete-property/ power-domains; > + /delete-property/ power-domain-names; > + > + cpu-idle-states = <&LITTLE_CPU_SLEEP_0 > + &LITTLE_CPU_SLEEP_1 > + &CLUSTER_SLEEP_0>; > +}; > + > +&CPU3 { > + /delete-property/ power-domains; > + /delete-property/ power-domain-names; > + > + cpu-idle-states = <&LITTLE_CPU_SLEEP_0 > + &LITTLE_CPU_SLEEP_1 > + &CLUSTER_SLEEP_0>; > +}; > + > +&CPU4 { > + /delete-property/ power-domains; > + /delete-property/ power-domain-names; > + > + cpu-idle-states = <&BIG_CPU_SLEEP_0 > + &BIG_CPU_SLEEP_1 > + &CLUSTER_SLEEP_0>; > +}; > + > +&CPU5 { > + /delete-property/ power-domains; > + /delete-property/ power-domain-names; > + > + cpu-idle-states = <&BIG_CPU_SLEEP_0 > + &BIG_CPU_SLEEP_1 > + &CLUSTER_SLEEP_0>; > +}; > + > +&CPU6 { > + /delete-property/ power-domains; > + /delete-property/ power-domain-names; > + > + cpu-idle-states = <&BIG_CPU_SLEEP_0 > + &BIG_CPU_SLEEP_1 > + &CLUSTER_SLEEP_0>; > +}; > + > +&CPU7 { > + /delete-property/ power-domains; > + /delete-property/ power-domain-names; > + > + cpu-idle-states = <&BIG_CPU_SLEEP_0 > + &BIG_CPU_SLEEP_1 > + &CLUSTER_SLEEP_0>; > +}; > + > +/delete-node/ &domain_idle_states; > + > +&idle_states { > + CLUSTER_SLEEP_0: cluster-sleep-0 { > + compatible = "arm,idle-state"; > + idle-state-name = "cluster-power-down"; > + arm,psci-suspend-param = <0x40003444>; > + entry-latency-us = <3263>; > + exit-latency-us = <6562>; > + min-residency-us = <9926>; > + local-timer-stop; > + }; > +}; > + > +/delete-node/ &CPU_PD0; > +/delete-node/ &CPU_PD1; > +/delete-node/ &CPU_PD2; > +/delete-node/ &CPU_PD3; > +/delete-node/ &CPU_PD4; > +/delete-node/ &CPU_PD5; > +/delete-node/ &CPU_PD6; > +/delete-node/ &CPU_PD7; > +/delete-node/ &CLUSTER_PD; > + > +&apps_rsc { > + /delete-property/ power-domains; > +}; > diff --git a/arch/arm64/boot/dts/qcom/sc7280-herobrine.dtsi b/arch/arm64/boot/dts/qcom/sc7280-herobrine.dtsi > index 9ea6636125ad9..09b2d370bf7e0 100644 > --- a/arch/arm64/boot/dts/qcom/sc7280-herobrine.dtsi > +++ b/arch/arm64/boot/dts/qcom/sc7280-herobrine.dtsi > @@ -19,6 +19,7 @@ > > #include "sc7280-qcard.dtsi" > #include "sc7280-chrome-common.dtsi" > +#include "sc7280-firmware-tfa.dtsi" > > / { > chosen { > diff --git a/arch/arm64/boot/dts/qcom/sc7280.dtsi b/arch/arm64/boot/dts/qcom/sc7280.dtsi > index 66f1eb83cca7e..354bf2868eba6 100644 > --- a/arch/arm64/boot/dts/qcom/sc7280.dtsi > +++ b/arch/arm64/boot/dts/qcom/sc7280.dtsi > @@ -383,7 +383,7 @@ core7 { > }; > }; > > - idle-states { > + idle_states: idle-states { > entry-method = "psci"; > > LITTLE_CPU_SLEEP_0: cpu-sleep-0-0 { > @@ -427,7 +427,7 @@ BIG_CPU_SLEEP_1: cpu-sleep-1-1 { > }; > }; > > - domain-idle-states { > + domain_idle_states: domain-idle-states { > CLUSTER_SLEEP_0: cluster-sleep-0 { > compatible = "domain-idle-state"; > idle-state-name = "cluster-power-down"; > -- > 2.43.0.195.gebba966016-goog