Received: by 2002:ac0:a594:0:0:0:0:0 with SMTP id m20-v6csp3375199imm; Fri, 25 May 2018 04:47:17 -0700 (PDT) X-Google-Smtp-Source: AB8JxZpMl4w6T1ICkOgdHVoDJeLWHkzS09bnHfKOiCyAPL2XxaxG1LesDuWCeHpRr1cueNfLzm3D X-Received: by 2002:a62:bd18:: with SMTP id a24-v6mr2196367pff.30.1527248837831; Fri, 25 May 2018 04:47:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1527248837; cv=none; d=google.com; s=arc-20160816; b=G2TqRV827pItyt3ZcA9doZ7dAvh3kjV86cuALX2VhbjVK1fdYOy61AHmSUL4Ci+AL1 llftyMWIcjal1uKa/2RF5cN+oEaOberqxrNOli+tJlFyOU79uG1+I6FkMFcGWEv6ngSb Qci4JAb0yui76sE2blMojO6QXpERanV1Bfgta5Ot2KZRYNxXaODZTE25pG5xL6lPNSSD oDYv8F1jOYQZ2/n3S1OlHecsPTVNxYMMusNU1CBCL11Kwhjd0IcQ9cF/47lGgp0kwaw+ joIVS+XU8Y1G3OF0D1CKk2JPYynFNwFSekNqdYapodSvyGC60hk1ycLHC6A0EIvoj7bt c5ww== 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:date:cc:to:from:subject:message-id :arc-authentication-results; bh=kQP9aT3yRbILkkwya8b8YrIPkPhjS/x+/BYHCDWclrg=; b=zFAgm2Y0dtwLO/YhQKiCs6UyZMzlQBAkSdktGkxR0G7TTkn2+W0BNlfT7OIpgKbDrt tiQ8Ss1eCZQu19Q7h9qTROt42+gQWEvmHE6uyq+cyWHM4V+5o/yxWvl7U8B3KSWpe/kp UwVG0q3YRfuo2xspKgAY+nG814Yd6k6Wv7SwP2XIWjrRY10t+s/kHHofnViPuoExLPfK xjT2Pn1oyLyzd2koEJY1JFfIByu/DCVzbHpceN/Dz5WTqg1zOkIZPP+FQlLJQY3gDb2n T3DZ7JqtB6V2UAP68lOmMOnfQ8BnHNW1Mnv9MoEfMoWTZ1LXhY46SoxH7n252y09FcxS X1kA== 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 e14-v6si18176999pgv.516.2018.05.25.04.47.03; Fri, 25 May 2018 04:47:17 -0700 (PDT) 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 S966963AbeEYLqP (ORCPT + 99 others); Fri, 25 May 2018 07:46:15 -0400 Received: from metis.ext.pengutronix.de ([85.220.165.71]:41105 "EHLO metis.ext.pengutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S966631AbeEYLqM (ORCPT ); Fri, 25 May 2018 07:46:12 -0400 Received: from weser.hi.pengutronix.de ([2001:67c:670:100:fa0f:41ff:fe58:4010]) by metis.ext.pengutronix.de with esmtp (Exim 4.89) (envelope-from ) id 1fMBAb-0002zZ-9m; Fri, 25 May 2018 13:46:05 +0200 Message-ID: <1527248760.3472.6.camel@pengutronix.de> Subject: Re: [PATCH 15/15] arm: dts: imx: Add missing OPP properties for CPUs From: Lucas Stach To: Viresh Kumar , arm@kernel.org, Shawn Guo , Sascha Hauer , Pengutronix Kernel Team , Fabio Estevam , Rob Herring , Mark Rutland Cc: devicetree@vger.kernel.org, Vincent Guittot , Daniel Lezcano , linux-kernel@vger.kernel.org, chris.redpath@arm.com, ionela.voinescu@arm.com, linux-arm-kernel@lists.infradead.org Date: Fri, 25 May 2018 13:46:00 +0200 In-Reply-To: <264124e14b966a1bbc07c364fbd89fc55aa765e6.1527244201.git.viresh.kumar@linaro.org> References: <264124e14b966a1bbc07c364fbd89fc55aa765e6.1527244201.git.viresh.kumar@linaro.org> Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.22.6-1+deb9u1 Mime-Version: 1.0 Content-Transfer-Encoding: 8bit X-SA-Exim-Connect-IP: 2001:67c:670:100:fa0f:41ff:fe58:4010 X-SA-Exim-Mail-From: l.stach@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: linux-kernel@vger.kernel.org Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Viresh, Am Freitag, den 25.05.2018, 16:02 +0530 schrieb Viresh Kumar: > The OPP properties, like "operating-points", should either be present > for all the CPUs of a cluster or none. If these are present only for a > subset of CPUs of a cluster then things will start falling apart as soon > as the CPUs are brought online in a different order. For example, this > will happen because the operating system looks for such properties in > the CPU node it is trying to bring up, so that it can create an OPP > table. > > Add such missing properties. > > Fix other missing properties (like clocks, supply, clock latency) as > well to make it all work. This is a lot of duplicate information for what is effectively a shared cluster wide thing. This does absolutely not _feel_ right. What problem are you solving here? Why do we need all this duplicate information? Why can't we fix it by falling back to looking at cpu0 if needed? Regards, Lucas > Signed-off-by: Viresh Kumar > --- >  arch/arm/boot/dts/imx6dl.dtsi      | 23 ++++++++++ >  arch/arm/boot/dts/imx6q-cm-fx6.dts | 66 +++++++++++++++++++++++++++++ >  arch/arm/boot/dts/imx6q.dtsi       | 87 ++++++++++++++++++++++++++++++++++++-- >  arch/arm/boot/dts/imx7d.dtsi       |  5 +++ >  4 files changed, 178 insertions(+), 3 deletions(-) > > diff --git a/arch/arm/boot/dts/imx6dl.dtsi b/arch/arm/boot/dts/imx6dl.dtsi > index b384913c34dd..cc8ffc42d128 100644 > --- a/arch/arm/boot/dts/imx6dl.dtsi > +++ b/arch/arm/boot/dts/imx6dl.dtsi > @@ -50,6 +50,29 @@ > >   device_type = "cpu"; > >   reg = <1>; > >   next-level-cache = <&L2>; > > + operating-points = < > > + /* kHz    uV */ > > + 996000  1250000 > > + 792000  1175000 > > + 396000  1150000 > > + >; > > + fsl,soc-operating-points = < > > + /* ARM kHz  SOC-PU uV */ > > > + 996000 1175000 > > > + 792000 1175000 > > > + 396000 1175000 > > + >; > > + clock-latency = <61036>; /* two CLK32 periods */ > > + clocks = <&clks IMX6QDL_CLK_ARM>, > > +  <&clks IMX6QDL_CLK_PLL2_PFD2_396M>, > > +  <&clks IMX6QDL_CLK_STEP>, > > +  <&clks IMX6QDL_CLK_PLL1_SW>, > > +  <&clks IMX6QDL_CLK_PLL1_SYS>; > > + clock-names = "arm", "pll2_pfd2_396m", "step", > > +       "pll1_sw", "pll1_sys"; > > + arm-supply = <®_arm>; > > + pu-supply = <®_pu>; > > + soc-supply = <®_soc>; > >   }; > >   }; >   > diff --git a/arch/arm/boot/dts/imx6q-cm-fx6.dts b/arch/arm/boot/dts/imx6q-cm-fx6.dts > index 65ef4cacbc71..18ae4f3be6e3 100644 > --- a/arch/arm/boot/dts/imx6q-cm-fx6.dts > +++ b/arch/arm/boot/dts/imx6q-cm-fx6.dts > @@ -187,6 +187,72 @@ > >   >; >  }; >   > +&cpu1 { > > + /* > > +  * Although the imx6q fuse indicates that 1.2GHz operation is possible, > > +  * the module behaves unstable at this frequency. Hence, remove the > > +  * 1.2GHz operation point here. > > +  */ > > + operating-points = < > > > + /* kHz uV */ > > > + 996000 1250000 > > > + 852000 1250000 > > > + 792000 1175000 > > > + 396000 975000 > > + >; > > + fsl,soc-operating-points = < > > > + /* ARM kHz SOC-PU uV */ > > > + 996000 1250000 > > > + 852000 1250000 > > > + 792000 1175000 > > > + 396000 1175000 > > + >; > +}; > + > +&cpu2 { > > + /* > > +  * Although the imx6q fuse indicates that 1.2GHz operation is possible, > > +  * the module behaves unstable at this frequency. Hence, remove the > > +  * 1.2GHz operation point here. > > +  */ > > + operating-points = < > > > + /* kHz uV */ > > > + 996000 1250000 > > > + 852000 1250000 > > > + 792000 1175000 > > > + 396000 975000 > > + >; > > + fsl,soc-operating-points = < > > > + /* ARM kHz SOC-PU uV */ > > > + 996000 1250000 > > > + 852000 1250000 > > > + 792000 1175000 > > > + 396000 1175000 > > + >; > +}; > + > +&cpu3 { > > + /* > > +  * Although the imx6q fuse indicates that 1.2GHz operation is possible, > > +  * the module behaves unstable at this frequency. Hence, remove the > > +  * 1.2GHz operation point here. > > +  */ > > + operating-points = < > > > + /* kHz uV */ > > > + 996000 1250000 > > > + 852000 1250000 > > > + 792000 1175000 > > > + 396000 975000 > > + >; > > + fsl,soc-operating-points = < > > > + /* ARM kHz SOC-PU uV */ > > > + 996000 1250000 > > > + 852000 1250000 > > > + 792000 1175000 > > > + 396000 1175000 > > + >; > +}; > + >  &ecspi1 { > >   cs-gpios = <&gpio2 30 GPIO_ACTIVE_HIGH>, <&gpio3 19 GPIO_ACTIVE_HIGH>; > >   pinctrl-names = "default"; > diff --git a/arch/arm/boot/dts/imx6q.dtsi b/arch/arm/boot/dts/imx6q.dtsi > index 70483ce72ba6..78b89bb1bfed 100644 > --- a/arch/arm/boot/dts/imx6q.dtsi > +++ b/arch/arm/boot/dts/imx6q.dtsi > @@ -50,25 +50,106 @@ > >   soc-supply = <®_soc>; > >   }; >   > > - cpu@1 { > > > + cpu1: cpu@1 { > >   compatible = "arm,cortex-a9"; > >   device_type = "cpu"; > >   reg = <1>; > >   next-level-cache = <&L2>; > > + operating-points = < > > + /* kHz    uV */ > > + 1200000 1275000 > > + 996000  1250000 > > + 852000  1250000 > > + 792000  1175000 > > + 396000  975000 > > + >; > > + fsl,soc-operating-points = < > > + /* ARM kHz  SOC-PU uV */ > > + 1200000 1275000 > > > + 996000 1250000 > > > + 852000 1250000 > > > + 792000 1175000 > > > + 396000 1175000 > > + >; > > + clock-latency = <61036>; /* two CLK32 periods */ > > + clocks = <&clks IMX6QDL_CLK_ARM>, > > +  <&clks IMX6QDL_CLK_PLL2_PFD2_396M>, > > +  <&clks IMX6QDL_CLK_STEP>, > > +  <&clks IMX6QDL_CLK_PLL1_SW>, > > +  <&clks IMX6QDL_CLK_PLL1_SYS>; > > + clock-names = "arm", "pll2_pfd2_396m", "step", > > +       "pll1_sw", "pll1_sys"; > > + arm-supply = <®_arm>; > > + pu-supply = <®_pu>; > > + soc-supply = <®_soc>; > >   }; >   > > - cpu@2 { > > > + cpu2: cpu@2 { > >   compatible = "arm,cortex-a9"; > >   device_type = "cpu"; > >   reg = <2>; > >   next-level-cache = <&L2>; > > + operating-points = < > > + /* kHz    uV */ > > + 1200000 1275000 > > + 996000  1250000 > > + 852000  1250000 > > + 792000  1175000 > > + 396000  975000 > > + >; > > + fsl,soc-operating-points = < > > + /* ARM kHz  SOC-PU uV */ > > + 1200000 1275000 > > > + 996000 1250000 > > > + 852000 1250000 > > > + 792000 1175000 > > > + 396000 1175000 > > + >; > > + clock-latency = <61036>; /* two CLK32 periods */ > > + clocks = <&clks IMX6QDL_CLK_ARM>, > > +  <&clks IMX6QDL_CLK_PLL2_PFD2_396M>, > > +  <&clks IMX6QDL_CLK_STEP>, > > +  <&clks IMX6QDL_CLK_PLL1_SW>, > > +  <&clks IMX6QDL_CLK_PLL1_SYS>; > > + clock-names = "arm", "pll2_pfd2_396m", "step", > > +       "pll1_sw", "pll1_sys"; > > + arm-supply = <®_arm>; > > + pu-supply = <®_pu>; > > + soc-supply = <®_soc>; > >   }; >   > > - cpu@3 { > > > + cpu3: cpu@3 { > >   compatible = "arm,cortex-a9"; > >   device_type = "cpu"; > >   reg = <3>; > >   next-level-cache = <&L2>; > > + operating-points = < > > + /* kHz    uV */ > > + 1200000 1275000 > > + 996000  1250000 > > + 852000  1250000 > > + 792000  1175000 > > + 396000  975000 > > + >; > > + fsl,soc-operating-points = < > > + /* ARM kHz  SOC-PU uV */ > > + 1200000 1275000 > > > + 996000 1250000 > > > + 852000 1250000 > > > + 792000 1175000 > > > + 396000 1175000 > > + >; > > + clock-latency = <61036>; /* two CLK32 periods */ > > + clocks = <&clks IMX6QDL_CLK_ARM>, > > +  <&clks IMX6QDL_CLK_PLL2_PFD2_396M>, > > +  <&clks IMX6QDL_CLK_STEP>, > > +  <&clks IMX6QDL_CLK_PLL1_SW>, > > +  <&clks IMX6QDL_CLK_PLL1_SYS>; > > + clock-names = "arm", "pll2_pfd2_396m", "step", > > +       "pll1_sw", "pll1_sys"; > > + arm-supply = <®_arm>; > > + pu-supply = <®_pu>; > > + soc-supply = <®_soc>; > >   }; > >   }; >   > diff --git a/arch/arm/boot/dts/imx7d.dtsi b/arch/arm/boot/dts/imx7d.dtsi > index 4c9877ec29f2..5434a8aa5602 100644 > --- a/arch/arm/boot/dts/imx7d.dtsi > +++ b/arch/arm/boot/dts/imx7d.dtsi > @@ -21,6 +21,11 @@ > >   compatible = "arm,cortex-a7"; > >   device_type = "cpu"; > >   reg = <1>; > > + operating-points = < > > > + /* KHz uV */ > > > + 996000 1075000 > > > + 792000 975000 > > + >; > >   clock-frequency = <996000000>; > >   }; > >   };