Skip to contentSkip to conversation

arm64: dts: imx8mq: disable DDRC node by default

PATCH Superseded Lucas Stach 5 participants 6 messages Dec 12, 2021 – Dec 16, 2021

Subsystems (2)

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 arm64: dts: imx8mq: disable DDRC node by default

Without a OPP table or a downstream TF-A running on the system the DDRC will fail to probe, as it has no means to scale the DRAM frequency in that case. This however will block the bus scaling driver to come up and this in turn prevents other devices that hook into the interconnect from probing.

If the DDRC is disabled, the interconnect driver will simply ignore it. As most systems don't want to scale the DRAM frequency, disable the node by default and only enable it on the systems that actually uses this capability and provides a valid OPP table in the DT.

---
 arch/arm64/boot/dts/freescale/imx8mq-evk.dts      | 1 +
 arch/arm64/boot/dts/freescale/imx8mq-librem5.dtsi | 1 +
 arch/arm64/boot/dts/freescale/imx8mq.dtsi         | 1 +
 3 files changed, 3 insertions(+)
arch/arm64/boot/dts/freescale/imx8mq-evk.dts +1 -0
index b83df77195ec..e989a9e450ed 100644
@@ -122,6 +122,7 @@ &A53_3 {
 };
 
 &ddrc {
+	status = "okay";
 	operating-points-v2 = <&ddrc_opp_table>;
 
 	ddrc_opp_table: opp-table {
arch/arm64/boot/dts/freescale/imx8mq-librem5.dtsi +1 -0
index 60d47c71499b..5c0e98c36f94 100644
@@ -238,6 +238,7 @@ &A53_3 {
 };
 
 &ddrc {
+	status = "okay";
 	operating-points-v2 = <&ddrc_opp_table>;
 
 	ddrc_opp_table: opp-table {
arch/arm64/boot/dts/freescale/imx8mq.dtsi +1 -0
index 972766b67a15..f5af9765e239 100644
@@ -1554,6 +1554,7 @@ ddrc: memory-controller@3d400000 {
 				 <&clk IMX8MQ_DRAM_PLL_OUT>,
 				 <&clk IMX8MQ_CLK_DRAM_ALT>,
 				 <&clk IMX8MQ_CLK_DRAM_APB>;
+			status = "disabled";
 		};
 
 		ddr-pmu@3d800000 {
Signature · 7 lines
2.31.1


_______________________________________________
linux-arm-kernel mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
reviewer Reviewed-by on v1 1/1
#1 lore raw

Hi Lucas,

Quoted 6 lines · Lucas Stach

Without a OPP table or a downstream TF-A running on the system the DDRC will fail to probe, as it has no means to scale the DRAM frequency in that case. This however will block the bus scaling driver to come up and this in turn prevents other devices that hook into the interconnect from probing.

Quoted 6 lines

If the DDRC is disabled, the interconnect driver will simply ignore it. As most systems don't want to scale the DRAM frequency, disable the node by default and only enable it on the systems that actually uses this capability and provides a valid OPP table in the DT.

Should we do the same on imx8mm too?

_______________________________________________
linux-arm-kernel mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

Acked-by on v1 1/1
#3 lore raw
In reply to Lucas Stach

Am Sonntag, dem 12.12.2021 um 20:15 +0100 schrieb Lucas Stach:

Quoted 8 lines

Without a OPP table or a downstream TF-A running on the system the DDRC will
fail to probe, as it has no means to scale the DRAM frequency in that case.
This however will block the bus scaling driver to come up and this in turn
prevents other devices that hook into the interconnect from probing.

Quoted 9 lines

If the DDRC is disabled, the interconnect driver will simply ignore it. As
most systems don't want to scale the DRAM frequency, disable the node by
default and only enable it on the systems that actually uses this capability and provides a valid OPP table in the DT.

but I'd like to append a question to NXP who afaik implemented devfreq depending on "downstream TF-A" for imx8m: How are your plans to add support to mainline TF-A?

thank you!

martin

Quoted 43 lines

---
 arch/arm64/boot/dts/freescale/imx8mq-evk.dts      | 1 + arch/arm64/boot/dts/freescale/imx8mq-librem5.dtsi | 1 + arch/arm64/boot/dts/freescale/imx8mq.dtsi         | 1 +

 3 files changed, 3 insertions(+)
arch/arm64/boot/dts/freescale/imx8mq-evk.dts +0 -0
index b83df77195ec..e989a9e450ed 100644
@@ -122,6 +122,7 @@ &A53_3 {
  };


 &ddrc {
+       status = "okay";
        operating-points-v2 = <&ddrc_opp_table>;

        ddrc_opp_table: opp-table {

arch/arm64/boot/dts/freescale/imx8mq-librem5.dtsi +0 -0
index 60d47c71499b..5c0e98c36f94 100644
@@ -238,6 +238,7 @@ &A53_3 {
  };


 &ddrc {
+       status = "okay";
        operating-points-v2 = <&ddrc_opp_table>;

        ddrc_opp_table: opp-table {

arch/arm64/boot/dts/freescale/imx8mq.dtsi +1 -0
index 972766b67a15..f5af9765e239 100644
@@ -1554,6 +1554,7 @@ ddrc: memory-controller@3d400000 {
                                  <&clk IMX8MQ_DRAM_PLL_OUT>,
                                  <&clk IMX8MQ_CLK_DRAM_ALT>,
                                  <&clk IMX8MQ_CLK_DRAM_APB>;
+                       status = "disabled";
                 };
Quoted 2 lines


                ddr-pmu@3d800000 {

_______________________________________________
linux-arm-kernel mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

Reviewed-by on v1 1/1
#4 lore raw
In reply to Lucas Stach

Hi,

Quoted 46 lines · Lucas Stach

Without a OPP table or a downstream TF-A running on the system the DDRC will fail to probe, as it has no means to scale the DRAM frequency in that case. This however will block the bus scaling driver to come up and this in turn prevents other devices that hook into the interconnect from probing.

If the DDRC is disabled, the interconnect driver will simply ignore it. As most systems don't want to scale the DRAM frequency, disable the node by default and only enable it on the systems that actually uses this capability and provides a valid OPP table in the DT.

---
 arch/arm64/boot/dts/freescale/imx8mq-evk.dts      | 1 +
 arch/arm64/boot/dts/freescale/imx8mq-librem5.dtsi | 1 +
 arch/arm64/boot/dts/freescale/imx8mq.dtsi         | 1 +
 3 files changed, 3 insertions(+)
arch/arm64/boot/dts/freescale/imx8mq-evk.dts +1 -0
index b83df77195ec..e989a9e450ed 100644
@@ -122,6 +122,7 @@ &A53_3 {
 };
 
 &ddrc {
+	status = "okay";
 	operating-points-v2 = <&ddrc_opp_table>;
 
 	ddrc_opp_table: opp-table {
arch/arm64/boot/dts/freescale/imx8mq-librem5.dtsi +1 -0
index 60d47c71499b..5c0e98c36f94 100644
@@ -238,6 +238,7 @@ &A53_3 {
 };
 
 &ddrc {
+	status = "okay";
 	operating-points-v2 = <&ddrc_opp_table>;
 
 	ddrc_opp_table: opp-table {
arch/arm64/boot/dts/freescale/imx8mq.dtsi +0 -0
index 972766b67a15..f5af9765e239 100644

arch/arm64/boot/dts/freescale/imx8mq.dtsi ddrc: memory-controller@3d400000 { · line 1560

Quoted 7 lines
arch/arm64/boot/dts/freescale/imx8mq.dtsi +1 -0
@@ -1554,6 +1554,7 @@ ddrc: memory-controller@3d400000 {
 				 <&clk IMX8MQ_DRAM_PLL_OUT>,
 				 <&clk IMX8MQ_CLK_DRAM_ALT>,
 				 <&clk IMX8MQ_CLK_DRAM_APB>;
+			status = "disabled";
 		};
 
 		ddr-pmu@3d800000 {

Cheers,
-- Guido

Quoted 3 lines
Signature · 1 line
2.31.1

_______________________________________________
linux-arm-kernel mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

#2 lore raw
In reply to Fabio Estevam

Am Sonntag, dem 12.12.2021 um 16:29 -0300 schrieb Fabio Estevam:

Quoted 14 lines

Hi Lucas,

Quoted 11 lines · Lucas Stach

Without a OPP table or a downstream TF-A running on the system the DDRC will fail to probe, as it has no means to scale the DRAM frequency in that case. This however will block the bus scaling driver to come up and this in turn prevents other devices that hook into the interconnect from probing.

If the DDRC is disabled, the interconnect driver will simply ignore it. As most systems don't want to scale the DRAM frequency, disable the node by default and only enable it on the systems that actually uses this capability and provides a valid OPP table in the DT.

Quoted 5 lines
Quoted 1 line

Should we do the same on imx8mm too?

Not sure, with the i.MX8MM there are a lot more systems that are providing a valid OPP table. Also I don't see the interconnect being hooked up to devices in the i.MX8MM DT, so a non-function interconnect driver, will at least not block other devices as is the case with the i.MX8MQ.

However, there still is the issue that all those systems those depend on a downstream TF-A running on the system, as upstream TF-A has no support for scaling the DDR frequency.

Regards,
Lucas

_______________________________________________
linux-arm-kernel mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

#5 lore raw
In reply to Lucas Stach
Quoted 22 lines · Lucas Stach

Without a OPP table or a downstream TF-A running on the system the DDRC will fail to probe, as it has no means to scale the DRAM frequency in that case. This however will block the bus scaling driver to come up and this in turn prevents other devices that hook into the interconnect from probing.

If the DDRC is disabled, the interconnect driver will simply ignore it. As most systems don't want to scale the DRAM frequency, disable the node by default and only enable it on the systems that actually uses this capability and provides a valid OPP table in the DT.

---
 arch/arm64/boot/dts/freescale/imx8mq-evk.dts      | 1 +
 arch/arm64/boot/dts/freescale/imx8mq-librem5.dtsi | 1 +
 arch/arm64/boot/dts/freescale/imx8mq.dtsi         | 1 +
 3 files changed, 3 insertions(+)
arch/arm64/boot/dts/freescale/imx8mq-evk.dts +0 -0
index b83df77195ec..e989a9e450ed 100644

arch/arm64/boot/dts/freescale/imx8mq-evk.dts &A53_3 { · line 125

Quoted 4 lines
arch/arm64/boot/dts/freescale/imx8mq-evk.dts +1 -0
@@ -122,6 +122,7 @@ &A53_3 {
 };
 
 &ddrc {
+	status = "okay";

Please move it to end of property list.

Shawn

Quoted 30 lines
arch/arm64/boot/dts/freescale/imx8mq-evk.dts +0 -0
 	operating-points-v2 = <&ddrc_opp_table>;
 
 	ddrc_opp_table: opp-table {
arch/arm64/boot/dts/freescale/imx8mq-librem5.dtsi +1 -0
index 60d47c71499b..5c0e98c36f94 100644
@@ -238,6 +238,7 @@ &A53_3 {
 };
 
 &ddrc {
+	status = "okay";
 	operating-points-v2 = <&ddrc_opp_table>;
 
 	ddrc_opp_table: opp-table {
arch/arm64/boot/dts/freescale/imx8mq.dtsi +1 -0
index 972766b67a15..f5af9765e239 100644
@@ -1554,6 +1554,7 @@ ddrc: memory-controller@3d400000 {
 				 <&clk IMX8MQ_DRAM_PLL_OUT>,
 				 <&clk IMX8MQ_CLK_DRAM_ALT>,
 				 <&clk IMX8MQ_CLK_DRAM_APB>;
+			status = "disabled";
 		};
 
 		ddr-pmu@3d800000 {
Signature · 1 line
2.31.1

_______________________________________________
linux-arm-kernel mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel