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=-15.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS 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 D8CE4C11F65 for ; Wed, 30 Jun 2021 15:22:44 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id ADC246147D for ; Wed, 30 Jun 2021 15:22:44 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235466AbhF3PZM (ORCPT ); Wed, 30 Jun 2021 11:25:12 -0400 Received: from vps0.lunn.ch ([185.16.172.187]:35010 "EHLO vps0.lunn.ch" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235417AbhF3PZL (ORCPT ); Wed, 30 Jun 2021 11:25:11 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lunn.ch; s=20171124; h=In-Reply-To:Content-Transfer-Encoding:Content-Disposition: Content-Type:MIME-Version:References:Message-ID:Subject:Cc:To:From:Date:From: Sender:Reply-To:Subject:Date:Message-ID:To:Cc:MIME-Version:Content-Type: Content-Transfer-Encoding:Content-ID:Content-Description:Content-Disposition: In-Reply-To:References; bh=9R9P8AiD4eICRk/YycK6n/jr3g/PddKIech/QyoVcCo=; b=Hb VyiP2kUlh1k9jUNMTHQO5z/87+0mEoOY+NB8aJPdxq1YloHOWGQuzlCZy5IEBXcqLy/iOAWJeABEm sX5l1eLU8jCQC4ia5O/qGoq1i5cQOLi2FCGElfQdz7AGTunhtulJLGKKSKqB2mntCbFpfuCyjmHK9 dEvz5qkKuUR3BtU=; Received: from andrew by vps0.lunn.ch with local (Exim 4.94.2) (envelope-from ) id 1lyc2l-00Bg9B-Od; Wed, 30 Jun 2021 17:22:27 +0200 Date: Wed, 30 Jun 2021 17:22:27 +0200 From: Andrew Lunn To: Marek =?iso-8859-1?Q?Beh=FAn?= Cc: Viresh Kumar , Gregory CLEMENT , Robert Marko , Pali =?iso-8859-1?Q?Roh=E1r?= , 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 , Marek =?iso-8859-1?Q?Beh=FAn?= Subject: Re: [PATCH] cpufreq: armada-37xx: forbid cpufreq for 1.2 GHz variant Message-ID: References: <20210630135942.29730-1-kabel@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20210630135942.29730-1-kabel@kernel.org> Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org On Wed, Jun 30, 2021 at 03:59:42PM +0200, Marek Behún wrote: > 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") > --- > 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 I suspect you will get some drive by patches from bot handlers removing the #if 0, since such code is not liked within the kernel, and bot handlers blindly do what the bot tells them. So i would suggest you avoid #if 0, and move the .cpu_req_max entry into the comment. Andrew