Re: [PATCH 15/15] arm: dts: imx: Add missing OPP properties for CPUs

From: Lucas Stach
Date: Fri May 25 2018 - 08:00:49 EST


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 <viresh.kumar@xxxxxxxxxx>
> ---
> Â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 = <&reg_arm>;
> > + pu-supply = <&reg_pu>;
> > + soc-supply = <&reg_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 = <&reg_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 = <&reg_arm>;
> > + pu-supply = <&reg_pu>;
> > + soc-supply = <&reg_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 = <&reg_arm>;
> > + pu-supply = <&reg_pu>;
> > + soc-supply = <&reg_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 = <&reg_arm>;
> > + pu-supply = <&reg_pu>;
> > + soc-supply = <&reg_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>;
> > Â };
> > Â };