Received: by 10.223.185.116 with SMTP id b49csp1926523wrg; Mon, 12 Feb 2018 00:57:03 -0800 (PST) X-Google-Smtp-Source: AH8x2277tySZDvebh351L5dGckkm2o+2UoTk/5yBy9hrcblc9BCLKbOboq7bPDjzlaYebxl5MLL+ X-Received: by 10.99.146.68 with SMTP id s4mr4354005pgn.295.1518425823044; Mon, 12 Feb 2018 00:57:03 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1518425823; cv=none; d=google.com; s=arc-20160816; b=AIQeLzeGdQtJeojpxcubqna8ALdgepPKuTxtCeDQPhMK0GW1xVd+LMxtq7Xi0xYHg+ TV37IVt2AXxHA4BwhH2wR/jBgernEEbKdXQmzVleqw0XSZQWC00geXbp3f+aKbXsrn13 hRkBS8UoiXygTZ0sIaO3uvcMoynJyrY5r2L2NTFiUtG8ody71pcUClNZREZpttFsRviQ pMflu1FF9f9LuNa6Kw7pUXib4IVEbMQNgVyUic0GvQHTEgVlnqeQdQNK0DCeE7n8RKgO wouTYh8tYu3UXSuc40Le1O2ry44dBSahG0JhuAhrlTQlLEukDVH0Z4Sz/KE36E/NFUm8 15Jw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature:arc-authentication-results; bh=8o6zuxpn7Vka+BfNj3brBgV0sOBmagtjeWlpL36kxTc=; b=h68cmzmLv8LsWgAXg9+A3GACkhxWVrZ93zgLofr/fz/HiyrmP1KTn+/kAVgG1swRO2 gl5b7+aAq4vPxkopXFNb7VPUI+UcGtUIdrHJMUDNC4a1a7sDPPlRNWtmbkalqXm/CNJR I39hdbckusd7/RTTCrk6Ipxl7T+wT6lX0sbn9eKIAKmjU7iG9rWBlGt3gOi9Mz7/Myho 8t7zzr43vaZaeUZMgtoiA0ZGPH392EL+Dny6kcvO8TYJIgceaRxd+9Jfz+aJ/lAFOCJm 37YrD7DhAz+tv+AR1dsuomZdofH1NPEmWcA2wKoW/0ty+tIDZM85zuDR/8fjX5YxYXZr z6wA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=XcWcELpe; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id h90si6057743pfa.257.2018.02.12.00.56.48; Mon, 12 Feb 2018 00:57:02 -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; dkim=pass header.i=@linaro.org header.s=google header.b=XcWcELpe; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933138AbeBLIxJ (ORCPT + 99 others); Mon, 12 Feb 2018 03:53:09 -0500 Received: from mail-pl0-f65.google.com ([209.85.160.65]:43182 "EHLO mail-pl0-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933125AbeBLIxG (ORCPT ); Mon, 12 Feb 2018 03:53:06 -0500 Received: by mail-pl0-f65.google.com with SMTP id f4so4724174plr.10 for ; Mon, 12 Feb 2018 00:53:06 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=8o6zuxpn7Vka+BfNj3brBgV0sOBmagtjeWlpL36kxTc=; b=XcWcELpeaUwjxMyuFrKZiejyoxleZjVRd8l6R0KlOMaUNOobnP50uRVP5FPxEIcjsW 9WE3fLKOLZfr5gT7bZ8Mw2rDZhZe0iRttLRHxhCaaBdH7xh1VcD8of+HbssATwRGAlQT VhMDZLFJ0I2vJxm3MTK2RSBrs37Oc4rASJPB0= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=8o6zuxpn7Vka+BfNj3brBgV0sOBmagtjeWlpL36kxTc=; b=pXSetv8bKYDXZhaDMq02nlzq2boZr1nrAOVnR61LBheBvCAyUUGX+dMqewD/RvaE3k JnAZQ23/q8kpRzAKfxXXTCykz0OAu1G2rTJoWLbWo8KrkZjAygNcVfMcRctclvFX+IG7 t2dryjBWUMmN/VhuHemh5PEUqHHoL3UTUaQnODudX9GQt8EVrT9PnMIiDRNfCqUQF7wE zSfaZ8L6EekLM/uqquwXObDqsztg2XM0F0oaQ4EVhrG/+X79Qv5SJUu5Rqbu8i57jBAz CNaXS7VtVFcfT3Gr2UOCT2Fz2mFHWKcoYFyXV+Tvrgjt9vmwNLTQNlnBasuJxLKpOv4k JMeg== X-Gm-Message-State: APf1xPBe5DRpvWPk13Gc17CG4b65UvJZyNWjkSgWRsJfW4KZ8LEJfi0g HNEZz7mW7sb6e3wY9bzSOBi9dQ== X-Received: by 2002:a17:902:5a88:: with SMTP id r8-v6mr6907384pli.426.1518425585321; Mon, 12 Feb 2018 00:53:05 -0800 (PST) Received: from localhost ([122.172.134.6]) by smtp.gmail.com with ESMTPSA id j7sm5148991pfh.39.2018.02.12.00.53.04 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 12 Feb 2018 00:53:04 -0800 (PST) Date: Mon, 12 Feb 2018 14:23:02 +0530 From: Viresh Kumar To: Stefan Agner Cc: rjw@rjwysocki.net, 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 Message-ID: <20180212085302.GR28462@vireshk-i7> References: <20180118235836.17393-1-stefan@agner.ch> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180118235836.17393-1-stefan@agner.ch> User-Agent: Mutt/1.5.24 (2015-08-30) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 19-01-18, 00:58, 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 > --- > 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); Acked-by: Viresh Kumar -- viresh