linux-next.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2 0/2] Fix dtc warnings when building the LAN966x device tree overlay
@ 2024-10-29  8:43 Herve Codina
  2024-10-29  8:43 ` [PATCH v2 1/2] misc: lan966x_pci: Fix dtc warns 'missing or empty reg/ranges property' Herve Codina
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Herve Codina @ 2024-10-29  8:43 UTC (permalink / raw)
  To: Philipp Zabel, Stephen Rothwell, Rob Herring
  Cc: linux-kernel, linux-next, Arnd Bergmann, Greg Kroah-Hartman,
	Allan Nielsen, Horatiu Vultur, Steen Hegelund, Thomas Petazzoni,
	Herve Codina

dtc generates 3 kinds of warnings when it builds the LAN966x dtso.

- missing or empty reg/ranges property
    .../pci-ep-bus@0/cpu_clk: missing or empty reg/ranges property
    .../pci-ep-bus@0/ddr_clk: missing or empty reg/ranges property
    .../pci-ep-bus@0/sys_clk: missing or empty reg/ranges property
  Patch 1 in this series fixes these warnings

- Missing interrupt-parent
   .../pci-ep-bus@0/oic@e00c0120: Missing interrupt-parent
  This warning was quickly silenced by Philipp [1].
  Patch 2 in this series fixes the warning and should replace the patch
  applied by Philipp to silence the warning.

- Warning (avoid_unnecessary_addr_size)
   /fragment@0/__overlay__: unnecessary #address-cells/#size-cells without "ranges", "dma-ranges" or child "reg" property
  This warning should be fixed in dtc.
  A patch has already be sent by Philip to fix it [2].

[1] https://lore.kernel.org/all/57793bb01e02f03e215dfa6f8783df18034ae2ea.camel@pengutronix.de/
[2] https://lore.kernel.org/devicetree-compiler/20241025161307.3629901-1-p.zabel@pengutronix.de/T/#u

Compare to the previous iteration, this v2 series mainly renames clock
nodes.

Best regards,
Hervé

Changes v1 -> v2
  v1: https://lore.kernel.org/lkml/20241028122405.27090-1-herve.codina@bootlin.com/

  - Patch 1
    Rename clock nodes

  - Patch 2
    Add 'Reviewed-by: Rob Herring (Arm) <robh@kernel.org>'

Herve Codina (2):
  misc: lan966x_pci: Fix dtc warns 'missing or empty reg/ranges
    property'
  misc: lan966x_pci: Fix dtc warn 'Missing interrupt-parent'

 drivers/misc/lan966x_pci.dtso | 46 +++++++++++++++++++++--------------
 1 file changed, 28 insertions(+), 18 deletions(-)

-- 
2.46.2


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

* [PATCH v2 1/2] misc: lan966x_pci: Fix dtc warns 'missing or empty reg/ranges property'
  2024-10-29  8:43 [PATCH v2 0/2] Fix dtc warnings when building the LAN966x device tree overlay Herve Codina
@ 2024-10-29  8:43 ` Herve Codina
  2024-10-29 12:36   ` Rob Herring
  2024-10-29  8:43 ` [PATCH v2 2/2] misc: lan966x_pci: Fix dtc warn 'Missing interrupt-parent' Herve Codina
  2024-10-31 15:01 ` [PATCH v2 0/2] Fix dtc warnings when building the LAN966x device tree overlay Herve Codina
  2 siblings, 1 reply; 6+ messages in thread
From: Herve Codina @ 2024-10-29  8:43 UTC (permalink / raw)
  To: Philipp Zabel, Stephen Rothwell, Rob Herring
  Cc: linux-kernel, linux-next, Arnd Bergmann, Greg Kroah-Hartman,
	Allan Nielsen, Horatiu Vultur, Steen Hegelund, Thomas Petazzoni,
	Herve Codina

dtc generates the following warnings when building the LAN966x device
tree overlay (lan966x_pci.dtso):
  Warning (simple_bus_reg): /fragment@0/__overlay__/pci-ep-bus@0/cpu_clk: missing or empty reg/ranges property
  Warning (simple_bus_reg): /fragment@0/__overlay__/pci-ep-bus@0/ddr_clk: missing or empty reg/ranges property
  Warning (simple_bus_reg): /fragment@0/__overlay__/pci-ep-bus@0/sys_clk: missing or empty reg/ranges property

Indeed, related nodes are under the pci-ep-bus (simple-bus) which is not
correct.

Put them outside this node.

Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
Closes: https://lore.kernel.org/all/20241025110919.64b1cffb@canb.auug.org.au/
Fixes: 185686beb464 ("misc: Add support for LAN966x PCI device")
Signed-off-by: Herve Codina <herve.codina@bootlin.com>
---
The referenced commit is in the reset tree
---
 drivers/misc/lan966x_pci.dtso | 36 +++++++++++++++++------------------
 1 file changed, 18 insertions(+), 18 deletions(-)

diff --git a/drivers/misc/lan966x_pci.dtso b/drivers/misc/lan966x_pci.dtso
index 7282687df25f..e9b304c6ced3 100644
--- a/drivers/misc/lan966x_pci.dtso
+++ b/drivers/misc/lan966x_pci.dtso
@@ -19,6 +19,24 @@ __overlay__ {
 			#address-cells = <3>;
 			#size-cells = <2>;
 
+			cpu_clk: clock-600000000 {
+				compatible = "fixed-clock";
+				#clock-cells = <0>;
+				clock-frequency = <600000000>;  /* CPU clock = 600MHz */
+			};
+
+			ddr_clk: clock-30000000 {
+				compatible = "fixed-clock";
+				#clock-cells = <0>;
+				clock-frequency = <30000000>;  /* Fabric clock = 30MHz */
+			};
+
+			sys_clk: clock-15625000 {
+				compatible = "fixed-clock";
+				#clock-cells = <0>;
+				clock-frequency = <15625000>;  /* System clock = 15.625MHz */
+			};
+
 			pci-ep-bus@0 {
 				compatible = "simple-bus";
 				#address-cells = <1>;
@@ -39,24 +57,6 @@ oic: oic@e00c0120 {
 					reg = <0xe00c0120 0x190>;
 				};
 
-				cpu_clk: cpu_clk {
-					compatible = "fixed-clock";
-					#clock-cells = <0>;
-					clock-frequency = <600000000>;  // CPU clock = 600MHz
-				};
-
-				ddr_clk: ddr_clk {
-					compatible = "fixed-clock";
-					#clock-cells = <0>;
-					clock-frequency = <30000000>;  // Fabric clock = 30MHz
-				};
-
-				sys_clk: sys_clk {
-					compatible = "fixed-clock";
-					#clock-cells = <0>;
-					clock-frequency = <15625000>;  // System clock = 15.625MHz
-				};
-
 				cpu_ctrl: syscon@e00c0000 {
 					compatible = "microchip,lan966x-cpu-syscon", "syscon";
 					reg = <0xe00c0000 0xa8>;
-- 
2.46.2


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

* [PATCH v2 2/2] misc: lan966x_pci: Fix dtc warn 'Missing interrupt-parent'
  2024-10-29  8:43 [PATCH v2 0/2] Fix dtc warnings when building the LAN966x device tree overlay Herve Codina
  2024-10-29  8:43 ` [PATCH v2 1/2] misc: lan966x_pci: Fix dtc warns 'missing or empty reg/ranges property' Herve Codina
@ 2024-10-29  8:43 ` Herve Codina
  2024-10-31 15:01 ` [PATCH v2 0/2] Fix dtc warnings when building the LAN966x device tree overlay Herve Codina
  2 siblings, 0 replies; 6+ messages in thread
From: Herve Codina @ 2024-10-29  8:43 UTC (permalink / raw)
  To: Philipp Zabel, Stephen Rothwell, Rob Herring
  Cc: linux-kernel, linux-next, Arnd Bergmann, Greg Kroah-Hartman,
	Allan Nielsen, Horatiu Vultur, Steen Hegelund, Thomas Petazzoni,
	Herve Codina

dtc generates the following warning when building the LAN966x devicetree
overlay (lan966x_pci.dtso):
  Warning (interrupts_property): /fragment@0/__overlay__/pci-ep-bus@0/oic@e00c0120: Missing interrupt-parent

The oic interrupt parent is the PCI device itself. The PCI device node
is the node on which the dtbo will be applied and this node already has
properties needed.

In order to remove the warning, add the missing properties in the
overlay fragment node. Properties in this node will not be added when
the overlay is applied (which is what we expect) but makes dtc happy.

Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
Closes: https://lore.kernel.org/all/20241025110919.64b1cffb@canb.auug.org.au/
Fixes: 185686beb464 ("misc: Add support for LAN966x PCI device")
Signed-off-by: Herve Codina <herve.codina@bootlin.com>
Reviewed-by: Rob Herring (Arm) <robh@kernel.org>
---
The referenced commit is in the reset tree
---
 drivers/misc/lan966x_pci.dtso | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/drivers/misc/lan966x_pci.dtso b/drivers/misc/lan966x_pci.dtso
index e9b304c6ced3..7b196b0a0eb6 100644
--- a/drivers/misc/lan966x_pci.dtso
+++ b/drivers/misc/lan966x_pci.dtso
@@ -15,6 +15,16 @@
 / {
 	fragment@0 {
 		target-path = "";
+
+		/*
+		 * These properties allow to avoid a dtc warnings.
+		 * The real interrupt controller is the PCI device itself. It
+		 * is the node on which the device tree overlay will be applied.
+		 * This node has those properties.
+		 */
+		#interrupt-cells = <1>;
+		interrupt-controller;
+
 		__overlay__ {
 			#address-cells = <3>;
 			#size-cells = <2>;
-- 
2.46.2


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

* Re: [PATCH v2 1/2] misc: lan966x_pci: Fix dtc warns 'missing or empty reg/ranges property'
  2024-10-29  8:43 ` [PATCH v2 1/2] misc: lan966x_pci: Fix dtc warns 'missing or empty reg/ranges property' Herve Codina
@ 2024-10-29 12:36   ` Rob Herring
  0 siblings, 0 replies; 6+ messages in thread
From: Rob Herring @ 2024-10-29 12:36 UTC (permalink / raw)
  To: Herve Codina
  Cc: Philipp Zabel, Stephen Rothwell, linux-kernel, linux-next,
	Arnd Bergmann, Greg Kroah-Hartman, Allan Nielsen, Horatiu Vultur,
	Steen Hegelund, Thomas Petazzoni

On Tue, Oct 29, 2024 at 3:43 AM Herve Codina <herve.codina@bootlin.com> wrote:
>
> dtc generates the following warnings when building the LAN966x device
> tree overlay (lan966x_pci.dtso):
>   Warning (simple_bus_reg): /fragment@0/__overlay__/pci-ep-bus@0/cpu_clk: missing or empty reg/ranges property
>   Warning (simple_bus_reg): /fragment@0/__overlay__/pci-ep-bus@0/ddr_clk: missing or empty reg/ranges property
>   Warning (simple_bus_reg): /fragment@0/__overlay__/pci-ep-bus@0/sys_clk: missing or empty reg/ranges property
>
> Indeed, related nodes are under the pci-ep-bus (simple-bus) which is not
> correct.
>
> Put them outside this node.
>
> Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
> Closes: https://lore.kernel.org/all/20241025110919.64b1cffb@canb.auug.org.au/
> Fixes: 185686beb464 ("misc: Add support for LAN966x PCI device")
> Signed-off-by: Herve Codina <herve.codina@bootlin.com>
> ---
> The referenced commit is in the reset tree
> ---
>  drivers/misc/lan966x_pci.dtso | 36 +++++++++++++++++------------------
>  1 file changed, 18 insertions(+), 18 deletions(-)

Reviewed-by: Rob Herring (Arm) <robh@kernel.org>

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

* Re: [PATCH v2 0/2] Fix dtc warnings when building the LAN966x device tree overlay
  2024-10-29  8:43 [PATCH v2 0/2] Fix dtc warnings when building the LAN966x device tree overlay Herve Codina
  2024-10-29  8:43 ` [PATCH v2 1/2] misc: lan966x_pci: Fix dtc warns 'missing or empty reg/ranges property' Herve Codina
  2024-10-29  8:43 ` [PATCH v2 2/2] misc: lan966x_pci: Fix dtc warn 'Missing interrupt-parent' Herve Codina
@ 2024-10-31 15:01 ` Herve Codina
  2024-11-04 13:47   ` Philipp Zabel
  2 siblings, 1 reply; 6+ messages in thread
From: Herve Codina @ 2024-10-31 15:01 UTC (permalink / raw)
  To: Philipp Zabel, Stephen Rothwell, Rob Herring
  Cc: linux-kernel, linux-next, Arnd Bergmann, Greg Kroah-Hartman,
	Allan Nielsen, Horatiu Vultur, Steen Hegelund, Thomas Petazzoni

Hi Philipp,


On Tue, 29 Oct 2024 09:43:34 +0100
Herve Codina <herve.codina@bootlin.com> wrote:

> dtc generates 3 kinds of warnings when it builds the LAN966x dtso.
> 
> - missing or empty reg/ranges property
>     .../pci-ep-bus@0/cpu_clk: missing or empty reg/ranges property
>     .../pci-ep-bus@0/ddr_clk: missing or empty reg/ranges property
>     .../pci-ep-bus@0/sys_clk: missing or empty reg/ranges property
>   Patch 1 in this series fixes these warnings
> 
> - Missing interrupt-parent
>    .../pci-ep-bus@0/oic@e00c0120: Missing interrupt-parent
>   This warning was quickly silenced by Philipp [1].
>   Patch 2 in this series fixes the warning and should replace the patch
>   applied by Philipp to silence the warning.
> 
> - Warning (avoid_unnecessary_addr_size)
>    /fragment@0/__overlay__: unnecessary #address-cells/#size-cells without "ranges", "dma-ranges" or child "reg" property
>   This warning should be fixed in dtc.
>   A patch has already be sent by Philip to fix it [2].
> 
> [1] https://lore.kernel.org/all/57793bb01e02f03e215dfa6f8783df18034ae2ea.camel@pengutronix.de/
> [2] https://lore.kernel.org/devicetree-compiler/20241025161307.3629901-1-p.zabel@pengutronix.de/T/#u
> 

Both patches in this series have been reviewed by Rob.

I think it is a green light to have them applied in the reset tree.
Your opinion?

Best regards,
Hervé

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

* Re: [PATCH v2 0/2] Fix dtc warnings when building the LAN966x device tree overlay
  2024-10-31 15:01 ` [PATCH v2 0/2] Fix dtc warnings when building the LAN966x device tree overlay Herve Codina
@ 2024-11-04 13:47   ` Philipp Zabel
  0 siblings, 0 replies; 6+ messages in thread
From: Philipp Zabel @ 2024-11-04 13:47 UTC (permalink / raw)
  To: Herve Codina, Stephen Rothwell, Rob Herring
  Cc: linux-kernel, linux-next, Arnd Bergmann, Greg Kroah-Hartman,
	Allan Nielsen, Horatiu Vultur, Steen Hegelund, Thomas Petazzoni

On Do, 2024-10-31 at 16:01 +0100, Herve Codina wrote:
> Hi Philipp,
> 
> 
> On Tue, 29 Oct 2024 09:43:34 +0100
> Herve Codina <herve.codina@bootlin.com> wrote:
> 
> > dtc generates 3 kinds of warnings when it builds the LAN966x dtso.
> > 
> > - missing or empty reg/ranges property
> >     .../pci-ep-bus@0/cpu_clk: missing or empty reg/ranges property
> >     .../pci-ep-bus@0/ddr_clk: missing or empty reg/ranges property
> >     .../pci-ep-bus@0/sys_clk: missing or empty reg/ranges property
> >   Patch 1 in this series fixes these warnings
> > 
> > - Missing interrupt-parent
> >    .../pci-ep-bus@0/oic@e00c0120: Missing interrupt-parent
> >   This warning was quickly silenced by Philipp [1].
> >   Patch 2 in this series fixes the warning and should replace the patch
> >   applied by Philipp to silence the warning.
> > 
> > - Warning (avoid_unnecessary_addr_size)
> >    /fragment@0/__overlay__: unnecessary #address-cells/#size-cells without "ranges", "dma-ranges" or child "reg" property
> >   This warning should be fixed in dtc.
> >   A patch has already be sent by Philip to fix it [2].
> > 
> > [1] https://lore.kernel.org/all/57793bb01e02f03e215dfa6f8783df18034ae2ea.camel@pengutronix.de/
> > [2] https://lore.kernel.org/devicetree-compiler/20241025161307.3629901-1-p.zabel@pengutronix.de/T/#u
> > 
> 
> Both patches in this series have been reviewed by Rob.
> 
> I think it is a green light to have them applied in the reset tree.
> Your opinion?

Applied to reset/next, thanks!

[1/2] misc: lan966x_pci: Fix dtc warns 'missing or empty reg/ranges property'
      https://git.pengutronix.de/cgit/pza/linux/commit/?id=344ea0d36b8c
[2/2] misc: lan966x_pci: Fix dtc warn 'Missing interrupt-parent'
      https://git.pengutronix.de/cgit/pza/linux/commit/?id=cf3e10cc0e88

I've dropped the Makefile patch ("misc: Silence warning when building
the LAN966x device tree overlay").

regards
Philipp

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

end of thread, other threads:[~2024-11-04 13:47 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-10-29  8:43 [PATCH v2 0/2] Fix dtc warnings when building the LAN966x device tree overlay Herve Codina
2024-10-29  8:43 ` [PATCH v2 1/2] misc: lan966x_pci: Fix dtc warns 'missing or empty reg/ranges property' Herve Codina
2024-10-29 12:36   ` Rob Herring
2024-10-29  8:43 ` [PATCH v2 2/2] misc: lan966x_pci: Fix dtc warn 'Missing interrupt-parent' Herve Codina
2024-10-31 15:01 ` [PATCH v2 0/2] Fix dtc warnings when building the LAN966x device tree overlay Herve Codina
2024-11-04 13:47   ` Philipp Zabel

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).