From patchwork Fri Dec 29 21:28:39 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?b?TsOtY29sYXMgRi4gUi4gQS4gUHJhZG8=?= X-Patchwork-Id: 13506654 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id D3EEDC4706F for ; Fri, 29 Dec 2023 21:31:35 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-ID:Date:Subject:Cc :To:From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=ItN7EVV7eJJiQ0kXWwP9I7b1ySi6vxlfkynoZkkqTIo=; b=xWa8MprYDxte0A M5xMSCz90CQlrehAmSH2neEiewVMN9ybC027wNC+Sl7XmMNTQ+pkoElWl/GSCZZr3hXie4Jdnzp9N 2z8QSxNmuvtcaYRI3iiLLid/AZOXR0ILeUcTWo8rWYmTc5RjAUNZOHNyZqJLSa+MbpANQ11D6wrpx quUxR/E9VUWrTb8i+/hyBA59wOu3dQl/BczkmO+8iDIJl7lkH6jKfTYY8sKk8repfikabh6CqzOUk hT8J9vk08ETUc04V7h+U1n1LJIw0hDY5OHzsaFCTkSQBm8fvR4+SdVs+f3AZyQ6PnTeJRzhIiN2yf nRUZFXJn6MQEqGiCnTpg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1rJKRg-001a00-2C; Fri, 29 Dec 2023 21:31:08 +0000 Received: from madrid.collaboradmins.com ([46.235.227.194]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1rJKRe-001ZyC-0e; Fri, 29 Dec 2023 21:31:07 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1703885462; bh=h3ANz3W0DslZaQwI4kM53iFECoCiLF7i5w4P/6cAJS8=; h=From:To:Cc:Subject:Date:From; b=3gOIgpCN0rHmhUVUO1x2NnY6I/4ngpObwu+s2JXdw+Ag6ioDeIyjdvrO/Uk+g24Sq D7Ne+1Ni/VgEbpuKRL05s5UI27ctN3ZkHkPeyWm0iAlwHZ7ytovnXYUueBkoukDqF9 UjNMiOP/HVjzYwyncI8WR8sMPsAbOpIz08kRmfrVaazWFSIU22xTHrEe7Yym8yFj2n 8mx5y53Iy/5e4FPWcsgN+9YDVEefyQ0LLxiqTW5vhXwLURDC58gwj0FBH/P69XU/7w YwoqaLOCC5jW3B4Dgun60zgg8Bice0jLp0IkvzslrLeytSWfTv9NQqD5card03KGyX ZVcVV3emGe49A== Received: from localhost.localdomain (zone.collabora.co.uk [167.235.23.81]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: nfraprado) by madrid.collaboradmins.com (Postfix) with ESMTPSA id 44A0E3781FD5; Fri, 29 Dec 2023 21:30:56 +0000 (UTC) From: =?utf-8?b?TsOtY29sYXMgRi4gUi4gQS4gUHJhZG8=?= To: Viresh Kumar , "Rafael J . Wysocki" Cc: kernel@collabora.com, AngeloGioacchino Del Regno , =?utf-8?b?TsOtY29sYXMgRi4gUi4gQS4gUHJhZG8=?= , Conor Dooley , Hector Yuan , Krzysztof Kozlowski , Matthias Brugger , Rob Herring , devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-mediatek@lists.infradead.org, linux-pm@vger.kernel.org Subject: [PATCH 1/2] dt-bindings: cpufreq: Add big CPU supply Date: Fri, 29 Dec 2023 18:28:39 -0300 Message-ID: <20231229212853.277334-1-nfraprado@collabora.com> X-Mailer: git-send-email 2.43.0 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20231229_133106_452147_CD686D0E X-CRM114-Status: UNSURE ( 9.22 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org The performance-controller hardware block on MediaTek SoCs is responsible for controlling the frequency of the CPUs. As such, it needs any CPU regulator to have been configured prior to initializing. Add a phandle in the binding so this dependency can be described. Signed-off-by: NĂ­colas F. R. A. Prado --- .../devicetree/bindings/cpufreq/cpufreq-mediatek-hw.yaml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Documentation/devicetree/bindings/cpufreq/cpufreq-mediatek-hw.yaml b/Documentation/devicetree/bindings/cpufreq/cpufreq-mediatek-hw.yaml index d0aecde2b89b..d75b01d04998 100644 --- a/Documentation/devicetree/bindings/cpufreq/cpufreq-mediatek-hw.yaml +++ b/Documentation/devicetree/bindings/cpufreq/cpufreq-mediatek-hw.yaml @@ -33,6 +33,8 @@ properties: performance domains. const: 1 + big-cpus-supply: true + required: - compatible - reg From patchwork Fri Dec 29 21:28:40 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?b?TsOtY29sYXMgRi4gUi4gQS4gUHJhZG8=?= X-Patchwork-Id: 13506655 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 2565BC47074 for ; Fri, 29 Dec 2023 21:31:45 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-ID:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=xHnW8fNcV+gRdA6la/XDzdWu1SZlvaFDKBjlVcu1sxM=; b=jbFEDAVYuZLcyq PUC11czjqi+LRJhLdw6luzk6D6pMvRs4W7Z8GPv2dvd4uNecbHyvtvxIjGRirK2yHWxU4aB2Q4cxO jubaJxqxp1k9h5Ml9QQcXMIuXz2qO4L6AvMCm77iztJVyaqkycivn9ll86WmiWOavYhJe2XLIMX0l pAydcIrIYDfRuq5e6QPk2jX8S8Cv7gfPSjTJ1QLrqwRCPNK52UIAZnel5qcy+JVJnlJtcBpqRWnna kPaRvYEAQ3zNCIGQlsw4jW2o16+qibpihyEUH1jSqKElTvvcCO938iCotSrJaf6Xf4aqE8Ydhq5OR yzPKZjzG62J2f/1j+a1w==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1rJKRp-001a26-2L; Fri, 29 Dec 2023 21:31:17 +0000 Received: from madrid.collaboradmins.com ([2a00:1098:ed:100::25]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1rJKRi-001Zzr-1F; Fri, 29 Dec 2023 21:31:11 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1703885467; bh=XL6wkiD2HYx6HaI4hGDV0Keb34y3XqC2DjGmqSSBy68=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=HPgwDdLKJcKpAtUbU9HxQhIW+JM1CO3SqRQv5YJMD2R4TwrVN+DJJBNTbNklpO7nS Bfklfoae+bCfaUPBoDG9McM1aebFRKxtHozaTaQZ2xjsuoC8tUX2utslWOKSADvf04 X3SsEQVGUlzn4VfGVG6l45wtPcjIY10tTUeqZE1BMjpgEdkp9qbFSx/B+rl2z0vc6r Pc3Z+/REaBuT1b029wtURtyKCBUpAcvbzgfDOiGMi98HAa1J+/5/Kj+5QPvT44UK92 9/ZIkguje/JeQsZ+vuHU81HeqEy4/e9iz0AM/HwPdFOdLMqtxuaV3IA0ALA/L8jQWL Pfsh9wZQX7AdA== Received: from localhost.localdomain (zone.collabora.co.uk [167.235.23.81]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: nfraprado) by madrid.collaboradmins.com (Postfix) with ESMTPSA id E0A023781FDE; Fri, 29 Dec 2023 21:31:02 +0000 (UTC) From: =?utf-8?b?TsOtY29sYXMgRi4gUi4gQS4gUHJhZG8=?= To: Viresh Kumar , "Rafael J . Wysocki" Cc: kernel@collabora.com, AngeloGioacchino Del Regno , =?utf-8?b?TsOtY29sYXMgRi4gUi4gQS4gUHJhZG8=?= , Conor Dooley , Krzysztof Kozlowski , Matthias Brugger , Rob Herring , devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-mediatek@lists.infradead.org Subject: [PATCH 2/2] arm64: dts: mediatek: cherry: Add CPU supply dependency to cpufreq-hw Date: Fri, 29 Dec 2023 18:28:40 -0300 Message-ID: <20231229212853.277334-2-nfraprado@collabora.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20231229212853.277334-1-nfraprado@collabora.com> References: <20231229212853.277334-1-nfraprado@collabora.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20231229_133110_554856_553425E6 X-CRM114-Status: GOOD ( 10.73 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org When the mediatek-cpufreq-hw driver enables the hardware (by writing to REG_FREQ_ENABLE), if the regulator supplying the voltage to the big CPUs hasn't probed yet, the platform hangs shortly after and "rcu: INFO: rcu_preempt detected stalls on CPUs/tasks" are printed in the log. To prevent this from happening, describe the big CPUs regulator in the performance-controller DT node, so that devlink ensures the regulator has been probed and configured before the frequency scaling hardware is probed and enabled. Signed-off-by: NĂ­colas F. R. A. Prado --- arch/arm64/boot/dts/mediatek/mt8195-cherry.dtsi | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/arch/arm64/boot/dts/mediatek/mt8195-cherry.dtsi b/arch/arm64/boot/dts/mediatek/mt8195-cherry.dtsi index dd5b89b73190..505da60eee90 100644 --- a/arch/arm64/boot/dts/mediatek/mt8195-cherry.dtsi +++ b/arch/arm64/boot/dts/mediatek/mt8195-cherry.dtsi @@ -502,6 +502,10 @@ &pcie1 { pinctrl-0 = <&pcie1_pins_default>; }; +&performance { + big-cpus-supply = <&mt6315_6_vbuck1>; +}; + &pio { mediatek,rsel-resistance-in-si-unit; pinctrl-names = "default";