Received: by 10.223.176.5 with SMTP id f5csp577506wra; Fri, 9 Feb 2018 03:55:41 -0800 (PST) X-Google-Smtp-Source: AH8x227hesBZQaRKqffNB61e4KKH6/IQNsph0bwkIP1JmuL8aSk0zpGo2X/mJOmADlvrHKqUF90b X-Received: by 10.98.157.93 with SMTP id i90mr2655385pfd.58.1518177341782; Fri, 09 Feb 2018 03:55:41 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1518177341; cv=none; d=google.com; s=arc-20160816; b=Pd/NrQgTbCxfJdMiqDhC94myTmnUbEon1zp7C/ZSLLqsoz37L+AiNgzjkKDScBS1HE ElYBCct/vtKPGm0L4cblaP/BGz2YvaccPcUjRDJ7RPtJux8PBfrUn1nZcLThOg6fbgT4 22BkH3mvx6RigRSI5621BK7xgpcjHngK49l337+icS0dmwejWpY3luEN77eupLAS2U4I 8D+cX6F3x3UYA4tDfjU2WG57TMi5/sHXcQIR0t0HxheIfFWTf5KArzt6R0WGA5Wrp09J pr8AMGVprTKeVDXWOvPUc1tBnPIbxCpp06Ktrbt4wRjzVADtELTQJL3pXOlSzdbAshP5 RTEQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :arc-authentication-results; bh=6xbEEQnBpQIzNzF8gTFZKrDf12c177ytXvxwZBcHzJY=; b=Qulcw4AUlP85TCjii++7GY2ylqK3+o5CYmGmHAcnykP3/VPM2kmRugpAHSG5AqOL5H dFijAJmuNzefiwXMz15vaQ0gWOxxo7MmrpalIHPXv9PhwWxV13EVOLoDG1lzHJ9dL0cR rXjTsTiosd4gj3vupOSJLvuP+n2d872iYFvi8OdyrCzj28VoUHfmiVDfisovZXsiIj1H iB+5azZ7DMwd7vETbBChZ4acG8v2iJOKNd2xvDOdgtohsdHG39szK11c9uxIz3Ck9mnm A9hPrpMfxscxnPz+TszObCFEjXMg3FYFoXmffDLwkcz3vtcD6386XlXInG7BWwPZpPiP 6FqA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id h5-v6si1463784pll.475.2018.02.09.03.55.27; Fri, 09 Feb 2018 03:55:41 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751150AbeBILyJ (ORCPT + 99 others); Fri, 9 Feb 2018 06:54:09 -0500 Received: from cloudserver094114.home.pl ([79.96.170.134]:54139 "EHLO cloudserver094114.home.pl" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750997AbeBILyI (ORCPT ); Fri, 9 Feb 2018 06:54:08 -0500 Received: from 79.184.255.223.ipv4.supernova.orange.pl (79.184.255.223) (HELO aspire.rjw.lan) by serwer1319399.home.pl (79.96.170.134) with SMTP (IdeaSmtpServer 0.83) id 7741211bb6cf07d6; Fri, 9 Feb 2018 12:54:05 +0100 From: "Rafael J. Wysocki" To: Stefan Agner Cc: viresh.kumar@linaro.org, fabio.estevam@nxp.com, octavian.purdila@nxp.com, shawnguo@kernel.org, max.oss.09@gmail.com, marcel.ziswiler@toradex.com, linux-pm@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] cpufreq: imx6q: support frequencies >528MHz for i.MX6UL/ULL Date: Fri, 09 Feb 2018 12:52:22 +0100 Message-ID: <1619001.eqAapW3X4z@aspire.rjw.lan> In-Reply-To: <20180118235836.17393-1-stefan@agner.ch> References: <20180118235836.17393-1-stefan@agner.ch> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Friday, January 19, 2018 12:58:36 AM CET Stefan Agner wrote: > Depending on SKU i.MX6UL/i.MX6ULL support frequencies up to 900MHz. > Use PLL1 sys clock for all operating points higher than 528MHz. > > Note: For higher operating points VDD_SOC_IN needs to be 125mV > higher than the ARM set-point (see datasheet). Specifically, the > i.MX6UL/ULL EVK boards have an external DC regulator which needs > adjustment. The regulator adjustment is not covered with this > change. > > Signed-off-by: Stefan Agner This makes sense to me, but I need someone with the requisite platform knowledge to review it. > --- > drivers/cpufreq/imx6q-cpufreq.c | 14 ++++++++------ > 1 file changed, 8 insertions(+), 6 deletions(-) > > diff --git a/drivers/cpufreq/imx6q-cpufreq.c b/drivers/cpufreq/imx6q-cpufreq.c > index 628fe899cb48..840f6386c780 100644 > --- a/drivers/cpufreq/imx6q-cpufreq.c > +++ b/drivers/cpufreq/imx6q-cpufreq.c > @@ -114,12 +114,14 @@ static int imx6q_set_target(struct cpufreq_policy *policy, unsigned int index) > */ > clk_set_rate(arm_clk, (old_freq >> 1) * 1000); > clk_set_parent(pll1_sw_clk, pll1_sys_clk); > - if (freq_hz > clk_get_rate(pll2_pfd2_396m_clk)) > - clk_set_parent(secondary_sel_clk, pll2_bus_clk); > - else > - clk_set_parent(secondary_sel_clk, pll2_pfd2_396m_clk); > - clk_set_parent(step_clk, secondary_sel_clk); > - clk_set_parent(pll1_sw_clk, step_clk); > + if (freq_hz <= clk_get_rate(pll2_bus_clk)) { > + if (freq_hz > clk_get_rate(pll2_pfd2_396m_clk)) > + clk_set_parent(secondary_sel_clk, pll2_bus_clk); > + else > + clk_set_parent(secondary_sel_clk, pll2_pfd2_396m_clk); > + clk_set_parent(step_clk, secondary_sel_clk); > + clk_set_parent(pll1_sw_clk, step_clk); > + } > } else { > clk_set_parent(step_clk, pll2_pfd2_396m_clk); > clk_set_parent(pll1_sw_clk, step_clk); >