From patchwork Wed Jun 30 13:59:42 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Marek_Beh=C3=BAn?= X-Patchwork-Id: 468945 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-19.4 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, INCLUDES_CR_TRAILER, INCLUDES_PATCH, MAILING_LIST_MULTI, SPF_HELO_NONE, SPF_PASS, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id E40C1C11F65 for ; Wed, 30 Jun 2021 14:00:32 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id C64AF61447 for ; Wed, 30 Jun 2021 14:00:32 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236158AbhF3OC5 (ORCPT ); Wed, 30 Jun 2021 10:02:57 -0400 Received: from mail.kernel.org ([198.145.29.99]:42880 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235714AbhF3OCQ (ORCPT ); Wed, 30 Jun 2021 10:02:16 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id C3BAB61433; Wed, 30 Jun 2021 13:59:44 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1625061587; bh=v5OBimTBlCfEF3FaB0xZQ7fhYUBBxeJ8vnG2hTzl9Cs=; h=From:To:Cc:Subject:Date:From; b=UhLf0L0iSKvyXCME1IfDYudvAIZPdd4PQmpptJiSx+90b7BBLlGxrREffX1Tex0ya TpbhJ/jPRSrwKQHYtnhLNUohgPV//0fLxm892CGhORXa/KRy7R2rYHnukRj/rHrOG9 7QYbyaDeh6F1DS+6CUuULIWbRoetgplaBYx61UWB/TdFUFCZLrTpyprYfN1ZkXCy1V FQOaotL2JSAehjffWlpXVcsNQnCCGt9ST1/Pt57yKMo58wpe0lxiRh6kKAHCeO1KFP wtDeAu7Ae1k68QDqviz1hjokeXEPS7w8NWqMbLYwNJRTc+QH5p/E/Nal/DgHNikB1W TJK1eUYXdly0w== From: =?utf-8?q?Marek_Beh=C3=BAn?= To: Viresh Kumar , Gregory CLEMENT Cc: Robert Marko , =?utf-8?q?Pali_Roh=C3=A1r?= , Tomasz Maciej Nowak , Anders Trier Olesen , Philip Soares , linux-pm@vger.kernel.org, Sebastian Hesselbarth , linux-arm-kernel@lists.infradead.org, Konstantin Porotchkin , nnet , Nadav Haklai , =?utf-8?q?Marek_Beh=C3=BAn?= , =?utf-8?q?Marek_Beh=C3=BAn?= Subject: [PATCH] cpufreq: armada-37xx: forbid cpufreq for 1.2 GHz variant Date: Wed, 30 Jun 2021 15:59:42 +0200 Message-Id: <20210630135942.29730-1-kabel@kernel.org> X-Mailer: git-send-email 2.31.1 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org The 1.2 GHz variant of the Armada 3720 SOC is unstable with DVFS: when the SOC boots, the WTMI firmware sets clocks and AVS values that work correctly with 1.2 GHz CPU frequency, but random crashes occur once cpufreq driver starts scaling. We do not know currently what is the reason: - it may be that the voltage value for L0 for 1.2 GHz variant provided by the vendor in the OTP is simply incorrect when scaling is used, - it may be that some delay is needed somewhere, - it may be something else. The most sane solution now seems to be to simply forbid the cpufreq driver on 1.2 GHz variant. Signed-off-by: Marek BehĂșn Fixes: 92ce45fb875d ("cpufreq: Add DVFS support for Armada 37xx") Signed-off-by: Marek BehĂșn --- If someone from Marvell could look into this, it would be great since basically 1.2 GHz variant cannot scale, which is a feature that was claimed to be supported by the SOC. --- drivers/cpufreq/armada-37xx-cpufreq.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/drivers/cpufreq/armada-37xx-cpufreq.c b/drivers/cpufreq/armada-37xx-cpufreq.c index 3fc98a3ffd91..1ef3dde9a40b 100644 --- a/drivers/cpufreq/armada-37xx-cpufreq.c +++ b/drivers/cpufreq/armada-37xx-cpufreq.c @@ -104,7 +104,13 @@ struct armada_37xx_dvfs { }; static struct armada_37xx_dvfs armada_37xx_dvfs[] = { +#if 0 + /* + * The cpufreq scaling for 1.2 GHz variant of the SOC is currently + * unstable because we do not know how to configure it properly. + */ {.cpu_freq_max = 1200*1000*1000, .divider = {1, 2, 4, 6} }, +#endif {.cpu_freq_max = 1000*1000*1000, .divider = {1, 2, 4, 5} }, {.cpu_freq_max = 800*1000*1000, .divider = {1, 2, 3, 4} }, {.cpu_freq_max = 600*1000*1000, .divider = {2, 4, 5, 6} },