arm64: dts: imx8mm-venice: Fix PCI bus nodes
Subsystems (2)
Rob Herring
maintainerPATCH 1/1 arm64: dts: imx8mm-venice: Fix PCI bus nodes
The imx8mm-venice boards PCI bus nodes are a complete mess. The unit-addresses are wrong. The PCI bridge nodes are incomplete missing "device_type" and "ranges" and just wrong for "#address-cells" and "#size-cells" values.
All of these issues are reported warnings if anyone bothered to pay attention. Sigh.
The kernel may have happened to work because it only looks at "reg" to assign the DT nodes to PCI devices. Based on that, I'm assuming "reg" is correctly matching the devices present, and the unit-addresses are wrong. Presumably the bootloader fills in "local-mac-address" with something valid. Hopefully it too uses "reg" rather than the path.
--- .../dts/freescale/imx8mm-venice-gw72xx.dtsi | 28 +++++++++++-------- .../dts/freescale/imx8mm-venice-gw73xx.dtsi | 28 +++++++++++-------- .../dts/freescale/imx8mm-venice-gw7902.dts | 12 ++++---- 3 files changed, 38 insertions(+), 30 deletions(-)
arch/arm64/boot/dts/freescale/imx8mm-venice-gw72xx.dtsi +16 -12
@@ -150,25 +150,29 @@ &pcie0 { <&clk IMX8MM_SYS_PLL2_250M>; status = "okay"; - pcie@0,0 { + pcie@0 { + device_type = "pci"; reg = <0x0000 0 0 0 0>; - #address-cells = <1>; - #size-cells = <0>; + #address-cells = <3>; + #size-cells = <2>; + ranges; - pcie@1,0 { + pcie@0 { + device_type = "pci"; reg = <0x0000 0 0 0 0>; - #address-cells = <1>; - #size-cells = <0>; + #address-cells = <3>; + #size-cells = <2>; + ranges; - pcie@2,3 { + pcie@3 { + device_type = "pci"; reg = <0x1800 0 0 0 0>; - #address-cells = <1>; - #size-cells = <0>; + #address-cells = <3>; + #size-cells = <2>; + ranges; - eth1: pcie@5,0 { + eth1: ethernet@0 { reg = <0x0000 0 0 0 0>; - #address-cells = <1>; - #size-cells = <0>; local-mac-address = [00 00 00 00 00 00]; };
arch/arm64/boot/dts/freescale/imx8mm-venice-gw73xx.dtsi +16 -12
@@ -177,25 +177,29 @@ &pcie0 { <&clk IMX8MM_SYS_PLL2_250M>; status = "okay"; - pcie@0,0 { + pcie@0 { + device_type = "pci"; reg = <0x0000 0 0 0 0>; - #address-cells = <1>; - #size-cells = <0>; + #address-cells = <3>; + #size-cells = <2>; + ranges; - pcie@1,0 { + pcie@0 { + device_type = "pci"; reg = <0x0000 0 0 0 0>; - #address-cells = <1>; - #size-cells = <0>; + #address-cells = <3>; + #size-cells = <2>; + ranges; - pcie@2,4 { + pcie@4 { + device_type = "pci"; reg = <0x2000 0 0 0 0>; - #address-cells = <1>; - #size-cells = <0>; + #address-cells = <3>; + #size-cells = <2>; + ranges; - eth1: pcie@6,0 { + eth1: ethernet@0 { reg = <0x0000 0 0 0 0>; - #address-cells = <1>; - #size-cells = <0>; local-mac-address = [00 00 00 00 00 00]; };
arch/arm64/boot/dts/freescale/imx8mm-venice-gw7902.dts +6 -6
@@ -633,15 +633,15 @@ &pcie0 { <&clk IMX8MM_SYS_PLL2_250M>; status = "okay"; - pcie@0,0 { + pcie@0 { + device_type = "pci"; reg = <0x0000 0 0 0 0>; - #address-cells = <1>; - #size-cells = <0>; + #address-cells = <3>; + #size-cells = <2>; + ranges; - eth1: pcie@1,0 { + eth1: ethernet@0 { reg = <0x0000 0 0 0 0>; - #address-cells = <1>; - #size-cells = <0>; local-mac-address = [00 00 00 00 00 00]; };
Signature · 1 line
2.42.0
Fabio Estevam
reviewerHi Rob,
Quoted 8 lines · Rob Herring
The imx8mm-venice boards PCI bus nodes are a complete mess. The unit-addresses are wrong. The PCI bridge nodes are incomplete missing "
device_type" and "ranges" and just wrong for "#address-cells" and "#size-cells" values.All of these issues are reported warnings if anyone bothered to pay attention. Sigh.
The warnings are gone in linux-next:
Rob Herring
maintainerQuoted 10 lines · Fabio Estevam
Hi Rob,
Quoted 6 lines · Rob Herring
The imx8mm-venice boards PCI bus nodes are a complete mess. The unit-addresses are wrong. The PCI bridge nodes are incomplete missing "
device_type" and "ranges" and just wrong for "#address-cells" and "#size-cells" values.
Quoted 6 lines
Quoted 2 lines
All of these issues are reported warnings if anyone bothered to pay attention. Sigh.
The warnings are gone in linux-next:
Linux-next is wrong. The ethernet device should have a node name of 'ethernet'. The 'pcie' node name and 'device_type = "pci"' is for PCI buses/bridges only.
Rob
Quoted 7 lines · Rob Herring
Quoted 5 lines · Fabio Estevam
Hi Rob,
Quoted 1 line · Rob Herring
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
The imx8mm-venice boards PCI bus nodes are a complete mess. The unit-addresses are wrong. The PCI bridge nodes are incomplete missing "
device_type" and "ranges" and just wrong for "#address-cells" and "#size-cells" values.All of these issues are reported warnings if anyone bothered to pay attention. Sigh.
Rob,
Sorry about that. At the time the dt was submitted there were still so many dt warnings it wasn't very clear what was a legitimate issue and the PCI bindings are not that easy to understand.
Quoted 8 lines
Quoted 4 lines
The warnings are gone in linux-next:
Linux-next is wrong. The ethernet device should have a node name of 'ethernet'. The 'pcie' node name and '
device_type= "pci"' is for PCI buses/bridges only.
So as Fabio has tried to fix this with a patch that landed in linux-next this patch won't apply. I'll submit one that covers your changes.
It's always been unfortunate to have to have this level of detail in a device-tree just to allow boot firmware to populate the mac address of a PCI ethernet device.
Best Regards,
Tim
Rob Herring
maintainerQuoted 28 lines · Tim Harvey
Quoted 7 lines · Rob Herring
Quoted 5 lines · Fabio Estevam
Hi Rob,
Quoted 1 line · Rob Herring
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
The imx8mm-venice boards PCI bus nodes are a complete mess. The unit-addresses are wrong. The PCI bridge nodes are incomplete missing "
device_type" and "ranges" and just wrong for "#address-cells" and "#size-cells" values.All of these issues are reported warnings if anyone bothered to pay attention. Sigh.
Rob,
Sorry about that. At the time the dt was submitted there were still so many dt warnings it wasn't very clear what was a legitimate issue and the PCI bindings are not that easy to understand.
Quoted 5 lines
Quoted 4 lines
The warnings are gone in linux-next:
Quoted 7 lines
Quoted 3 lines
Linux-next is wrong. The ethernet device should have a node name of 'ethernet'. The 'pcie' node name and '
device_type= "pci"' is for PCI buses/bridges only.So as Fabio has tried to fix this with a patch that landed in linux-next this patch won't apply. I'll submit one that covers your changes.
Thanks.
Quoted 3 lines
It's always been unfortunate to have to have this level of detail in a device-tree just to allow boot firmware to populate the mac address of a PCI ethernet device.
More unfortunate are incomplete h/w designs lacking the MAC address. :(
Not really any way around it I think if you want something that works for any device and any number of devices.
Rob