ARM: dts: BCM5301X: Drop ranges mapping from AXI bus
Subsystems (2)
Rafał Miłecki
maintainerPATCH 1/2 ARM: dts: BCM5301X: Drop ranges mapping from AXI bus
From: Rafał Miłecki <[email protected]>
Limiting addresses to 0x18000000 + 0x100000 disallowed describing some devices (e.g. PCIe controllers).
--- arch/arm/boot/dts/broadcom/bcm-ns.dtsi | 146 ++++++++++++------------- 1 file changed, 73 insertions(+), 73 deletions(-)
arch/arm/boot/dts/broadcom/bcm-ns.dtsi +73 -73
@@ -95,7 +95,7 @@ L2: cache-controller@22000 { axi@18000000 { compatible = "brcm,bus-axi"; reg = <0x18000000 0x1000>; - ranges = <0x00000000 0x18000000 0x00100000>; + ranges; #address-cells = <1>; #size-cells = <1>;
@@ -103,77 +103,77 @@ axi@18000000 { interrupt-map-mask = <0x000fffff 0xffff>; interrupt-map = /* ChipCommon */ - <0x00000000 0 &gic GIC_SPI 85 IRQ_TYPE_LEVEL_HIGH>, + <0x18000000 0 &gic GIC_SPI 85 IRQ_TYPE_LEVEL_HIGH>, /* Switch Register Access Block */ - <0x00007000 0 &gic GIC_SPI 95 IRQ_TYPE_LEVEL_HIGH>, - <0x00007000 1 &gic GIC_SPI 96 IRQ_TYPE_LEVEL_HIGH>, - <0x00007000 2 &gic GIC_SPI 97 IRQ_TYPE_LEVEL_HIGH>, - <0x00007000 3 &gic GIC_SPI 98 IRQ_TYPE_LEVEL_HIGH>, - <0x00007000 4 &gic GIC_SPI 99 IRQ_TYPE_LEVEL_HIGH>, - <0x00007000 5 &gic GIC_SPI 100 IRQ_TYPE_LEVEL_HIGH>, - <0x00007000 6 &gic GIC_SPI 101 IRQ_TYPE_LEVEL_HIGH>, - <0x00007000 7 &gic GIC_SPI 102 IRQ_TYPE_LEVEL_HIGH>, - <0x00007000 8 &gic GIC_SPI 103 IRQ_TYPE_LEVEL_HIGH>, - <0x00007000 9 &gic GIC_SPI 104 IRQ_TYPE_LEVEL_HIGH>, - <0x00007000 10 &gic GIC_SPI 105 IRQ_TYPE_LEVEL_HIGH>, - <0x00007000 11 &gic GIC_SPI 106 IRQ_TYPE_LEVEL_HIGH>, - <0x00007000 12 &gic GIC_SPI 107 IRQ_TYPE_LEVEL_HIGH>, + <0x18007000 0 &gic GIC_SPI 95 IRQ_TYPE_LEVEL_HIGH>, + <0x18007000 1 &gic GIC_SPI 96 IRQ_TYPE_LEVEL_HIGH>, + <0x18007000 2 &gic GIC_SPI 97 IRQ_TYPE_LEVEL_HIGH>, + <0x18007000 3 &gic GIC_SPI 98 IRQ_TYPE_LEVEL_HIGH>, + <0x18007000 4 &gic GIC_SPI 99 IRQ_TYPE_LEVEL_HIGH>, + <0x18007000 5 &gic GIC_SPI 100 IRQ_TYPE_LEVEL_HIGH>, + <0x18007000 6 &gic GIC_SPI 101 IRQ_TYPE_LEVEL_HIGH>, + <0x18007000 7 &gic GIC_SPI 102 IRQ_TYPE_LEVEL_HIGH>, + <0x18007000 8 &gic GIC_SPI 103 IRQ_TYPE_LEVEL_HIGH>, + <0x18007000 9 &gic GIC_SPI 104 IRQ_TYPE_LEVEL_HIGH>, + <0x18007000 10 &gic GIC_SPI 105 IRQ_TYPE_LEVEL_HIGH>, + <0x18007000 11 &gic GIC_SPI 106 IRQ_TYPE_LEVEL_HIGH>, + <0x18007000 12 &gic GIC_SPI 107 IRQ_TYPE_LEVEL_HIGH>, /* PCIe Controller 0 */ - <0x00012000 0 &gic GIC_SPI 126 IRQ_TYPE_LEVEL_HIGH>, - <0x00012000 1 &gic GIC_SPI 127 IRQ_TYPE_LEVEL_HIGH>, - <0x00012000 2 &gic GIC_SPI 128 IRQ_TYPE_LEVEL_HIGH>, - <0x00012000 3 &gic GIC_SPI 129 IRQ_TYPE_LEVEL_HIGH>, - <0x00012000 4 &gic GIC_SPI 130 IRQ_TYPE_LEVEL_HIGH>, - <0x00012000 5 &gic GIC_SPI 131 IRQ_TYPE_LEVEL_HIGH>, + <0x18012000 0 &gic GIC_SPI 126 IRQ_TYPE_LEVEL_HIGH>, + <0x18012000 1 &gic GIC_SPI 127 IRQ_TYPE_LEVEL_HIGH>, + <0x18012000 2 &gic GIC_SPI 128 IRQ_TYPE_LEVEL_HIGH>, + <0x18012000 3 &gic GIC_SPI 129 IRQ_TYPE_LEVEL_HIGH>, + <0x18012000 4 &gic GIC_SPI 130 IRQ_TYPE_LEVEL_HIGH>, + <0x18012000 5 &gic GIC_SPI 131 IRQ_TYPE_LEVEL_HIGH>, /* PCIe Controller 1 */ - <0x00013000 0 &gic GIC_SPI 132 IRQ_TYPE_LEVEL_HIGH>, - <0x00013000 1 &gic GIC_SPI 133 IRQ_TYPE_LEVEL_HIGH>, - <0x00013000 2 &gic GIC_SPI 134 IRQ_TYPE_LEVEL_HIGH>, - <0x00013000 3 &gic GIC_SPI 135 IRQ_TYPE_LEVEL_HIGH>, - <0x00013000 4 &gic GIC_SPI 136 IRQ_TYPE_LEVEL_HIGH>, - <0x00013000 5 &gic GIC_SPI 137 IRQ_TYPE_LEVEL_HIGH>, + <0x18013000 0 &gic GIC_SPI 132 IRQ_TYPE_LEVEL_HIGH>, + <0x18013000 1 &gic GIC_SPI 133 IRQ_TYPE_LEVEL_HIGH>, + <0x18013000 2 &gic GIC_SPI 134 IRQ_TYPE_LEVEL_HIGH>, + <0x18013000 3 &gic GIC_SPI 135 IRQ_TYPE_LEVEL_HIGH>, + <0x18013000 4 &gic GIC_SPI 136 IRQ_TYPE_LEVEL_HIGH>, + <0x18013000 5 &gic GIC_SPI 137 IRQ_TYPE_LEVEL_HIGH>, /* PCIe Controller 2 */ - <0x00014000 0 &gic GIC_SPI 138 IRQ_TYPE_LEVEL_HIGH>, - <0x00014000 1 &gic GIC_SPI 138 IRQ_TYPE_LEVEL_HIGH>, - <0x00014000 2 &gic GIC_SPI 140 IRQ_TYPE_LEVEL_HIGH>, - <0x00014000 3 &gic GIC_SPI 141 IRQ_TYPE_LEVEL_HIGH>, - <0x00014000 4 &gic GIC_SPI 142 IRQ_TYPE_LEVEL_HIGH>, - <0x00014000 5 &gic GIC_SPI 143 IRQ_TYPE_LEVEL_HIGH>, + <0x18014000 0 &gic GIC_SPI 138 IRQ_TYPE_LEVEL_HIGH>, + <0x18014000 1 &gic GIC_SPI 138 IRQ_TYPE_LEVEL_HIGH>, + <0x18014000 2 &gic GIC_SPI 140 IRQ_TYPE_LEVEL_HIGH>, + <0x18014000 3 &gic GIC_SPI 141 IRQ_TYPE_LEVEL_HIGH>, + <0x18014000 4 &gic GIC_SPI 142 IRQ_TYPE_LEVEL_HIGH>, + <0x18014000 5 &gic GIC_SPI 143 IRQ_TYPE_LEVEL_HIGH>, /* USB 2.0 Controller */ - <0x00021000 0 &gic GIC_SPI 79 IRQ_TYPE_LEVEL_HIGH>, + <0x18021000 0 &gic GIC_SPI 79 IRQ_TYPE_LEVEL_HIGH>, /* USB 3.0 Controller */ - <0x00023000 0 &gic GIC_SPI 80 IRQ_TYPE_LEVEL_HIGH>, + <0x18023000 0 &gic GIC_SPI 80 IRQ_TYPE_LEVEL_HIGH>, /* Ethernet Controller 0 */ - <0x00024000 0 &gic GIC_SPI 147 IRQ_TYPE_LEVEL_HIGH>, + <0x18024000 0 &gic GIC_SPI 147 IRQ_TYPE_LEVEL_HIGH>, /* Ethernet Controller 1 */ - <0x00025000 0 &gic GIC_SPI 148 IRQ_TYPE_LEVEL_HIGH>, + <0x18025000 0 &gic GIC_SPI 148 IRQ_TYPE_LEVEL_HIGH>, /* Ethernet Controller 2 */ - <0x00026000 0 &gic GIC_SPI 149 IRQ_TYPE_LEVEL_HIGH>, + <0x18026000 0 &gic GIC_SPI 149 IRQ_TYPE_LEVEL_HIGH>, /* Ethernet Controller 3 */ - <0x00027000 0 &gic GIC_SPI 150 IRQ_TYPE_LEVEL_HIGH>, + <0x18027000 0 &gic GIC_SPI 150 IRQ_TYPE_LEVEL_HIGH>, /* NAND Controller */ - <0x00028000 0 &gic GIC_SPI 64 IRQ_TYPE_LEVEL_HIGH>, - <0x00028000 1 &gic GIC_SPI 65 IRQ_TYPE_LEVEL_HIGH>, - <0x00028000 2 &gic GIC_SPI 66 IRQ_TYPE_LEVEL_HIGH>, - <0x00028000 3 &gic GIC_SPI 67 IRQ_TYPE_LEVEL_HIGH>, - <0x00028000 4 &gic GIC_SPI 68 IRQ_TYPE_LEVEL_HIGH>, - <0x00028000 5 &gic GIC_SPI 69 IRQ_TYPE_LEVEL_HIGH>, - <0x00028000 6 &gic GIC_SPI 70 IRQ_TYPE_LEVEL_HIGH>, - <0x00028000 7 &gic GIC_SPI 71 IRQ_TYPE_LEVEL_HIGH>; - - chipcommon: chipcommon@0 { - reg = <0x00000000 0x1000>; + <0x18028000 0 &gic GIC_SPI 64 IRQ_TYPE_LEVEL_HIGH>, + <0x18028000 1 &gic GIC_SPI 65 IRQ_TYPE_LEVEL_HIGH>, + <0x18028000 2 &gic GIC_SPI 66 IRQ_TYPE_LEVEL_HIGH>, + <0x18028000 3 &gic GIC_SPI 67 IRQ_TYPE_LEVEL_HIGH>, + <0x18028000 4 &gic GIC_SPI 68 IRQ_TYPE_LEVEL_HIGH>, + <0x18028000 5 &gic GIC_SPI 69 IRQ_TYPE_LEVEL_HIGH>, + <0x18028000 6 &gic GIC_SPI 70 IRQ_TYPE_LEVEL_HIGH>, + <0x18028000 7 &gic GIC_SPI 71 IRQ_TYPE_LEVEL_HIGH>; + + chipcommon: chipcommon@18000000 { + reg = <0x18000000 0x1000>; gpio-controller; #gpio-cells = <2>;
@@ -181,29 +181,29 @@ chipcommon: chipcommon@0 { #interrupt-cells = <2>; }; - pcie0: pcie@12000 { - reg = <0x00012000 0x1000>; + pcie0: pcie@18012000 { + reg = <0x18012000 0x1000>; #address-cells = <3>; #size-cells = <2>; }; - pcie1: pcie@13000 { - reg = <0x00013000 0x1000>; + pcie1: pcie@18013000 { + reg = <0x18013000 0x1000>; #address-cells = <3>; #size-cells = <2>; }; - pcie2: pcie@14000 { - reg = <0x00014000 0x1000>; + pcie2: pcie@18014000 { + reg = <0x18014000 0x1000>; #address-cells = <3>; #size-cells = <2>; }; - usb2: usb2@21000 { - reg = <0x00021000 0x1000>; + usb2: usb2@18021000 { + reg = <0x18021000 0x1000>; #address-cells = <1>; #size-cells = <1>;
@@ -211,9 +211,9 @@ usb2: usb2@21000 { interrupt-parent = <&gic>; - ehci: usb@21000 { + ehci: usb@18021000 { compatible = "generic-ehci"; - reg = <0x00021000 0x1000>; + reg = <0x18021000 0x1000>; interrupts = <GIC_SPI 79 IRQ_TYPE_LEVEL_HIGH>; phys = <&usb2_phy>;
@@ -231,9 +231,9 @@ ehci_port2: port@2 { }; }; - ohci: usb@22000 { + ohci: usb@18022000 { compatible = "generic-ohci"; - reg = <0x00022000 0x1000>; + reg = <0x18022000 0x1000>; interrupts = <GIC_SPI 79 IRQ_TYPE_LEVEL_HIGH>; #address-cells = <1>;
@@ -251,8 +251,8 @@ ohci_port2: port@2 { }; }; - usb3: usb3@23000 { - reg = <0x00023000 0x1000>; + usb3: usb3@18023000 { + reg = <0x18023000 0x1000>; #address-cells = <1>; #size-cells = <1>;
@@ -260,9 +260,9 @@ usb3: usb3@23000 { interrupt-parent = <&gic>; - xhci: usb@23000 { + xhci: usb@18023000 { compatible = "generic-xhci"; - reg = <0x00023000 0x1000>; + reg = <0x18023000 0x1000>; interrupts = <GIC_SPI 80 IRQ_TYPE_LEVEL_HIGH>; phys = <&usb3_phy>; phy-names = "usb";
@@ -277,8 +277,8 @@ xhci_port1: port@1 { }; }; - gmac0: ethernet@24000 { - reg = <0x24000 0x800>; + gmac0: ethernet@18024000 { + reg = <0x18024000 0x800>; phy-mode = "internal"; fixed-link {
@@ -287,8 +287,8 @@ fixed-link { }; }; - gmac1: ethernet@25000 { - reg = <0x25000 0x800>; + gmac1: ethernet@18025000 { + reg = <0x18025000 0x800>; phy-mode = "internal"; fixed-link {
@@ -297,8 +297,8 @@ fixed-link { }; }; - gmac2: ethernet@26000 { - reg = <0x26000 0x800>; + gmac2: ethernet@18026000 { + reg = <0x18026000 0x800>; phy-mode = "internal"; fixed-link {
@@ -307,7 +307,7 @@ fixed-link { }; }; - gmac3: ethernet@27000 { + gmac3: ethernet@18027000 { reg = <0x27000 0x800>; }; };
Signature · 1 line
2.35.3
Rafał Miłecki
maintainerPATCH 2/2 ARM: dts: BCM5301X: Describe PCIe controllers fully
From: Rafał Miłecki <[email protected]>
This fixes:arch/arm/boot/dts/broadcom/bcm4708-asus-rt-ac56u.dtb: pcie@18012000: 'device_type' is a required property
from schema $id: http://devicetree.org/schemas/pci/pci-bus.yaml#arch/arm/boot/dts/broadcom/bcm4708-asus-rt-ac56u.dtb: pcie@18012000: 'ranges' is a required property
from schema $id: http://devicetree.org/schemas/pci/pci-bus.yaml#arch/arm/boot/dts/broadcom/bcm4708-asus-rt-ac56u.dtb: pcie@18013000: 'device_type' is a required property
from schema $id: http://devicetree.org/schemas/pci/pci-bus.yaml#arch/arm/boot/dts/broadcom/bcm4708-asus-rt-ac56u.dtb: pcie@18013000: 'ranges' is a required property
from schema $id: http://devicetree.org/schemas/pci/pci-bus.yaml#arch/arm/boot/dts/broadcom/bcm4708-asus-rt-ac56u.dtb: pcie@18014000: 'device_type' is a required property
from schema $id: http://devicetree.org/schemas/pci/pci-bus.yaml#arch/arm/boot/dts/broadcom/bcm4708-asus-rt-ac56u.dtb: pcie@18014000: 'ranges' is a required property
from schema $id: http://devicetree.org/schemas/pci/pci-bus.yaml#
--- arch/arm/boot/dts/broadcom/bcm-ns.dtsi | 24 +++++++++++++++++++++--- 1 file changed, 21 insertions(+), 3 deletions(-)
arch/arm/boot/dts/broadcom/bcm-ns.dtsi +21 -3
@@ -182,22 +182,40 @@ chipcommon: chipcommon@18000000 { }; pcie0: pcie@18012000 { + compatible = "brcm,iproc-pcie"; reg = <0x18012000 0x1000>; - + ranges = <0x82000000 0 0x08000000 0x08000000 0 0x08000000>; + interrupt-map-mask = <0 0 0 0>; + interrupt-map = <0 0 0 0 &gic GIC_SPI 126 IRQ_TYPE_LEVEL_HIGH>; + bus-range = <0x00 0xff>; + device_type = "pci"; + #interrupt-cells = <1>; #address-cells = <3>; #size-cells = <2>; }; pcie1: pcie@18013000 { + compatible = "brcm,iproc-pcie"; reg = <0x18013000 0x1000>; - + ranges = <0x82000000 0 0x20000000 0x20000000 0 0x08000000>; + interrupt-map-mask = <0 0 0 0>; + interrupt-map = <0 0 0 0 &gic GIC_SPI 132 IRQ_TYPE_LEVEL_HIGH>; + bus-range = <0x00 0xff>; + device_type = "pci"; + #interrupt-cells = <1>; #address-cells = <3>; #size-cells = <2>; }; pcie2: pcie@18014000 { + compatible = "brcm,iproc-pcie"; reg = <0x18014000 0x1000>; - + ranges = <0x82000000 0 0x28000000 0x28000000 0 0x08000000>; + interrupt-map-mask = <0 0 0 0>; + interrupt-map = <0 0 0 0 &gic GIC_SPI 138 IRQ_TYPE_LEVEL_HIGH>; + bus-range = <0x00 0xff>; + device_type = "pci"; + #interrupt-cells = <1>; #address-cells = <3>; #size-cells = <2>; };
Signature · 1 line
2.35.3
Re: [PATCH 2/2] ARM: dts: BCM5301X: Describe PCIe controllers fully
Quoted 16 lines · Rafał Miłecki
From: Rafał Miłecki <[email protected]>
This fixes:
arch/arm/boot/dts/broadcom/bcm4708-asus-rt-ac56u.dtb: pcie@18012000: 'device_type' is a required property
from schema $id: http://devicetree.org/schemas/pci/pci-bus.yaml#arch/arm/boot/dts/broadcom/bcm4708-asus-rt-ac56u.dtb: pcie@18012000: 'ranges' is a required property
from schema $id: http://devicetree.org/schemas/pci/pci-bus.yaml#arch/arm/boot/dts/broadcom/bcm4708-asus-rt-ac56u.dtb: pcie@18013000: 'device_type' is a required property
from schema $id: http://devicetree.org/schemas/pci/pci-bus.yaml#arch/arm/boot/dts/broadcom/bcm4708-asus-rt-ac56u.dtb: pcie@18013000: 'ranges' is a required property
from schema $id: http://devicetree.org/schemas/pci/pci-bus.yaml#arch/arm/boot/dts/broadcom/bcm4708-asus-rt-ac56u.dtb: pcie@18014000: 'device_type' is a required property
from schema $id: http://devicetree.org/schemas/pci/pci-bus.yaml#arch/arm/boot/dts/broadcom/bcm4708-asus-rt-ac56u.dtb: pcie@18014000: 'ranges' is a required property
from schema $id: http://devicetree.org/schemas/pci/pci-bus.yaml#
Quoted 2 lines
Cc Arınç ÜNAL <[email protected]>Signed-off-by Rafał Miłecki <[email protected]>
Looks right to me!
Yours,
Linus Walleij
Florian Fainelli
maintainerRe: [PATCH 2/2] ARM: dts: BCM5301X: Describe PCIe controllers fully
In reply to Rafał MiłeckiQuoted 16 lines · Rafał Miłecki
From: Rafał Miłecki <[email protected]>
This fixes:
arch/arm/boot/dts/broadcom/bcm4708-asus-rt-ac56u.dtb: pcie@18012000: 'device_type' is a required property
from schema $id: http://devicetree.org/schemas/pci/pci-bus.yaml#arch/arm/boot/dts/broadcom/bcm4708-asus-rt-ac56u.dtb: pcie@18012000: 'ranges' is a required property
from schema $id: http://devicetree.org/schemas/pci/pci-bus.yaml#arch/arm/boot/dts/broadcom/bcm4708-asus-rt-ac56u.dtb: pcie@18013000: 'device_type' is a required property
from schema $id: http://devicetree.org/schemas/pci/pci-bus.yaml#arch/arm/boot/dts/broadcom/bcm4708-asus-rt-ac56u.dtb: pcie@18013000: 'ranges' is a required property
from schema $id: http://devicetree.org/schemas/pci/pci-bus.yaml#arch/arm/boot/dts/broadcom/bcm4708-asus-rt-ac56u.dtb: pcie@18014000: 'device_type' is a required property
from schema $id: http://devicetree.org/schemas/pci/pci-bus.yaml#arch/arm/boot/dts/broadcom/bcm4708-asus-rt-ac56u.dtb: pcie@18014000: 'ranges' is a required property
from schema $id: http://devicetree.org/schemas/pci/pci-bus.yaml#
Quoted 2 lines
Cc Arınç ÜNAL <[email protected]>Signed-off-by Rafał Miłecki <[email protected]>
OK, so this is the rationale for patch #1, because you are adding a 'ranges' property to each PCIe root complex node, and you need the values in the 'ranges' property to be expressed relative to the global address space, and not the axi@18000000 address space, you needed to flatten the axi@18000000 range.
Why not just bring those 3 nodes out of the axi@18000000 node into the global address space then? That would greatly limit the amount of changes in patch #1, some of which are just unfortunate noise.
From the chip diagram, each PCIe controller has its own separate AXI interface to the NIC 301 AXI fabric, so having 3 independent nodes which are not tied to the axi@18000000 would not be wrong IMHO.
Thanks for doing this!
Signature · 1 line
Florian
Rafał Miłecki
maintainerRe: [PATCH 2/2] ARM: dts: BCM5301X: Describe PCIe controllers fully
Quoted 17 lines · Florian Fainelli
Quoted 16 lines · Rafał Miłecki
From: Rafał Miłecki <[email protected]>
This fixes:
arch/arm/boot/dts/broadcom/bcm4708-asus-rt-ac56u.dtb: pcie@18012000: 'device_type' is a required property from schema $id: http://devicetree.org/schemas/pci/pci-bus.yaml#arch/arm/boot/dts/broadcom/bcm4708-asus-rt-ac56u.dtb: pcie@18012000: 'ranges' is a required property from schema $id: http://devicetree.org/schemas/pci/pci-bus.yaml#arch/arm/boot/dts/broadcom/bcm4708-asus-rt-ac56u.dtb: pcie@18013000: 'device_type' is a required property from schema $id: http://devicetree.org/schemas/pci/pci-bus.yaml#arch/arm/boot/dts/broadcom/bcm4708-asus-rt-ac56u.dtb: pcie@18013000: 'ranges' is a required property from schema $id: http://devicetree.org/schemas/pci/pci-bus.yaml#arch/arm/boot/dts/broadcom/bcm4708-asus-rt-ac56u.dtb: pcie@18014000: 'device_type' is a required property from schema $id: http://devicetree.org/schemas/pci/pci-bus.yaml#arch/arm/boot/dts/broadcom/bcm4708-asus-rt-ac56u.dtb: pcie@18014000: 'ranges' is a required property from schema $id: http://devicetree.org/schemas/pci/pci-bus.yaml#
Quoted 8 lines
Quoted 2 lines
Cc Arınç ÜNAL <[email protected]>Signed-off-by Rafał Miłecki <[email protected]>OK, so this is the rationale for patch #1, because you are adding a 'ranges' property to each PCIe root complex node, and you need the values in the 'ranges' property to be expressed relative to the global address space, and not the axi@18000000 address space, you needed to flatten the axi@18000000 range.
Why not just bring those 3 nodes out of the axi@18000000 node into the global address space then? That would greatly limit the amount of changes in patch #1, some of which are just unfortunate noise.
From the chip diagram, each PCIe controller has its own separate AXI interface to the NIC 301 AXI fabric, so having 3 independent nodes which are not tied to the axi@18000000 would not be wrong IMHO.
I got impression that memory mapped blocks should preferably go into a "soc" node. It's what I seen in some other platforms and what is also present (thought not directly documented) in the dts-coding-style.rst .
We don't have "soc" node but "axi@18000000" seems like our substitute.
So I thought we should keep PCIe controllers nodes in axi@ (soc@).
Florian Fainelli
maintainerRe: [PATCH 2/2] ARM: dts: BCM5301X: Describe PCIe controllers fully
Quoted 27 lines · Rafał Miłecki
Quoted 17 lines · Florian Fainelli
Quoted 16 lines · Rafał Miłecki
From: Rafał Miłecki <[email protected]>
This fixes:
arch/arm/boot/dts/broadcom/bcm4708-asus-rt-ac56u.dtb: pcie@18012000: 'device_type' is a required property from schema $id: http://devicetree.org/schemas/pci/pci-bus.yaml#arch/arm/boot/dts/broadcom/bcm4708-asus-rt-ac56u.dtb: pcie@18012000: 'ranges' is a required property from schema $id: http://devicetree.org/schemas/pci/pci-bus.yaml#arch/arm/boot/dts/broadcom/bcm4708-asus-rt-ac56u.dtb: pcie@18013000: 'device_type' is a required property from schema $id: http://devicetree.org/schemas/pci/pci-bus.yaml#arch/arm/boot/dts/broadcom/bcm4708-asus-rt-ac56u.dtb: pcie@18013000: 'ranges' is a required property from schema $id: http://devicetree.org/schemas/pci/pci-bus.yaml#arch/arm/boot/dts/broadcom/bcm4708-asus-rt-ac56u.dtb: pcie@18014000: 'device_type' is a required property from schema $id: http://devicetree.org/schemas/pci/pci-bus.yaml#arch/arm/boot/dts/broadcom/bcm4708-asus-rt-ac56u.dtb: pcie@18014000: 'ranges' is a required property from schema $id: http://devicetree.org/schemas/pci/pci-bus.yaml#Quoted 8 lines
Quoted 2 lines
Cc Arınç ÜNAL <[email protected]>Signed-off-by Rafał Miłecki <[email protected]>OK, so this is the rationale for patch #1, because you are adding a 'ranges' property to each PCIe root complex node, and you need the values in the 'ranges' property to be expressed relative to the global address space, and not the axi@18000000 address space, you needed to flatten the axi@18000000 range.
Why not just bring those 3 nodes out of the axi@18000000 node into the global address space then? That would greatly limit the amount of changes in patch #1, some of which are just unfortunate noise.
From the chip diagram, each PCIe controller has its own separate AXI interface to the NIC 301 AXI fabric, so having 3 independent nodes which are not tied to the axi@18000000 would not be wrong IMHO.
Quoted 7 lines
I got impression that memory mapped blocks should preferably go into a "soc" node. It's what I seen in some other platforms and what is also present (thought not directly documented) in the
dts-coding-style.rst.We don't have "soc" node but "axi@18000000" seems like our substitute.
So I thought we should keep PCIe controllers nodes in axi@ (soc@).
PCIe Host Bridges are sort of special because they are bridges but also have a configuration interface via the MMIO register space. Tying them to a particular bus node in the .dts(i) that accurately describes how they are interfaced to the host CPU might be a tad difficult sometimes.
My preference as a maintainer would be to minimize the amount of node(s) being changed and just isolate the 3 PCIe host bridges directly under the root node.
Krysztof, any objection to that?
Signature · 1 line
Florian
Quoted 6 lines · Rafał Miłecki
From: Rafał Miłecki <[email protected]>
Limiting addresses to
0x18000000+0x100000disallowed describing some devices (e.g. PCIe controllers).Signed-off-by Rafał Miłecki <[email protected]>
Yours,
Linus Walleij
Florian Fainelli
maintainerQuoted 4 lines · Rafał Miłecki
From: Rafał Miłecki <[email protected]>
Limiting addresses to
0x18000000+0x100000disallowed describing some devices (e.g. PCIe controllers).
This might require a little more explanation, because the PCIe controlers are (relative to the base of the axi@18000000 node) at 0x12000, 0x13000 and 0x14000 respectively, which are all within the 1MiB aperture defined from 0x18000000.
The PCIe node(s) do not currently have a "ranges" node either, so I am not sure what this change does besides flattening the address space?
Signature · 1 line
Florian