All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] arm: dts: vexpress: Move mcc node back into motherboard node
@ 2020-06-03 16:22 ` Andre Przywara
  0 siblings, 0 replies; 9+ messages in thread
From: Andre Przywara @ 2020-06-03 16:22 UTC (permalink / raw)
  To: Rob Herring, Liviu Dudau, Sudeep Holla, Lorenzo Pieralisi
  Cc: devicetree, linux-arm-kernel, Guenter Roeck

Commit 	d9258898ad49 ("arm64: dts: arm: vexpress: Move fixed devices
out of bus node") moved the "mcc" DT node into the root node, because
it does not have any children using "reg" properties, so does violate
some dtc checks about "simple-bus" nodes.
However this broke the vexpress config-bus code, which walks up the
device tree to find the first node with an "arm,vexpress,site" property.
This gave the wrong result (matching the root node instead of the
motherboard node), so broke the clocks and some other devices for
VExpress boards.

Move the whole node back into its original position. This re-introduces
the dtc warning, but is conceptually the right thing to do. The dtc
warning seems to be overzealous here, there are discussions on fixing or
relaxing this check instead.

Fixes: 	d9258898ad49 ("arm64: dts: arm: vexpress: Move fixed devices out of bus node")
Signed-off-by: Andre Przywara <andre.przywara@arm.com>
---
P.S. The broken commit has not reached mainline yet, but is already in
arm-soc/arm/dt.

 arch/arm/boot/dts/vexpress-v2m-rs1.dtsi | 146 ++++++++++++------------
 1 file changed, 73 insertions(+), 73 deletions(-)

diff --git a/arch/arm/boot/dts/vexpress-v2m-rs1.dtsi b/arch/arm/boot/dts/vexpress-v2m-rs1.dtsi
index e6308fb76183..a88ee5294d35 100644
--- a/arch/arm/boot/dts/vexpress-v2m-rs1.dtsi
+++ b/arch/arm/boot/dts/vexpress-v2m-rs1.dtsi
@@ -100,79 +100,6 @@
 		};
 	};
 
-	mcc {
-		compatible = "arm,vexpress,config-bus";
-		arm,vexpress,config-bridge = <&v2m_sysreg>;
-
-		oscclk0 {
-			/* MCC static memory clock */
-			compatible = "arm,vexpress-osc";
-			arm,vexpress-sysreg,func = <1 0>;
-			freq-range = <25000000 60000000>;
-			#clock-cells = <0>;
-			clock-output-names = "v2m:oscclk0";
-		};
-
-		v2m_oscclk1: oscclk1 {
-			/* CLCD clock */
-			compatible = "arm,vexpress-osc";
-			arm,vexpress-sysreg,func = <1 1>;
-			freq-range = <23750000 65000000>;
-			#clock-cells = <0>;
-			clock-output-names = "v2m:oscclk1";
-		};
-
-		v2m_oscclk2: oscclk2 {
-			/* IO FPGA peripheral clock */
-			compatible = "arm,vexpress-osc";
-			arm,vexpress-sysreg,func = <1 2>;
-			freq-range = <24000000 24000000>;
-			#clock-cells = <0>;
-			clock-output-names = "v2m:oscclk2";
-		};
-
-		volt-vio {
-			/* Logic level voltage */
-			compatible = "arm,vexpress-volt";
-			arm,vexpress-sysreg,func = <2 0>;
-			regulator-name = "VIO";
-			regulator-always-on;
-			label = "VIO";
-		};
-
-		temp-mcc {
-			/* MCC internal operating temperature */
-			compatible = "arm,vexpress-temp";
-			arm,vexpress-sysreg,func = <4 0>;
-			label = "MCC";
-		};
-
-		reset {
-			compatible = "arm,vexpress-reset";
-			arm,vexpress-sysreg,func = <5 0>;
-		};
-
-		muxfpga {
-			compatible = "arm,vexpress-muxfpga";
-			arm,vexpress-sysreg,func = <7 0>;
-		};
-
-		shutdown {
-			compatible = "arm,vexpress-shutdown";
-			arm,vexpress-sysreg,func = <8 0>;
-		};
-
-		reboot {
-			compatible = "arm,vexpress-reboot";
-			arm,vexpress-sysreg,func = <9 0>;
-		};
-
-		dvimode {
-			compatible = "arm,vexpress-dvimode";
-			arm,vexpress-sysreg,func = <11 0>;
-		};
-	};
-
 	bus@8000000 {
 		motherboard-bus {
 			model = "V2M-P1";
@@ -435,6 +362,79 @@
 						};
 					};
 				};
+
+				mcc {
+					compatible = "arm,vexpress,config-bus";
+					arm,vexpress,config-bridge = <&v2m_sysreg>;
+
+					oscclk0 {
+						/* MCC static memory clock */
+						compatible = "arm,vexpress-osc";
+						arm,vexpress-sysreg,func = <1 0>;
+						freq-range = <25000000 60000000>;
+						#clock-cells = <0>;
+						clock-output-names = "v2m:oscclk0";
+					};
+
+					v2m_oscclk1: oscclk1 {
+						/* CLCD clock */
+						compatible = "arm,vexpress-osc";
+						arm,vexpress-sysreg,func = <1 1>;
+						freq-range = <23750000 65000000>;
+						#clock-cells = <0>;
+						clock-output-names = "v2m:oscclk1";
+					};
+
+					v2m_oscclk2: oscclk2 {
+						/* IO FPGA peripheral clock */
+						compatible = "arm,vexpress-osc";
+						arm,vexpress-sysreg,func = <1 2>;
+						freq-range = <24000000 24000000>;
+						#clock-cells = <0>;
+						clock-output-names = "v2m:oscclk2";
+					};
+
+					volt-vio {
+						/* Logic level voltage */
+						compatible = "arm,vexpress-volt";
+						arm,vexpress-sysreg,func = <2 0>;
+						regulator-name = "VIO";
+						regulator-always-on;
+						label = "VIO";
+					};
+
+					temp-mcc {
+						/* MCC internal operating temperature */
+						compatible = "arm,vexpress-temp";
+						arm,vexpress-sysreg,func = <4 0>;
+						label = "MCC";
+					};
+
+					reset {
+						compatible = "arm,vexpress-reset";
+						arm,vexpress-sysreg,func = <5 0>;
+					};
+
+					muxfpga {
+						compatible = "arm,vexpress-muxfpga";
+						arm,vexpress-sysreg,func = <7 0>;
+					};
+
+					shutdown {
+						compatible = "arm,vexpress-shutdown";
+						arm,vexpress-sysreg,func = <8 0>;
+					};
+
+					reboot {
+						compatible = "arm,vexpress-reboot";
+						arm,vexpress-sysreg,func = <9 0>;
+					};
+
+					dvimode {
+						compatible = "arm,vexpress-dvimode";
+						arm,vexpress-sysreg,func = <11 0>;
+					};
+				};
 			};
 		};
 	};
-- 
2.17.1


^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [PATCH] arm: dts: vexpress: Move mcc node back into motherboard node
@ 2020-06-03 16:22 ` Andre Przywara
  0 siblings, 0 replies; 9+ messages in thread
From: Andre Przywara @ 2020-06-03 16:22 UTC (permalink / raw)
  To: Rob Herring, Liviu Dudau, Sudeep Holla, Lorenzo Pieralisi
  Cc: devicetree, Guenter Roeck, linux-arm-kernel

Commit 	d9258898ad49 ("arm64: dts: arm: vexpress: Move fixed devices
out of bus node") moved the "mcc" DT node into the root node, because
it does not have any children using "reg" properties, so does violate
some dtc checks about "simple-bus" nodes.
However this broke the vexpress config-bus code, which walks up the
device tree to find the first node with an "arm,vexpress,site" property.
This gave the wrong result (matching the root node instead of the
motherboard node), so broke the clocks and some other devices for
VExpress boards.

Move the whole node back into its original position. This re-introduces
the dtc warning, but is conceptually the right thing to do. The dtc
warning seems to be overzealous here, there are discussions on fixing or
relaxing this check instead.

Fixes: 	d9258898ad49 ("arm64: dts: arm: vexpress: Move fixed devices out of bus node")
Signed-off-by: Andre Przywara <andre.przywara@arm.com>
---
P.S. The broken commit has not reached mainline yet, but is already in
arm-soc/arm/dt.

 arch/arm/boot/dts/vexpress-v2m-rs1.dtsi | 146 ++++++++++++------------
 1 file changed, 73 insertions(+), 73 deletions(-)

diff --git a/arch/arm/boot/dts/vexpress-v2m-rs1.dtsi b/arch/arm/boot/dts/vexpress-v2m-rs1.dtsi
index e6308fb76183..a88ee5294d35 100644
--- a/arch/arm/boot/dts/vexpress-v2m-rs1.dtsi
+++ b/arch/arm/boot/dts/vexpress-v2m-rs1.dtsi
@@ -100,79 +100,6 @@
 		};
 	};
 
-	mcc {
-		compatible = "arm,vexpress,config-bus";
-		arm,vexpress,config-bridge = <&v2m_sysreg>;
-
-		oscclk0 {
-			/* MCC static memory clock */
-			compatible = "arm,vexpress-osc";
-			arm,vexpress-sysreg,func = <1 0>;
-			freq-range = <25000000 60000000>;
-			#clock-cells = <0>;
-			clock-output-names = "v2m:oscclk0";
-		};
-
-		v2m_oscclk1: oscclk1 {
-			/* CLCD clock */
-			compatible = "arm,vexpress-osc";
-			arm,vexpress-sysreg,func = <1 1>;
-			freq-range = <23750000 65000000>;
-			#clock-cells = <0>;
-			clock-output-names = "v2m:oscclk1";
-		};
-
-		v2m_oscclk2: oscclk2 {
-			/* IO FPGA peripheral clock */
-			compatible = "arm,vexpress-osc";
-			arm,vexpress-sysreg,func = <1 2>;
-			freq-range = <24000000 24000000>;
-			#clock-cells = <0>;
-			clock-output-names = "v2m:oscclk2";
-		};
-
-		volt-vio {
-			/* Logic level voltage */
-			compatible = "arm,vexpress-volt";
-			arm,vexpress-sysreg,func = <2 0>;
-			regulator-name = "VIO";
-			regulator-always-on;
-			label = "VIO";
-		};
-
-		temp-mcc {
-			/* MCC internal operating temperature */
-			compatible = "arm,vexpress-temp";
-			arm,vexpress-sysreg,func = <4 0>;
-			label = "MCC";
-		};
-
-		reset {
-			compatible = "arm,vexpress-reset";
-			arm,vexpress-sysreg,func = <5 0>;
-		};
-
-		muxfpga {
-			compatible = "arm,vexpress-muxfpga";
-			arm,vexpress-sysreg,func = <7 0>;
-		};
-
-		shutdown {
-			compatible = "arm,vexpress-shutdown";
-			arm,vexpress-sysreg,func = <8 0>;
-		};
-
-		reboot {
-			compatible = "arm,vexpress-reboot";
-			arm,vexpress-sysreg,func = <9 0>;
-		};
-
-		dvimode {
-			compatible = "arm,vexpress-dvimode";
-			arm,vexpress-sysreg,func = <11 0>;
-		};
-	};
-
 	bus@8000000 {
 		motherboard-bus {
 			model = "V2M-P1";
@@ -435,6 +362,79 @@
 						};
 					};
 				};
+
+				mcc {
+					compatible = "arm,vexpress,config-bus";
+					arm,vexpress,config-bridge = <&v2m_sysreg>;
+
+					oscclk0 {
+						/* MCC static memory clock */
+						compatible = "arm,vexpress-osc";
+						arm,vexpress-sysreg,func = <1 0>;
+						freq-range = <25000000 60000000>;
+						#clock-cells = <0>;
+						clock-output-names = "v2m:oscclk0";
+					};
+
+					v2m_oscclk1: oscclk1 {
+						/* CLCD clock */
+						compatible = "arm,vexpress-osc";
+						arm,vexpress-sysreg,func = <1 1>;
+						freq-range = <23750000 65000000>;
+						#clock-cells = <0>;
+						clock-output-names = "v2m:oscclk1";
+					};
+
+					v2m_oscclk2: oscclk2 {
+						/* IO FPGA peripheral clock */
+						compatible = "arm,vexpress-osc";
+						arm,vexpress-sysreg,func = <1 2>;
+						freq-range = <24000000 24000000>;
+						#clock-cells = <0>;
+						clock-output-names = "v2m:oscclk2";
+					};
+
+					volt-vio {
+						/* Logic level voltage */
+						compatible = "arm,vexpress-volt";
+						arm,vexpress-sysreg,func = <2 0>;
+						regulator-name = "VIO";
+						regulator-always-on;
+						label = "VIO";
+					};
+
+					temp-mcc {
+						/* MCC internal operating temperature */
+						compatible = "arm,vexpress-temp";
+						arm,vexpress-sysreg,func = <4 0>;
+						label = "MCC";
+					};
+
+					reset {
+						compatible = "arm,vexpress-reset";
+						arm,vexpress-sysreg,func = <5 0>;
+					};
+
+					muxfpga {
+						compatible = "arm,vexpress-muxfpga";
+						arm,vexpress-sysreg,func = <7 0>;
+					};
+
+					shutdown {
+						compatible = "arm,vexpress-shutdown";
+						arm,vexpress-sysreg,func = <8 0>;
+					};
+
+					reboot {
+						compatible = "arm,vexpress-reboot";
+						arm,vexpress-sysreg,func = <9 0>;
+					};
+
+					dvimode {
+						compatible = "arm,vexpress-dvimode";
+						arm,vexpress-sysreg,func = <11 0>;
+					};
+				};
 			};
 		};
 	};
-- 
2.17.1


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply related	[flat|nested] 9+ messages in thread

* Re: [PATCH] arm: dts: vexpress: Move mcc node back into motherboard node
  2020-06-03 16:22 ` Andre Przywara
@ 2020-06-04  8:56   ` Sudeep Holla
  -1 siblings, 0 replies; 9+ messages in thread
From: Sudeep Holla @ 2020-06-04  8:56 UTC (permalink / raw)
  To: Andre Przywara, Liviu Dudau, Rob Herring, Lorenzo Pieralisi
  Cc: Sudeep Holla, devicetree, Guenter Roeck, linux-arm-kernel

On Wed, 3 Jun 2020 17:22:37 +0100, Andre Przywara wrote:
> Commit 	d9258898ad49 ("arm64: dts: arm: vexpress: Move fixed devices
> out of bus node") moved the "mcc" DT node into the root node, because
> it does not have any children using "reg" properties, so does violate
> some dtc checks about "simple-bus" nodes.
> However this broke the vexpress config-bus code, which walks up the
> device tree to find the first node with an "arm,vexpress,site" property.
> This gave the wrong result (matching the root node instead of the
> motherboard node), so broke the clocks and some other devices for
> VExpress boards.
> 
> [...]

Applied to sudeep.holla/linux (for-next/juno), thanks!

[1/1] arm: dts: vexpress: Move mcc node back into motherboard node
      https://git.kernel.org/sudeep.holla/c/8a8cd9a910

--
Regards,
Sudeep


^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH] arm: dts: vexpress: Move mcc node back into motherboard node
@ 2020-06-04  8:56   ` Sudeep Holla
  0 siblings, 0 replies; 9+ messages in thread
From: Sudeep Holla @ 2020-06-04  8:56 UTC (permalink / raw)
  To: Andre Przywara, Liviu Dudau, Rob Herring, Lorenzo Pieralisi
  Cc: devicetree, linux-arm-kernel, Guenter Roeck, Sudeep Holla

On Wed, 3 Jun 2020 17:22:37 +0100, Andre Przywara wrote:
> Commit 	d9258898ad49 ("arm64: dts: arm: vexpress: Move fixed devices
> out of bus node") moved the "mcc" DT node into the root node, because
> it does not have any children using "reg" properties, so does violate
> some dtc checks about "simple-bus" nodes.
> However this broke the vexpress config-bus code, which walks up the
> device tree to find the first node with an "arm,vexpress,site" property.
> This gave the wrong result (matching the root node instead of the
> motherboard node), so broke the clocks and some other devices for
> VExpress boards.
> 
> [...]

Applied to sudeep.holla/linux (for-next/juno), thanks!

[1/1] arm: dts: vexpress: Move mcc node back into motherboard node
      https://git.kernel.org/sudeep.holla/c/8a8cd9a910

--
Regards,
Sudeep


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH] arm: dts: vexpress: Move mcc node back into motherboard node
  2020-06-04  8:56   ` Sudeep Holla
@ 2020-06-04 13:13     ` Sudeep Holla
  -1 siblings, 0 replies; 9+ messages in thread
From: Sudeep Holla @ 2020-06-04 13:13 UTC (permalink / raw)
  To: Andre Przywara
  Cc: Liviu Dudau, Rob Herring, Lorenzo Pieralisi, devicetree,
	Guenter Roeck, Sudeep Holla, linux-arm-kernel

On Thu, Jun 04, 2020 at 09:56:31AM +0100, Sudeep Holla wrote:
> On Wed, 3 Jun 2020 17:22:37 +0100, Andre Przywara wrote:
> > Commit 	d9258898ad49 ("arm64: dts: arm: vexpress: Move fixed devices
> > out of bus node") moved the "mcc" DT node into the root node, because
> > it does not have any children using "reg" properties, so does violate
> > some dtc checks about "simple-bus" nodes.
> > However this broke the vexpress config-bus code, which walks up the
> > device tree to find the first node with an "arm,vexpress,site" property.
> > This gave the wrong result (matching the root node instead of the
> > motherboard node), so broke the clocks and some other devices for
> > VExpress boards.
> > 
> > [...]
> 
> Applied to sudeep.holla/linux (for-next/juno), thanks!
> 
> [1/1] arm: dts: vexpress: Move mcc node back into motherboard node
>       https://git.kernel.org/sudeep.holla/c/8a8cd9a910

Had to fix the 'Fixes' tag based on the report from linux-next, so updated to:

https://git.kernel.org/sudeep.holla/c/38ac46002d1d

--
Regards,
Sudeep

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH] arm: dts: vexpress: Move mcc node back into motherboard node
@ 2020-06-04 13:13     ` Sudeep Holla
  0 siblings, 0 replies; 9+ messages in thread
From: Sudeep Holla @ 2020-06-04 13:13 UTC (permalink / raw)
  To: Andre Przywara
  Cc: Rob Herring, Lorenzo Pieralisi, devicetree, Liviu Dudau,
	linux-arm-kernel, Sudeep Holla, Guenter Roeck

On Thu, Jun 04, 2020 at 09:56:31AM +0100, Sudeep Holla wrote:
> On Wed, 3 Jun 2020 17:22:37 +0100, Andre Przywara wrote:
> > Commit 	d9258898ad49 ("arm64: dts: arm: vexpress: Move fixed devices
> > out of bus node") moved the "mcc" DT node into the root node, because
> > it does not have any children using "reg" properties, so does violate
> > some dtc checks about "simple-bus" nodes.
> > However this broke the vexpress config-bus code, which walks up the
> > device tree to find the first node with an "arm,vexpress,site" property.
> > This gave the wrong result (matching the root node instead of the
> > motherboard node), so broke the clocks and some other devices for
> > VExpress boards.
> > 
> > [...]
> 
> Applied to sudeep.holla/linux (for-next/juno), thanks!
> 
> [1/1] arm: dts: vexpress: Move mcc node back into motherboard node
>       https://git.kernel.org/sudeep.holla/c/8a8cd9a910

Had to fix the 'Fixes' tag based on the report from linux-next, so updated to:

https://git.kernel.org/sudeep.holla/c/38ac46002d1d

--
Regards,
Sudeep

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH] arm: dts: vexpress: Move mcc node back into motherboard node
  2020-06-03 19:46 Guenter Roeck
@ 2020-06-04  8:59   ` Sudeep Holla
  0 siblings, 0 replies; 9+ messages in thread
From: Sudeep Holla @ 2020-06-04  8:59 UTC (permalink / raw)
  To: Guenter Roeck
  Cc: Andre Przywara, Rob Herring, Liviu Dudau, Lorenzo Pieralisi,
	Sudeep Holla, devicetree, linux-arm-kernel

On Wed, Jun 03, 2020 at 12:46:14PM -0700, Guenter Roeck wrote:
> On Wed, Jun 03, 2020 at 05:22:37PM +0100, Andre Przywara wrote:
> > Commit 	d9258898ad49 ("arm64: dts: arm: vexpress: Move fixed devices
> > out of bus node") moved the "mcc" DT node into the root node, because
> > it does not have any children using "reg" properties, so does violate
> > some dtc checks about "simple-bus" nodes.
> > However this broke the vexpress config-bus code, which walks up the
> > device tree to find the first node with an "arm,vexpress,site" property.
> > This gave the wrong result (matching the root node instead of the
> > motherboard node), so broke the clocks and some other devices for
> > VExpress boards.
> > 
> > Move the whole node back into its original position. This re-introduces
> > the dtc warning, but is conceptually the right thing to do. The dtc
> > warning seems to be overzealous here, there are discussions on fixing or
> > relaxing this check instead.
> > 
> > Fixes: 	d9258898ad49 ("arm64: dts: arm: vexpress: Move fixed devices out of bus node")
> > Signed-off-by: Andre Przywara <andre.przywara@arm.com>
> 
> Tested-by: Guenter Roeck <linux@roeck-us.net>
> 

Thanks, I have added your Reported-by along with this. By the way, this
email seem to have broken the link. Initially thought b4 is getting
confused, but checked the lore.kernel.org too to confirm.

-- 
Regards,
Sudeep

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH] arm: dts: vexpress: Move mcc node back into motherboard node
@ 2020-06-04  8:59   ` Sudeep Holla
  0 siblings, 0 replies; 9+ messages in thread
From: Sudeep Holla @ 2020-06-04  8:59 UTC (permalink / raw)
  To: Guenter Roeck
  Cc: devicetree, Lorenzo Pieralisi, Rob Herring, Andre Przywara,
	Liviu Dudau, Sudeep Holla, linux-arm-kernel

On Wed, Jun 03, 2020 at 12:46:14PM -0700, Guenter Roeck wrote:
> On Wed, Jun 03, 2020 at 05:22:37PM +0100, Andre Przywara wrote:
> > Commit 	d9258898ad49 ("arm64: dts: arm: vexpress: Move fixed devices
> > out of bus node") moved the "mcc" DT node into the root node, because
> > it does not have any children using "reg" properties, so does violate
> > some dtc checks about "simple-bus" nodes.
> > However this broke the vexpress config-bus code, which walks up the
> > device tree to find the first node with an "arm,vexpress,site" property.
> > This gave the wrong result (matching the root node instead of the
> > motherboard node), so broke the clocks and some other devices for
> > VExpress boards.
> > 
> > Move the whole node back into its original position. This re-introduces
> > the dtc warning, but is conceptually the right thing to do. The dtc
> > warning seems to be overzealous here, there are discussions on fixing or
> > relaxing this check instead.
> > 
> > Fixes: 	d9258898ad49 ("arm64: dts: arm: vexpress: Move fixed devices out of bus node")
> > Signed-off-by: Andre Przywara <andre.przywara@arm.com>
> 
> Tested-by: Guenter Roeck <linux@roeck-us.net>
> 

Thanks, I have added your Reported-by along with this. By the way, this
email seem to have broken the link. Initially thought b4 is getting
confused, but checked the lore.kernel.org too to confirm.

-- 
Regards,
Sudeep

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH] arm: dts: vexpress: Move mcc node back into motherboard node
@ 2020-06-03 19:46 Guenter Roeck
  2020-06-04  8:59   ` Sudeep Holla
  0 siblings, 1 reply; 9+ messages in thread
From: Guenter Roeck @ 2020-06-03 19:46 UTC (permalink / raw)
  To: Andre Przywara
  Cc: Rob Herring, Liviu Dudau, Sudeep Holla, Lorenzo Pieralisi,
	devicetree, linux-arm-kernel

On Wed, Jun 03, 2020 at 05:22:37PM +0100, Andre Przywara wrote:
> Commit 	d9258898ad49 ("arm64: dts: arm: vexpress: Move fixed devices
> out of bus node") moved the "mcc" DT node into the root node, because
> it does not have any children using "reg" properties, so does violate
> some dtc checks about "simple-bus" nodes.
> However this broke the vexpress config-bus code, which walks up the
> device tree to find the first node with an "arm,vexpress,site" property.
> This gave the wrong result (matching the root node instead of the
> motherboard node), so broke the clocks and some other devices for
> VExpress boards.
> 
> Move the whole node back into its original position. This re-introduces
> the dtc warning, but is conceptually the right thing to do. The dtc
> warning seems to be overzealous here, there are discussions on fixing or
> relaxing this check instead.
> 
> Fixes: 	d9258898ad49 ("arm64: dts: arm: vexpress: Move fixed devices out of bus node")
> Signed-off-by: Andre Przywara <andre.przywara@arm.com>

Tested-by: Guenter Roeck <linux@roeck-us.net>

> ---
> P.S. The broken commit has not reached mainline yet, but is already in
> arm-soc/arm/dt.
> 
>  arch/arm/boot/dts/vexpress-v2m-rs1.dtsi | 146 ++++++++++++------------
>  1 file changed, 73 insertions(+), 73 deletions(-)
> 
> diff --git a/arch/arm/boot/dts/vexpress-v2m-rs1.dtsi b/arch/arm/boot/dts/vexpress-v2m-rs1.dtsi
> index e6308fb76183..a88ee5294d35 100644
> --- a/arch/arm/boot/dts/vexpress-v2m-rs1.dtsi
> +++ b/arch/arm/boot/dts/vexpress-v2m-rs1.dtsi
> @@ -100,79 +100,6 @@
>  		};
>  	};
>  
> -	mcc {
> -		compatible = "arm,vexpress,config-bus";
> -		arm,vexpress,config-bridge = <&v2m_sysreg>;
> -
> -		oscclk0 {
> -			/* MCC static memory clock */
> -			compatible = "arm,vexpress-osc";
> -			arm,vexpress-sysreg,func = <1 0>;
> -			freq-range = <25000000 60000000>;
> -			#clock-cells = <0>;
> -			clock-output-names = "v2m:oscclk0";
> -		};
> -
> -		v2m_oscclk1: oscclk1 {
> -			/* CLCD clock */
> -			compatible = "arm,vexpress-osc";
> -			arm,vexpress-sysreg,func = <1 1>;
> -			freq-range = <23750000 65000000>;
> -			#clock-cells = <0>;
> -			clock-output-names = "v2m:oscclk1";
> -		};
> -
> -		v2m_oscclk2: oscclk2 {
> -			/* IO FPGA peripheral clock */
> -			compatible = "arm,vexpress-osc";
> -			arm,vexpress-sysreg,func = <1 2>;
> -			freq-range = <24000000 24000000>;
> -			#clock-cells = <0>;
> -			clock-output-names = "v2m:oscclk2";
> -		};
> -
> -		volt-vio {
> -			/* Logic level voltage */
> -			compatible = "arm,vexpress-volt";
> -			arm,vexpress-sysreg,func = <2 0>;
> -			regulator-name = "VIO";
> -			regulator-always-on;
> -			label = "VIO";
> -		};
> -
> -		temp-mcc {
> -			/* MCC internal operating temperature */
> -			compatible = "arm,vexpress-temp";
> -			arm,vexpress-sysreg,func = <4 0>;
> -			label = "MCC";
> -		};
> -
> -		reset {
> -			compatible = "arm,vexpress-reset";
> -			arm,vexpress-sysreg,func = <5 0>;
> -		};
> -
> -		muxfpga {
> -			compatible = "arm,vexpress-muxfpga";
> -			arm,vexpress-sysreg,func = <7 0>;
> -		};
> -
> -		shutdown {
> -			compatible = "arm,vexpress-shutdown";
> -			arm,vexpress-sysreg,func = <8 0>;
> -		};
> -
> -		reboot {
> -			compatible = "arm,vexpress-reboot";
> -			arm,vexpress-sysreg,func = <9 0>;
> -		};
> -
> -		dvimode {
> -			compatible = "arm,vexpress-dvimode";
> -			arm,vexpress-sysreg,func = <11 0>;
> -		};
> -	};
> -
>  	bus@8000000 {
>  		motherboard-bus {
>  			model = "V2M-P1";
> @@ -435,6 +362,79 @@
>  						};
>  					};
>  				};
> +
> +				mcc {
> +					compatible = "arm,vexpress,config-bus";
> +					arm,vexpress,config-bridge = <&v2m_sysreg>;
> +
> +					oscclk0 {
> +						/* MCC static memory clock */
> +						compatible = "arm,vexpress-osc";
> +						arm,vexpress-sysreg,func = <1 0>;
> +						freq-range = <25000000 60000000>;
> +						#clock-cells = <0>;
> +						clock-output-names = "v2m:oscclk0";
> +					};
> +
> +					v2m_oscclk1: oscclk1 {
> +						/* CLCD clock */
> +						compatible = "arm,vexpress-osc";
> +						arm,vexpress-sysreg,func = <1 1>;
> +						freq-range = <23750000 65000000>;
> +						#clock-cells = <0>;
> +						clock-output-names = "v2m:oscclk1";
> +					};
> +
> +					v2m_oscclk2: oscclk2 {
> +						/* IO FPGA peripheral clock */
> +						compatible = "arm,vexpress-osc";
> +						arm,vexpress-sysreg,func = <1 2>;
> +						freq-range = <24000000 24000000>;
> +						#clock-cells = <0>;
> +						clock-output-names = "v2m:oscclk2";
> +					};
> +
> +					volt-vio {
> +						/* Logic level voltage */
> +						compatible = "arm,vexpress-volt";
> +						arm,vexpress-sysreg,func = <2 0>;
> +						regulator-name = "VIO";
> +						regulator-always-on;
> +						label = "VIO";
> +					};
> +
> +					temp-mcc {
> +						/* MCC internal operating temperature */
> +						compatible = "arm,vexpress-temp";
> +						arm,vexpress-sysreg,func = <4 0>;
> +						label = "MCC";
> +					};
> +
> +					reset {
> +						compatible = "arm,vexpress-reset";
> +						arm,vexpress-sysreg,func = <5 0>;
> +					};
> +
> +					muxfpga {
> +						compatible = "arm,vexpress-muxfpga";
> +						arm,vexpress-sysreg,func = <7 0>;
> +					};
> +
> +					shutdown {
> +						compatible = "arm,vexpress-shutdown";
> +						arm,vexpress-sysreg,func = <8 0>;
> +					};
> +
> +					reboot {
> +						compatible = "arm,vexpress-reboot";
> +						arm,vexpress-sysreg,func = <9 0>;
> +					};
> +
> +					dvimode {
> +						compatible = "arm,vexpress-dvimode";
> +						arm,vexpress-sysreg,func = <11 0>;
> +					};
> +				};
>  			};
>  		};
>  	};
> -- 
> 2.17.1
> 

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2020-06-04 13:13 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-06-03 16:22 [PATCH] arm: dts: vexpress: Move mcc node back into motherboard node Andre Przywara
2020-06-03 16:22 ` Andre Przywara
2020-06-04  8:56 ` Sudeep Holla
2020-06-04  8:56   ` Sudeep Holla
2020-06-04 13:13   ` Sudeep Holla
2020-06-04 13:13     ` Sudeep Holla
2020-06-03 19:46 Guenter Roeck
2020-06-04  8:59 ` Sudeep Holla
2020-06-04  8:59   ` Sudeep Holla

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.