Received: by 10.223.185.116 with SMTP id b49csp351128wrg; Sat, 10 Feb 2018 08:26:34 -0800 (PST) X-Google-Smtp-Source: AH8x225Cw/7gNSwdywJIAXDluPoAy6ubaiDFimpBeQ8LW7HXO3lSRnNegbncBuzDmeLogQYQRaat X-Received: by 2002:a17:902:a983:: with SMTP id bh3-v6mr5941887plb.237.1518279994504; Sat, 10 Feb 2018 08:26:34 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1518279994; cv=none; d=google.com; s=arc-20160816; b=f3ororQ+r1uNrKFL7ByXfegQA1T70fNqJ8RYtFgHbha6qPMiJLZWWbKO5y26HFV83a uoj/ycjtaw4kClAtPGZzTXv0gKIXWoWWwoH8n66R5MAoMM6/gMqKCiE0O6BRn9r6WEzT BtAdmIsoxXrRYzzwettdnwi+HRW0dKBu+G+rcnmu1CRgv1H9dmj4eV6/vyzg6PWuJzNK Epd+N+IKuce3gRydRnfyThLS+KfF8vpF4oOegO/5p5DoSyZU6cDe7UH4fWX47GrKIPNi 6nrjLq7eeCsbaiJsnDnCAEkKpxX7X8g2BKR9pVa+ped/zgA5w7CtD4dmAGNppWvbeGCF AV2g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :references:in-reply-to:mime-version:dkim-signature :arc-authentication-results; bh=80ymqxIHhSSgwl6YwKJ5qs+VQuYHr8wsYDJm6GKPCME=; b=Ola0XSKsebA3IMg3dSFGiNwlu0O9UTZei5+hOAWcEjoxl/xcC6Sh+0mpfkZJ8PyI5s 7R13wlREYhq3uHFMFU2sT0QC0vM/0uv9FsDNYL7lYBiJRN4Ne+kZu3myJzq714PQa+L/ W7o1m8KRNOx7Ex7ZdROAdkvx8l2laQFO0kh5ge4G5jL84rYDg6YULhnFAWmqD+q+hNrw qM3B8QQGwTDyqs+Da3E0qoOyrMoPWtNgrNMTvrMoDmhpVHiyRjB9TFyQ4sicDP1Wsk+v MRlzL+gxyoxLKK/rB/Ajh25ibXqg75XxOU6HxQqMhCqbS96B1rGvf2UjDCv6fz1+sVc1 dm9A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=TGToD2IJ; 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=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id s19-v6si3231125plp.116.2018.02.10.08.26.20; Sat, 10 Feb 2018 08:26:34 -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=@gmail.com header.s=20161025 header.b=TGToD2IJ; 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=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751185AbeBJQZk (ORCPT + 99 others); Sat, 10 Feb 2018 11:25:40 -0500 Received: from mail-oi0-f67.google.com ([209.85.218.67]:35269 "EHLO mail-oi0-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750832AbeBJQZi (ORCPT ); Sat, 10 Feb 2018 11:25:38 -0500 Received: by mail-oi0-f67.google.com with SMTP id e15so8290340oiy.2; Sat, 10 Feb 2018 08:25:38 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=80ymqxIHhSSgwl6YwKJ5qs+VQuYHr8wsYDJm6GKPCME=; b=TGToD2IJ5BSXQRe0Lb2yiV5azbPosjHinqsBECqprX8txBHRx9zJ6YVtMJWtG+PVis AFC9/LiTKz6I7Zfj+h2oDmUX5exFUvzhAxZQac2rwx0KES+1g/wwh9dYQ9zvdW0I0UN3 ZGHbn2E6KJ3zh+YJxTCWWNhpbmyqoiQHgTkUUCYdTWykdhEK3CLP+EDmi9nbq6/n6TOi hn0AxabRL05elTikzZjJFbX4RCl70K5Ok8HegEes32UvejvACiEhbt94/RZPTwA04dUD lkmm4hNY5MuDeRrOL9D6rcrAc0T52npUNkKfQd1CFmqhR392g4YLzVgFFUFP8BG837pZ XRDg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=80ymqxIHhSSgwl6YwKJ5qs+VQuYHr8wsYDJm6GKPCME=; b=XTVE4fDlvpvlF9Muqs51E9RnJENWRDM1dGLBEHmvhEPngqmXu1rn2BeKgrsyktI8D1 hou25UwnvE76nbJayvZAyglHe8jV9CBR5KBGiKlsW4FqhRDOGchl84sr8RkRk2CgLEZy J75sfP9LjrZySzeuwrFKfbJxxJjYNa5L24I0idUOFwABU9HXSK8j1kjNbbKWvviTLN+u uKhVarjOHStNnWSIi8eQpTOttiOWjMq/O0F6irRadvhK5zc0DidADp7EX8MUtYz/tr0m LURpkyI3Bduk/oHkf4lB4Wbsm+AAOT+kH2v0L+/Vjs0n/iXzC08AVfKPWFrlFg+0+RXr QRaA== X-Gm-Message-State: APf1xPALdqegHNV7Jz4zjdCWXh7ORLDM6hf9YLUCeRtbeVJNLxU4KXy2 hUeg+c+5qzX4s8scnN50ha9z/91l+b5SCIJuo18= X-Received: by 10.202.244.137 with SMTP id s131mr4473500oih.327.1518279937528; Sat, 10 Feb 2018 08:25:37 -0800 (PST) MIME-Version: 1.0 Received: by 10.157.5.137 with HTTP; Sat, 10 Feb 2018 08:25:37 -0800 (PST) In-Reply-To: <20180118235836.17393-1-stefan@agner.ch> References: <20180118235836.17393-1-stefan@agner.ch> From: Fabio Estevam Date: Sat, 10 Feb 2018 14:25:37 -0200 Message-ID: Subject: Re: [PATCH] cpufreq: imx6q: support frequencies >528MHz for i.MX6UL/ULL To: Stefan Agner , Yongcai Huang Cc: rjw@rjwysocki.net, viresh kumar , linux-pm@vger.kernel.org, Marcel Ziswiler , max.oss.09@gmail.com, linux-kernel , Octavian Purdila , Fabio Estevam , Shawn Guo , "moderated list:ARM/FREESCALE IMX / MXC ARM ARCHITECTURE" , NXP Linux Team Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Anson, On Thu, Jan 18, 2018 at 9:58 PM, 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); Could you please help reviewing this patch? Thanks