Received: by 2002:a05:7412:40d:b0:e2:908c:2ebd with SMTP id 13csp1098152rdf; Wed, 22 Nov 2023 05:43:18 -0800 (PST) X-Google-Smtp-Source: AGHT+IH/B08KISjHkSLXxRVeofTNxFT8H86WZ0CClYftNAgjwl2Vuc9deY5iuWq8yQki6h08bd8S X-Received: by 2002:a17:90b:4f4c:b0:280:2985:56af with SMTP id pj12-20020a17090b4f4c00b00280298556afmr2641951pjb.45.1700660597794; Wed, 22 Nov 2023 05:43:17 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1700660597; cv=none; d=google.com; s=arc-20160816; b=Nba9IXw8vrO+TZO8Jb8QkzMY94pszsq5f83iIThcC9pTLtrY6fyxfo0cPa4Od2zSET ZIbWuk7DhnxZ3coDpyTSex5aEhECqj1+IEcE+qTvs8xfrlomajqK/tFEs8HTeTKVqS1z j95Adg3ragZ/iHWzrJTXucL2xpept8HNgvo7f2R46DKyUNBV0HuQ5TZF8QNW88MFfEAy 2OF6rKd2CectHd/9UKugcwoPcrfzNLRW7sgsI/Kcjleq66k2mj2NmwnINPr5bdsYeFbI J49UPhmPy13KBmMAoNb2KlYqCOIVRTm4P5aHKM7cnPSA2aiY5b8m/HT0bgKMyTiV1Bq8 9axg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=YWU5KKna9LF+cw9m3t3tNTIYdzG8MPLSctxria30Q7Q=; fh=K6aTgN9RY2sXoia6N3m9igrU3y0IB6rkI7XcnmixEMo=; b=OUy5Wl+Xk/OJV6kLhXKVee9O+wt5cgSSoHv8L2r+5DHwIAa70XBT3voSjvcgY0YNfx SNyp9sfWp50/Hk1eWam769wdgI02DjiOFQLqTzxP6b8qFKj6IIytggEAte8lLW5+C+jg 94duLNEqUbwxnbHG5EHhZbRaqzvrxDVW+J8tO5JCww90AGcDNt2cHS7leoSAxCIIYT2z GXixV6POBH2hJvImZSI6ikR8H6ZT5cZroP1qNwJHNz45TI9JSR5Vc5Sw22YIwiGF1LN6 EQ4kE5an+BeAVQy9rac62SS5689ccI45jOX5pWYzVJjBATGJZkO+2Jo7TKC3rDYIN78T r8Zw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@dh-electronics.com header.s=dhelectronicscom header.b="xp/xdxve"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=dh-electronics.com Return-Path: Received: from lipwig.vger.email (lipwig.vger.email. [23.128.96.33]) by mx.google.com with ESMTPS id q9-20020a170902dac900b001ce5fce5328si12309624plx.99.2023.11.22.05.43.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 22 Nov 2023 05:43:17 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 as permitted sender) client-ip=23.128.96.33; Authentication-Results: mx.google.com; dkim=pass header.i=@dh-electronics.com header.s=dhelectronicscom header.b="xp/xdxve"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=dh-electronics.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by lipwig.vger.email (Postfix) with ESMTP id E8DC8804C482; Wed, 22 Nov 2023 05:43:14 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at lipwig.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235170AbjKVNmx (ORCPT + 99 others); Wed, 22 Nov 2023 08:42:53 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60880 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235134AbjKVNmq (ORCPT ); Wed, 22 Nov 2023 08:42:46 -0500 Received: from mx2.securetransport.de (mx2.securetransport.de [188.68.39.254]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 696B11A5; Wed, 22 Nov 2023 05:42:39 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=dh-electronics.com; s=dhelectronicscom; t=1700660501; bh=YWU5KKna9LF+cw9m3t3tNTIYdzG8MPLSctxria30Q7Q=; h=From:To:CC:Subject:Date:From; b=xp/xdxvem75my776Lxc2/FpgqkD6OY6JZg/mLbFV/5iX42prIvXoCo81ocDoLPn5K dacD5xhLLmyitNIgpSkyAnPt6dNe1/J4VVGUEVqblLLFqiaPiIE9F7fWa7yuqoB3yp JBAaeb8AeKqePwlppZGeiEUMT9ON40dBkUJCJ17MTfuTNpES594M4ApxkNbHZaUgco QdDXZ2+AJ81T6WpvfVURa+bQtxzMtTUMfpDFpYjTG10p0UuuChupTKcl+8HDVa7aRY MOCNw8/HD/MZQ3NYqeOwMAEZxzDM4LwwKca3hnde5/af3uqspAuAqqjQF83g4rDAKR S1tQc6ln2/1CA== From: Christoph Niedermaier To: CC: Christoph Niedermaier , Viresh Kumar , "Rafael J. Wysocki" , =?UTF-8?q?S=C3=A9bastien=20Szymanski?= , Stefan Agner , Shawn Guo , Marek Vasut , Fabio Estevam , NXP Linux Team , , Subject: [PATCH V2] cpufreq: imx6q: Only disabling 792MHz OPP for i.MX6ULL types below 792MHz Date: Wed, 22 Nov 2023 14:41:13 +0100 Message-ID: <20231122134113.63670-1-cniedermaier@dh-electronics.com> X-klartext: yes MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lipwig.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (lipwig.vger.email [0.0.0.0]); Wed, 22 Nov 2023 05:43:15 -0800 (PST) For a 900MHz i.MX6ULL CPU the 792MHz OPP is disabled. There is no convincing reason to disable this OPP. If a CPU can run at 900MHz, it should also be able to cope with 792MHz. Looking at the voltage level of 792MHz in [1] (page 24, table 10. "Operating Ranges") the current defined OPP is above the minimum. So the voltage level shouldn't be a problem. However in [2] (page 24, table 10. "Operating Ranges"), it is not mentioned that 792MHz OPP isn't allowed. Change it to only disable 792MHz OPP for i.MX6ULL types below 792 MHz. [1] https://www.nxp.com/docs/en/data-sheet/IMX6ULLIEC.pdf [2] https://www.nxp.com/docs/en/data-sheet/IMX6ULLCEC.pdf Fixes: 0aa9abd4c212 ("cpufreq: imx6q: check speed grades for i.MX6ULL") Signed-off-by: Christoph Niedermaier Reviewed-by: Marek Vasut Reviewed-by: Fabio Estevam --- V2: - Improve the commit message - Add Fixes tag - Add Reviewed-by tag --- Cc: Viresh Kumar Cc: "Rafael J. Wysocki" Cc: Sébastien Szymanski Cc: Stefan Agner Cc: Shawn Guo Cc: Marek Vasut Cc: Fabio Estevam Cc: NXP Linux Team Cc: linux-pm@vger.kernel.org Cc: linux-kernel@vger.kernel.org To: linux-arm-kernel@lists.infradead.org --- drivers/cpufreq/imx6q-cpufreq.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/cpufreq/imx6q-cpufreq.c b/drivers/cpufreq/imx6q-cpufreq.c index 494d044b9e72..33728c242f66 100644 --- a/drivers/cpufreq/imx6q-cpufreq.c +++ b/drivers/cpufreq/imx6q-cpufreq.c @@ -327,7 +327,7 @@ static int imx6ul_opp_check_speed_grading(struct device *dev) imx6x_disable_freq_in_opp(dev, 696000000); if (of_machine_is_compatible("fsl,imx6ull")) { - if (val != OCOTP_CFG3_6ULL_SPEED_792MHZ) + if (val < OCOTP_CFG3_6ULL_SPEED_792MHZ) imx6x_disable_freq_in_opp(dev, 792000000); if (val != OCOTP_CFG3_6ULL_SPEED_900MHZ) -- 2.11.0