mbox series

[v2,0/7] imx8mq: updates for the interconnect fabric

Message ID 20201201123932.12312-1-martin.kepplinger@puri.sm
Headers show
Series imx8mq: updates for the interconnect fabric | expand

Message

Martin Kepplinger Dec. 1, 2020, 12:39 p.m. UTC
revision history:
v2: (thanks Lucas)
 * reorder and clean up defconfig changes
 * use "dram" for the interconnect path name and document it

v1:
 * link: https://lore.kernel.org/linux-arm-kernel/20201201100124.4676-1-martin.kepplinger@puri.sm/T/

thanks,
                        martin


Leonard Crestez (1):
  arm64: dts: imx8m: Add NOC nodes

Martin Kepplinger (6):
  arm64: dts: imx8mq: Add interconnect provider property
  arm64: dts: imx8mq: Add interconnect for lcdif
  dt-bindings: mxsfb: Add interconnect bindings for LCDIF path
  interconnect: imx8mq: Use icc_sync_state
  arm64: defconfig: updates for 5.10
  arm64: defconfig: Enable interconnect for imx8mq

 .../devicetree/bindings/display/mxsfb.txt     |  6 ++
 arch/arm64/boot/dts/freescale/imx8mm.dtsi     | 22 +++++
 arch/arm64/boot/dts/freescale/imx8mn.dtsi     | 22 +++++
 arch/arm64/boot/dts/freescale/imx8mq.dtsi     | 26 ++++++
 arch/arm64/configs/defconfig                  | 85 ++++++-------------
 drivers/interconnect/imx/imx8mq.c             |  2 +
 6 files changed, 104 insertions(+), 59 deletions(-)

Comments

Georgi Djakov Dec. 1, 2020, 12:56 p.m. UTC | #1
Hi Martin,

Thank you for sending the patches.

On 1.12.20 14:39, Martin Kepplinger wrote:
> From: Leonard Crestez <leonard.crestez@nxp.com>
> 
> Add initial support for dynamic frequency scaling of main NOC.
> 
> Make DDRC the parent of the NOC (using passive governor) so that the
> main NOC is automatically scaled together with DDRC by default.
> 
> Support for proactive scaling via interconnect will come on top.
> 
> Signed-off-by: Leonard Crestez <leonard.crestez@nxp.com>
> Tested-by: Martin Kepplinger <martin.kepplinger@puri.sm> (imx8mq)

As you are sending this, i believe that it should have your signed-off 
line (please check Documentation/process/submitting-patches.rst).

Also please give people some time to look into this (at least 1-2 weeks) 
before submitting a new version.

Thanks,
Georgi

> ---
>   arch/arm64/boot/dts/freescale/imx8mm.dtsi | 22 ++++++++++++++++++++++
>   arch/arm64/boot/dts/freescale/imx8mn.dtsi | 22 ++++++++++++++++++++++
>   arch/arm64/boot/dts/freescale/imx8mq.dtsi | 22 ++++++++++++++++++++++
>   3 files changed, 66 insertions(+)
> 
> diff --git a/arch/arm64/boot/dts/freescale/imx8mm.dtsi b/arch/arm64/boot/dts/freescale/imx8mm.dtsi
> index c824f2615fe8..835b19f0ea42 100644
> --- a/arch/arm64/boot/dts/freescale/imx8mm.dtsi
> +++ b/arch/arm64/boot/dts/freescale/imx8mm.dtsi
> @@ -921,6 +921,28 @@
>   
>   		};
>   
> +		noc: interconnect@32700000 {
> +			compatible = "fsl,imx8mm-noc", "fsl,imx8m-noc";
> +			reg = <0x32700000 0x100000>;
> +			clocks = <&clk IMX8MM_CLK_NOC>;
> +			devfreq = <&ddrc>;
> +			operating-points-v2 = <&noc_opp_table>;
> +
> +			noc_opp_table: opp-table {
> +				compatible = "operating-points-v2";
> +
> +				opp-150M {
> +					opp-hz = /bits/ 64 <150000000>;
> +				};
> +				opp-375M {
> +					opp-hz = /bits/ 64 <375000000>;
> +				};
> +				opp-750M {
> +					opp-hz = /bits/ 64 <750000000>;
> +				};
> +			};
> +		};
> +
>   		aips4: bus@32c00000 {
>   			compatible = "fsl,aips-bus", "simple-bus";
>   			reg = <0x32c00000 0x400000>;
> diff --git a/arch/arm64/boot/dts/freescale/imx8mn.dtsi b/arch/arm64/boot/dts/freescale/imx8mn.dtsi
> index a06d2a6268e6..8e2d413f97d4 100644
> --- a/arch/arm64/boot/dts/freescale/imx8mn.dtsi
> +++ b/arch/arm64/boot/dts/freescale/imx8mn.dtsi
> @@ -772,6 +772,28 @@
>   
>   		};
>   
> +		noc: interconnect@32700000 {
> +			compatible = "fsl,imx8mn-noc", "fsl,imx8m-noc";
> +			reg = <0x32700000 0x100000>;
> +			clocks = <&clk IMX8MN_CLK_NOC>;
> +			devfreq = <&ddrc>;
> +			operating-points-v2 = <&noc_opp_table>;
> +
> +			noc_opp_table: opp-table {
> +				compatible = "operating-points-v2";
> +
> +				opp-100M {
> +					opp-hz = /bits/ 64 <100000000>;
> +				};
> +				opp-600M {
> +					opp-hz = /bits/ 64 <600000000>;
> +				};
> +				opp-800M {
> +					opp-hz = /bits/ 64 <800000000>;
> +				};
> +			};
> +		};
> +
>   		aips4: bus@32c00000 {
>   			compatible = "fsl,aips-bus", "simple-bus";
>   			reg = <0x32c00000 0x400000>;
> diff --git a/arch/arm64/boot/dts/freescale/imx8mq.dtsi b/arch/arm64/boot/dts/freescale/imx8mq.dtsi
> index a841a023e8e0..d139a46ee8ce 100644
> --- a/arch/arm64/boot/dts/freescale/imx8mq.dtsi
> +++ b/arch/arm64/boot/dts/freescale/imx8mq.dtsi
> @@ -1158,6 +1158,28 @@
>   			};
>   		};
>   
> +		noc: interconnect@32700000 {
> +			compatible = "fsl,imx8mq-noc", "fsl,imx8m-noc";
> +			reg = <0x32700000 0x100000>;
> +			clocks = <&clk IMX8MQ_CLK_NOC>;
> +			devfreq = <&ddrc>;
> +			operating-points-v2 = <&noc_opp_table>;
> +
> +			noc_opp_table: opp-table {
> +				compatible = "operating-points-v2";
> +
> +				opp-133M {
> +					opp-hz = /bits/ 64 <133333333>;
> +				};
> +				opp-400M {
> +					opp-hz = /bits/ 64 <400000000>;
> +				};
> +				opp-800M {
> +					opp-hz = /bits/ 64 <800000000>;
> +				};
> +			};
> +		};
> +
>   		bus@32c00000 { /* AIPS4 */
>   			compatible = "fsl,aips-bus", "simple-bus";
>   			reg = <0x32c00000 0x400000>;
>
Georgi Djakov Dec. 1, 2020, 1:10 p.m. UTC | #2
On 1.12.20 14:39, Martin Kepplinger wrote:
> Enable INTERCONNECT_IMX8MQ in order to make interconnect more widely
> available for testing.

I hope that it's not just for testing, but using it.

> Signed-off-by: Martin Kepplinger <martin.kepplinger@puri.sm>
> ---
>   arch/arm64/configs/defconfig | 3 ++-
>   1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/arch/arm64/configs/defconfig b/arch/arm64/configs/defconfig
> index 1fed16950a7c..830c26a95b3d 100644
> --- a/arch/arm64/configs/defconfig
> +++ b/arch/arm64/configs/defconfig
> @@ -1023,7 +1023,8 @@ CONFIG_OPTEE=y
>   CONFIG_MUX_MMIO=y
>   CONFIG_SLIM_QCOM_CTRL=m
>   CONFIG_SLIM_QCOM_NGD_CTRL=m
> -CONFIG_INTERCONNECT=y

Why are you removing this line?

Thanks,
Georgi

> +CONFIG_INTERCONNECT_IMX=m
> +CONFIG_INTERCONNECT_IMX8MQ=m
>   CONFIG_INTERCONNECT_QCOM=y
>   CONFIG_INTERCONNECT_QCOM_MSM8916=m
>   CONFIG_INTERCONNECT_QCOM_SDM845=m
>
Martin Kepplinger Dec. 1, 2020, 1:15 p.m. UTC | #3
On 01.12.20 14:10, Georgi Djakov wrote:
> On 1.12.20 14:39, Martin Kepplinger wrote:
>> Enable INTERCONNECT_IMX8MQ in order to make interconnect more widely
>> available for testing.
> 
> I hope that it's not just for testing, but using it.

sure, I just think that most people will use their own config for 
production but that's a different story. I can rephrase.

> 
>> Signed-off-by: Martin Kepplinger <martin.kepplinger@puri.sm>
>> ---
>>   arch/arm64/configs/defconfig | 3 ++-
>>   1 file changed, 2 insertions(+), 1 deletion(-)
>>
>> diff --git a/arch/arm64/configs/defconfig b/arch/arm64/configs/defconfig
>> index 1fed16950a7c..830c26a95b3d 100644
>> --- a/arch/arm64/configs/defconfig
>> +++ b/arch/arm64/configs/defconfig
>> @@ -1023,7 +1023,8 @@ CONFIG_OPTEE=y
>>   CONFIG_MUX_MMIO=y
>>   CONFIG_SLIM_QCOM_CTRL=m
>>   CONFIG_SLIM_QCOM_NGD_CTRL=m
>> -CONFIG_INTERCONNECT=y
> 
> Why are you removing this line?

savedefconfig removes it. INTERCONNECT_IMX below depends on it.

> 
> Thanks,
> Georgi
> 
>> +CONFIG_INTERCONNECT_IMX=m
>> +CONFIG_INTERCONNECT_IMX8MQ=m
>>   CONFIG_INTERCONNECT_QCOM=y
>>   CONFIG_INTERCONNECT_QCOM_MSM8916=m
>>   CONFIG_INTERCONNECT_QCOM_SDM845=m
>>
>
Krzysztof Kozlowski Dec. 2, 2020, 8:02 a.m. UTC | #4
On Tue, Dec 01, 2020 at 01:39:32PM +0100, Martin Kepplinger wrote:
> Enable INTERCONNECT_IMX8MQ in order to make interconnect more widely
> available for testing.
> 
> Signed-off-by: Martin Kepplinger <martin.kepplinger@puri.sm>
> ---
>  arch/arm64/configs/defconfig | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)

Reviewed-by: Krzysztof Kozlowski <krzk@kernel.org>

Best regards,
Krzysztof
Krzysztof Kozlowski Dec. 2, 2020, 8:03 a.m. UTC | #5
On Tue, Dec 01, 2020 at 02:15:04PM +0100, Martin Kepplinger wrote:
> On 01.12.20 14:10, Georgi Djakov wrote:
> > On 1.12.20 14:39, Martin Kepplinger wrote:
> > > Enable INTERCONNECT_IMX8MQ in order to make interconnect more widely
> > > available for testing.
> > 
> > I hope that it's not just for testing, but using it.
> 
> sure, I just think that most people will use their own config for production
> but that's a different story. I can rephrase.
> 
> > 
> > > Signed-off-by: Martin Kepplinger <martin.kepplinger@puri.sm>
> > > ---
> > >   arch/arm64/configs/defconfig | 3 ++-
> > >   1 file changed, 2 insertions(+), 1 deletion(-)
> > > 
> > > diff --git a/arch/arm64/configs/defconfig b/arch/arm64/configs/defconfig
> > > index 1fed16950a7c..830c26a95b3d 100644
> > > --- a/arch/arm64/configs/defconfig
> > > +++ b/arch/arm64/configs/defconfig
> > > @@ -1023,7 +1023,8 @@ CONFIG_OPTEE=y
> > >   CONFIG_MUX_MMIO=y
> > >   CONFIG_SLIM_QCOM_CTRL=m
> > >   CONFIG_SLIM_QCOM_NGD_CTRL=m
> > > -CONFIG_INTERCONNECT=y
> > 
> > Why are you removing this line?
> 
> savedefconfig removes it. INTERCONNECT_IMX below depends on it.

It's save to remove it as other Interconnect options are directly
dependant.

Best regards,
Krzysztof
Krzysztof Kozlowski Dec. 2, 2020, 8:05 a.m. UTC | #6
On Wed, 2 Dec 2020 at 10:03, Krzysztof Kozlowski <krzk@kernel.org> wrote:
>
> On Tue, Dec 01, 2020 at 02:15:04PM +0100, Martin Kepplinger wrote:
> > On 01.12.20 14:10, Georgi Djakov wrote:
> > > On 1.12.20 14:39, Martin Kepplinger wrote:
> > > > Enable INTERCONNECT_IMX8MQ in order to make interconnect more widely
> > > > available for testing.
> > >
> > > I hope that it's not just for testing, but using it.
> >
> > sure, I just think that most people will use their own config for production
> > but that's a different story. I can rephrase.
> >
> > >
> > > > Signed-off-by: Martin Kepplinger <martin.kepplinger@puri.sm>
> > > > ---
> > > >   arch/arm64/configs/defconfig | 3 ++-
> > > >   1 file changed, 2 insertions(+), 1 deletion(-)
> > > >
> > > > diff --git a/arch/arm64/configs/defconfig b/arch/arm64/configs/defconfig
> > > > index 1fed16950a7c..830c26a95b3d 100644
> > > > --- a/arch/arm64/configs/defconfig
> > > > +++ b/arch/arm64/configs/defconfig
> > > > @@ -1023,7 +1023,8 @@ CONFIG_OPTEE=y
> > > >   CONFIG_MUX_MMIO=y
> > > >   CONFIG_SLIM_QCOM_CTRL=m
> > > >   CONFIG_SLIM_QCOM_NGD_CTRL=m
> > > > -CONFIG_INTERCONNECT=y
> > >
> > > Why are you removing this line?
> >
> > savedefconfig removes it. INTERCONNECT_IMX below depends on it.
>
> It's save to remove it as other Interconnect options are directly
> dependant.

Ugh, my bad, it is not allowed to remove it. My review was too fast.
INTERCONNECT_IMX depends on it, so the INTERCONNECT must stay,

It is selected by TEGRA_MC which is independent here, so you should keep it.

Best regards,
Krzysztof
Krzysztof Kozlowski Dec. 2, 2020, 8:14 a.m. UTC | #7
On Tue, Dec 01, 2020 at 01:39:26PM +0100, Martin Kepplinger wrote:
> From: Leonard Crestez <leonard.crestez@nxp.com>
> 
> Add initial support for dynamic frequency scaling of main NOC.
> 
> Make DDRC the parent of the NOC (using passive governor) so that the
> main NOC is automatically scaled together with DDRC by default.
> 
> Support for proactive scaling via interconnect will come on top.
> 
> Signed-off-by: Leonard Crestez <leonard.crestez@nxp.com>
> Tested-by: Martin Kepplinger <martin.kepplinger@puri.sm> (imx8mq)
> ---
>  arch/arm64/boot/dts/freescale/imx8mm.dtsi | 22 ++++++++++++++++++++++
>  arch/arm64/boot/dts/freescale/imx8mn.dtsi | 22 ++++++++++++++++++++++
>  arch/arm64/boot/dts/freescale/imx8mq.dtsi | 22 ++++++++++++++++++++++
>  3 files changed, 66 insertions(+)
> 
> diff --git a/arch/arm64/boot/dts/freescale/imx8mm.dtsi b/arch/arm64/boot/dts/freescale/imx8mm.dtsi
> index c824f2615fe8..835b19f0ea42 100644
> --- a/arch/arm64/boot/dts/freescale/imx8mm.dtsi
> +++ b/arch/arm64/boot/dts/freescale/imx8mm.dtsi
> @@ -921,6 +921,28 @@
>  
>  		};
>  
> +		noc: interconnect@32700000 {
> +			compatible = "fsl,imx8mm-noc", "fsl,imx8m-noc";
> +			reg = <0x32700000 0x100000>;
> +			clocks = <&clk IMX8MM_CLK_NOC>;
> +			devfreq = <&ddrc>;

This does not pass the dtschema checks. Are you missing here any
dependencies?

arch/arm64/boot/dts/freescale/imx8mm-evk.dt.yaml: interconnect@32700000: 'devfreq' does not match any of the regexes: 'pinctrl-[0-9]+'

Best regards,
Krzysztof
Georgi Djakov Dec. 2, 2020, 8:30 a.m. UTC | #8
Hi Martin,

On 1.12.20 14:39, Martin Kepplinger wrote:
> Include the defconfig updates for v5.10 that shouldn't change the
> config itself at all.
 >
> Signed-off-by: Martin Kepplinger <martin.kepplinger@puri.sm>
> ---
>   arch/arm64/configs/defconfig | 82 +++++++++++-------------------------
>   1 file changed, 24 insertions(+), 58 deletions(-)
> 
> diff --git a/arch/arm64/configs/defconfig b/arch/arm64/configs/defconfig
> index 867cc4a5f00f..1fed16950a7c 100644
> --- a/arch/arm64/configs/defconfig
> +++ b/arch/arm64/configs/defconfig
[..]
>   CONFIG_INTERCONNECT=y
>   CONFIG_INTERCONNECT_QCOM=y
>   CONFIG_INTERCONNECT_QCOM_MSM8916=m
> -CONFIG_INTERCONNECT_QCOM_OSM_L3=m

Why are you removing this? Other boards are using it. I am actually
failing to understand this patch. Maybe it was meant to be sort of
cleanup, but such cleanups are usually done by the maintainers after
the merge window, as they lead to multiple conflicts with other patches.
I would suggest to just drop this patch.

Thanks,
Georgi

>   CONFIG_INTERCONNECT_QCOM_SDM845=m
>   CONFIG_INTERCONNECT_QCOM_SM8150=m
>   CONFIG_INTERCONNECT_QCOM_SM8250=m
> @@ -1075,7 +1043,6 @@ CONFIG_CUSE=m
>   CONFIG_OVERLAY_FS=m
>   CONFIG_VFAT_FS=y
>   CONFIG_HUGETLBFS=y
> -CONFIG_CONFIGFS_FS=y
>   CONFIG_EFIVAR_FS=y
>   CONFIG_SQUASHFS=y
>   CONFIG_NFS_FS=y
> @@ -1098,7 +1065,6 @@ CONFIG_CRYPTO_DEV_CCREE=m
>   CONFIG_CRYPTO_DEV_HISI_SEC2=m
>   CONFIG_CRYPTO_DEV_HISI_ZIP=m
>   CONFIG_CRYPTO_DEV_HISI_HPRE=m
> -CONFIG_CRYPTO_DEV_HISI_TRNG=m
>   CONFIG_CMA_SIZE_MBYTES=32
>   CONFIG_PRINTK_TIME=y
>   CONFIG_DEBUG_INFO=y
>
Martin Kepplinger Dec. 2, 2020, 11:27 a.m. UTC | #9
On 02.12.20 09:05, Krzysztof Kozlowski wrote:
> On Wed, 2 Dec 2020 at 10:03, Krzysztof Kozlowski <krzk@kernel.org> wrote:
>>
>> On Tue, Dec 01, 2020 at 02:15:04PM +0100, Martin Kepplinger wrote:
>>> On 01.12.20 14:10, Georgi Djakov wrote:
>>>> On 1.12.20 14:39, Martin Kepplinger wrote:
>>>>> Enable INTERCONNECT_IMX8MQ in order to make interconnect more widely
>>>>> available for testing.
>>>>
>>>> I hope that it's not just for testing, but using it.
>>>
>>> sure, I just think that most people will use their own config for production
>>> but that's a different story. I can rephrase.
>>>
>>>>
>>>>> Signed-off-by: Martin Kepplinger <martin.kepplinger@puri.sm>
>>>>> ---
>>>>>    arch/arm64/configs/defconfig | 3 ++-
>>>>>    1 file changed, 2 insertions(+), 1 deletion(-)
>>>>>
>>>>> diff --git a/arch/arm64/configs/defconfig b/arch/arm64/configs/defconfig
>>>>> index 1fed16950a7c..830c26a95b3d 100644
>>>>> --- a/arch/arm64/configs/defconfig
>>>>> +++ b/arch/arm64/configs/defconfig
>>>>> @@ -1023,7 +1023,8 @@ CONFIG_OPTEE=y
>>>>>    CONFIG_MUX_MMIO=y
>>>>>    CONFIG_SLIM_QCOM_CTRL=m
>>>>>    CONFIG_SLIM_QCOM_NGD_CTRL=m
>>>>> -CONFIG_INTERCONNECT=y
>>>>
>>>> Why are you removing this line?
>>>
>>> savedefconfig removes it. INTERCONNECT_IMX below depends on it.
>>
>> It's save to remove it as other Interconnect options are directly
>> dependant.
> 
> Ugh, my bad, it is not allowed to remove it. My review was too fast.
> INTERCONNECT_IMX depends on it, so the INTERCONNECT must stay,
> 
> It is selected by TEGRA_MC which is independent here, so you should keep it.
> 

thanks for reviewing! Just to be clear: We're talking about defconfig, 
so if I keep INTERCONNECT that means that I do `make savedefconfig` 
which removes it (it's of course still enabled, just redundant in 
defconfig output), and then *manually* add INTERCONNECT. That would 
indicate that there's a Kconfig bug.

thanks,
                               martin
Krzysztof Kozlowski Dec. 2, 2020, 12:23 p.m. UTC | #10
On Wed, 2 Dec 2020 at 13:30, Martin Kepplinger
<martin.kepplinger@puri.sm> wrote:
> >>>>> -CONFIG_INTERCONNECT=y
> >>>>
> >>>> Why are you removing this line?
> >>>
> >>> savedefconfig removes it. INTERCONNECT_IMX below depends on it.
> >>
> >> It's save to remove it as other Interconnect options are directly
> >> dependant.
> >
> > Ugh, my bad, it is not allowed to remove it. My review was too fast.
> > INTERCONNECT_IMX depends on it, so the INTERCONNECT must stay,
> >
> > It is selected by TEGRA_MC which is independent here, so you should keep it.
> >
>
> thanks for reviewing! Just to be clear: We're talking about defconfig,
> so if I keep INTERCONNECT that means that I do `make savedefconfig`
> which removes it (it's of course still enabled, just redundant in
> defconfig output), and then *manually* add INTERCONNECT. That would
> indicate that there's a Kconfig bug.

I don't get the point. You should not send the savedefconfig output as
is, without any adjustments and checks. You can run savedefconfig
because it nicely puts your entries in the proper place, but it's not
a bug  that it removes features which we *want to keep*. Where is a
bug in Kconfig?

Best regards,
Krzysztof