arm64: dts: qcom: clean up PCI function nodes
v3 cover arm64: dts: qcom: clean up PCI function nodes
While working on upstream support for the Toshiba TC9564 SoC I discovered that the way its PCIe endpoint function nodes are defined in devicetree files is incorrect. Two issues have been pointed out during the course of review:
- Only PCI bridge device nodes should contain this property:
device_type = "pci";
- Only bridge device nodes should be named "pcie@" (or "pci@")
The second of these was previously addressed by this series:
https://lore.kernel.org/lkml/[email protected]/
Instead, those changes are now included here.
These errors existed for the RB3gen2 platform, but five other Qualcomm devicetree files had this same mistake (all describing a TC9564 SoC).
This series removes the device_type property where it is defined for a PCI endpoint function, and renames such nodes "dev@".
The #address-cells, #size-cells, and ranges properties are also removed for these nodes. These will be restored when they are known to be needed (to implement pci-ep-bus sub-nodes).
-Alex
Between version 2 and version 3:
- Added Reviewed-by from Abel (and for the last patch, Mani)
- Renamed all nodes "dev@" rather than "pcie@" or "pci@"
Version 2 is available here:
https://lore.kernel.org/lkml/[email protected]/
Between version 1 and version 2:
- Added Reviewed-by from Mani and Konrad
- Added a patch that updates "qcs8550-rb5gen2.dts" as well
Version 1 is available here:
https://lore.kernel.org/lkml/[email protected]/
Alex Elder (6):
arm64: dts: qcom: qcs6490-rb3gen2: clean up PCI function nodes
arm64: dts: qcom: qcs6490-rb3gen2-industrial-mezzanine: clean up PCI
function nodes
arm64: dts: qcom: lemans-evk-ifp-mezzanine: clean up PCI function
nodes
arm64: dts: qcom: monaco-evk-ifp-mezzanine: clean up PCI function
nodes
arm64: dts: qcom: qcs6490-thundercomm-minipc-g1iot: clean up PCI
function nodes
arm64: dts: qcom: qcs8550-rb5gen2: clean up PCI function nodes
.../dts/qcom/lemans-evk-ifp-mezzanine.dtso | 12 ++-------- .../dts/qcom/monaco-evk-ifp-mezzanine.dtso | 12 ++-------- .../qcs6490-rb3gen2-industrial-mezzanine.dtso | 24 ++++--------------- arch/arm64/boot/dts/qcom/qcs6490-rb3gen2.dts | 12 ++-------- .../qcom/qcs6490-thundercomm-minipc-g1iot.dts | 12 ++-------- arch/arm64/boot/dts/qcom/qcs8550-rb5gen2.dts | 12 ++-------- 6 files changed, 14 insertions(+), 70 deletions(-)
base-commit: cee9395acd8043be0644b25c34bfa86623f2b935
Signature · 1 line
2.53.0
PATCH v3 1/6 arm64: dts: qcom: qcs6490-rb3gen2: clean up PCI function nodes
The TC9564 SoC contains a PCIe switch with three downstream ports. The third downstream port connects to an embedded PCI endpoint, and that endpoint implements two PCI functions.
The devicetree node describing those functions incorrectly includes this property:
device_type = "pci";
That property should only be used for a PCI device "that implements a PCI bus", but not a PCIe function. So remove the device_type property from the nodes representing the two embedded PCI functions.
Additionally, only PCI bridge nodes should be named "pcie@" (or "pci@"). PCI endpoint nodes are typically named based on the functionality they implement (e.g., "ethernet@"). In this case, the role of these PCI functions is not (yet) specified, and furthermore they will be used with PCI endpoint buses. Rename these to use "dev@", following the convention used in of_pci_make_dev_node() for dynamically-created devicetree nodes.
Finally, those properties contain #address-cells, #size-cells, and ranges properties. And although these properties *will* be appropriate for these functions on an RB3gen2, they are not normally used for PCI functions. So remove these properties as well; we'll include them in the commit that actually adds a pci-ep-bus sub-node to these PCI function nodes.
--- arch/arm64/boot/dts/qcom/qcs6490-rb3gen2.dts | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-)
arch/arm64/boot/dts/qcom/qcs6490-rb3gen2.dts +2 -10
@@ -954,20 +954,12 @@ pcie@3,0 { ranges; bus-range = <0x5 0xff>; - pcie@0,0 { + dev@0,0 { reg = <0x50000 0x0 0x0 0x0 0x0>; - #address-cells = <3>; - #size-cells = <2>; - device_type = "pci"; - ranges; }; - pcie@0,1 { + dev@0,1 { reg = <0x50100 0x0 0x0 0x0 0x0>; - #address-cells = <3>; - #size-cells = <2>; - device_type = "pci"; - ranges; }; }; };
Signature · 1 line
2.53.0
PATCH v3 2/6 arm64: dts: qcom: qcs6490-rb3gen2-industrial-mezzanine: clean up PCI function nodes
In reply to Alex ElderThe qcs6490-rb3gen2-industrial-mezzanine overlay defines two nodes representing TC956x chips, each of which contains a PCIe switch and an embedded endpoint that implements two PCIe functions.
The devicetree nodes erroneously include a "pci" device_type property for the two PCIe functions. That property should only be used for a PCI device "that implements a PCI bus". Remove this property for the two function nodes.
In addition, only PCI bridge nodes should be named "pcie@" (or "pci@"). PCI endpoint nodes are typically named based on the functionality they implement (e.g., "ethernet@"). In this case, the role of these PCI functions is not (yet) specified, and furthermore they will be used with PCI endpoint buses. Rename these to use "dev@", following the convention used in of_pci_make_dev_node() for dynamically-created devicetree nodes.
Finally, these nodes define #address-cells, #size-cells, and ranges properties, which are not normally defined for PCIe endpoints. Remove these properties as well; they can be added back once they are actually needed/used.
--- .../qcs6490-rb3gen2-industrial-mezzanine.dtso | 24 ++++--------------- 1 file changed, 4 insertions(+), 20 deletions(-)
arch/arm64/boot/dts/qcom/qcs6490-rb3gen2-industrial-mezzanine.dtso +4 -20
@@ -130,20 +130,12 @@ pcie@3,0 { ranges; bus-range = <0x5 0xff>; - pcie@0,0 { + dev@0,0 { reg = <0x50000 0x0 0x0 0x0 0x0>; - #address-cells = <3>; - #size-cells = <2>; - device_type = "pci"; - ranges; }; - pcie@0,1 { + dev@0,1 { reg = <0x50100 0x0 0x0 0x0 0x0>; - #address-cells = <3>; - #size-cells = <2>; - device_type = "pci"; - ranges; }; };
@@ -225,20 +217,12 @@ pcie@3,0 { ranges; bus-range = <0x5 0xff>; - pcie@0,0 { + dev@0,0 { reg = <0x50000 0x0 0x0 0x0 0x0>; - #address-cells = <3>; - #size-cells = <2>; - device_type = "pci"; - ranges; }; - pcie@0,1 { + dev@0,1 { reg = <0x50100 0x0 0x0 0x0 0x0>; - #address-cells = <3>; - #size-cells = <2>; - device_type = "pci"; - ranges; }; }; };
Signature · 1 line
2.53.0
PATCH v3 3/6 arm64: dts: qcom: lemans-evk-ifp-mezzanine: clean up PCI function nodes
In reply to Alex ElderThe lemans-evk-ifp-mezzanine overlay defines a node representing a TC956x chip which contains a PCIe switch and an embedded endpoint that implements two PCIe functions.
The devicetree nodes erroneously include a "pci" device_type property for the two PCIe functions. That property should only be used for a PCI device "that implements a PCI bus". Remove this property for the two function nodes.
In addition, only PCI bridge nodes should be named "pcie@" (or "pci@"). PCI endpoint nodes are typically named based on the functionality they implement (e.g., "ethernet@"). In this case, the role of these PCI functions is not (yet) specified, and furthermore they will be used with PCI endpoint buses. Rename these to use "dev@", following the convention used in of_pci_make_dev_node() for dynamically-created devicetree nodes.
Finally, these nodes define #address-cells, #size-cells, and ranges properties, which are not normally defined for PCIe endpoints. Remove these properties as well; they can be added back once they are actually needed/used.
--- .../boot/dts/qcom/lemans-evk-ifp-mezzanine.dtso | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-)
arch/arm64/boot/dts/qcom/lemans-evk-ifp-mezzanine.dtso +2 -10
@@ -271,20 +271,12 @@ pcie@3,0 { ranges; bus-range = <0x5 0xff>; - pcie@0,0 { + dev@0,0 { reg = <0x50000 0x0 0x0 0x0 0x0>; - #address-cells = <3>; - #size-cells = <2>; - device_type = "pci"; - ranges; }; - pcie@0,1 { + dev@0,1 { reg = <0x50100 0x0 0x0 0x0 0x0>; - #address-cells = <3>; - #size-cells = <2>; - device_type = "pci"; - ranges; }; }; };
Signature · 1 line
2.53.0
PATCH v3 4/6 arm64: dts: qcom: monaco-evk-ifp-mezzanine: clean up PCI function nodes
In reply to Alex ElderThe monaco-evk-ifp-mezzanine overlay defines a node representing a TC956x chip which contains a PCIe switch and an embedded endpoint that implements two PCIe functions.
The devicetree nodes erroneously include a "pci" device_type property for the two PCIe functions. That property should only be used for a PCI device "that implements a PCI bus". Remove this property for the two function nodes.
In addition, only PCI bridge nodes should be named "pcie@" (or "pci@"). PCI endpoint nodes are typically named based on the functionality they implement (e.g., "ethernet@"). In this case, the role of these PCI functions is not (yet) specified, and furthermore they will be used with PCI endpoint buses. Rename these to use "dev@", following the convention used in of_pci_make_dev_node() for dynamically-created devicetree nodes.
Finally, these nodes define #address-cells, #size-cells, and ranges properties, which are not normally defined for PCIe endpoints. Remove these properties as well; they can be added back once they are actually needed/used.
--- .../boot/dts/qcom/monaco-evk-ifp-mezzanine.dtso | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-)
arch/arm64/boot/dts/qcom/monaco-evk-ifp-mezzanine.dtso +2 -10
@@ -117,20 +117,12 @@ pcie@3,0 { ranges; bus-range = <0x5 0xff>; - pcie@0,0 { + dev@0,0 { reg = <0x50000 0x0 0x0 0x0 0x0>; - #address-cells = <3>; - #size-cells = <2>; - device_type = "pci"; - ranges; }; - pcie@0,1 { + dev@0,1 { reg = <0x50100 0x0 0x0 0x0 0x0>; - #address-cells = <3>; - #size-cells = <2>; - device_type = "pci"; - ranges; }; }; };
Signature · 1 line
2.53.0
PATCH v3 5/6 arm64: dts: qcom: qcs6490-thundercomm-minipc-g1iot: clean up PCI function nodes
In reply to Alex ElderThe Thundercomm AI Mini PC G1 IoT devicetree source file defines a node representing a TC956x chip which contains a PCIe switch and an embedded endpoint that implements two PCIe functions.
The devicetree nodes erroneously include a "pci" device_type property for the two PCIe functions. That property should only be used for a PCI device "that implements a PCI bus". Remove this property for the two function nodes.
In addition, only PCI bridge nodes should be named "pcie@" (or "pci@"). PCI endpoint nodes are typically named based on the functionality they implement (e.g., "ethernet@"). In this case, the role of these PCI functions is not (yet) specified, and furthermore they will be used with PCI endpoint buses. Rename these to use "dev@", following the convention used in of_pci_make_dev_node() for dynamically-created devicetree nodes.
Finally, these nodes define #address-cells, #size-cells, and ranges properties, which are not normally defined for PCIe endpoints. Remove these properties as well; they can be added back once they are actually needed/used.
--- .../dts/qcom/qcs6490-thundercomm-minipc-g1iot.dts | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-)
arch/arm64/boot/dts/qcom/qcs6490-thundercomm-minipc-g1iot.dts +2 -10
@@ -790,20 +790,12 @@ pcie@3,0 { ranges; bus-range = <0x5 0xff>; - pcie@0,0 { + dev@0,0 { reg = <0x50000 0x0 0x0 0x0 0x0>; - #address-cells = <3>; - #size-cells = <2>; - device_type = "pci"; - ranges; }; - pcie@0,1 { + dev@0,1 { reg = <0x50100 0x0 0x0 0x0 0x0>; - #address-cells = <3>; - #size-cells = <2>; - device_type = "pci"; - ranges; }; }; };
Signature · 1 line
2.53.0
PATCH v3 6/6 arm64: dts: qcom: qcs8550-rb5gen2: clean up PCI function nodes
In reply to Alex ElderThe Qualcomm RB5gen2 devicetree source file defines a node representing a TC956x chip which contains a PCIe switch and an embedded endpoint that implements two PCIe functions.
The devicetree nodes erroneously include a "pci" device_type property for the two PCIe functions. That property should only be used for a PCI device "that implements a PCI bus". Remove this property for the two function nodes.
In addition, only PCI bridge nodes should be named "pci@" (or "pcie@"). PCI endpoint nodes are typically named based on the functionality they implement (e.g., "ethernet@"). In this case, the role of these PCI functions is not (yet) specified, and furthermore they will be used with PCI endpoint buses. Rename these to use "dev@", following the convention used in of_pci_make_dev_node() for dynamically-created devicetree nodes.
Finally, these nodes define #address-cells, #size-cells, and ranges properties, which are not normally defined for PCIe endpoints. Remove these properties as well; they can be added back once they are actually needed/used.
--- arch/arm64/boot/dts/qcom/qcs8550-rb5gen2.dts | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-)
arch/arm64/boot/dts/qcom/qcs8550-rb5gen2.dts +2 -10
@@ -1126,20 +1126,12 @@ pcie@3,0 { ranges; bus-range = <0x5 0xff>; - pci@0,0 { + dev@0,0 { reg = <0x50000 0x0 0x0 0x0 0x0>; - #address-cells = <3>; - #size-cells = <2>; - device_type = "pci"; - ranges; }; - pci@0,1 { + dev@0,1 { reg = <0x50100 0x0 0x0 0x0 0x0>; - #address-cells = <3>; - #size-cells = <2>; - device_type = "pci"; - ranges; }; }; };
Signature · 1 line
2.53.0
Quoted 9 lines · Alex Elder
While working on upstream support for the Toshiba TC9564 SoC I discovered that the way its PCIe endpoint function nodes are defined in devicetree files is incorrect. Two issues have been pointed out during the course of review:
- Only PCI bridge device nodes should contain this property:device_type = "pci";- Only bridge device nodes should be named "pcie@" (or "pci@")
[...]
Applied, thanks!
[1/6] arm64: dts: qcom: qcs6490-rb3gen2: clean up PCI function nodes
commit: df4107fc729e3bffce27fe0ed06fc6a64dd675cd
[2/6] arm64: dts: qcom: qcs6490-rb3gen2-industrial-mezzanine: clean up PCI function nodes
commit: aaedd4ea312d6fd70dfc5cf430edf5106c5b3382
[3/6] arm64: dts: qcom: lemans-evk-ifp-mezzanine: clean up PCI function nodes
commit: ca3027cfe8c7ef612910d2f04e58d75ec8a9b427
[4/6] arm64: dts: qcom: monaco-evk-ifp-mezzanine: clean up PCI function nodes
commit: 0f8cbe572057b0ef98c651fbd6da1877983c7165
[5/6] arm64: dts: qcom: qcs6490-thundercomm-minipc-g1iot: clean up PCI function nodes
commit: 55580d234cec123e9b2964cab30fbfad10774b26
[6/6] arm64: dts: qcom: qcs8550-rb5gen2: clean up PCI function nodes
commit: 3f7d46aaf5565471f65b2e21fbb649cedc55e6b8Best regards,
Signature · 1 line
Bjorn Andersson <[email protected]>