Fix dtc warnings when building the LAN966x device tree overlay
Subsystems (3)
Herve Codina
maintainerv2 cover Fix dtc warnings when building the LAN966x device tree overlay
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/[email protected]/
[2] https://lore.kernel.org/devicetree-compiler/[email protected]/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/[email protected]/
- Patch 1
Rename clock nodes
- Patch 2
Add 'Reviewed-by: Rob Herring (Arm) <[email protected]>'
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(-)
Signature · 1 line
2.46.2
Herve Codina
maintainerPATCH v2 1/2 misc: lan966x_pci: Fix dtc warns 'missing or empty reg/ranges property'
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.
---
The referenced commit is in the reset tree
--- drivers/misc/lan966x_pci.dtso | 36 +++++++++++++++++------------------ 1 file changed, 18 insertions(+), 18 deletions(-)
drivers/misc/lan966x_pci.dtso +18 -18
@@ -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>;
Signature · 1 line
2.46.2
Re: [PATCH v2 1/2] misc: lan966x_pci: Fix dtc warns 'missing or empty reg/ranges property'
Quoted 16 lines · 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 propertyIndeed, related nodes are under the pci-ep-bus (simple-bus) which is not correct.
Put them outside this node.
Reported-by Stephen Rothwell <[email protected]>Fixes 185686beb464 ("misc: Add support for LAN966x PCI device")Signed-off-by Herve Codina <[email protected]>
Quoted 5 lines
---
The referenced commit is in the reset tree--- drivers/misc/lan966x_pci.dtso | 36 +++++++++++++++++------------------ 1 file changed, 18 insertions(+), 18 deletions(-)
Herve Codina
maintainerPATCH v2 2/2 misc: lan966x_pci: Fix dtc warn 'Missing interrupt-parent'
In reply to Herve Codinadtc 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.
---
The referenced commit is in the reset tree
--- drivers/misc/lan966x_pci.dtso | 10 ++++++++++ 1 file changed, 10 insertions(+)
drivers/misc/lan966x_pci.dtso +10 -0
@@ -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>;
Signature · 1 line
2.46.2
Herve Codina
maintainerHi Philipp,
Quoted 14 lines · On Tue, 29 Oct 2024 09:43:34 +0100 Herve Codina <[email protected]>…
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.
Quoted 8 lines
- 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/[email protected]/
[2] https://lore.kernel.org/devicetree-compiler/[email protected]/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é
Philipp Zabel
AppliedQuoted 25 lines · Herve Codina
Hi Philipp,
Quoted 19 lines · On Tue, 29 Oct 2024 09:43:34 +0100 Herve Codina <[email protected]>…
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].
Quoted 8 lines
Quoted 3 lines
[1] https://lore.kernel.org/all/[email protected]/
[2] https://lore.kernel.org/devicetree-compiler/[email protected]/T/#uBoth 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