[PATCH 0/4] PCI: populate PCI host controller device nodes

Sascha Hauer s.hauer at pengutronix.de
Thu May 21 01:36:54 PDT 2026


PCI devices usually don't have and don't need a representation in the
device tree, but sometimes they do. This series adds support for adding
device nodes for PCI devices to the barebox live tree similar to what
Linux does with CONFIG_PCI_DYNAMIC_OF_NODES enabled. We also fixup the
Linux device tree with the PCI device nodes. This allows PCI device
drivers to register of_fixups for PCI devices: The barebox internal
PCI device now gets a device node (from the patched barebox live tree)
and it can use this node to find the corresponding device node in the
Linux device tree (possibly added by barebox as well).

In my case I do not need a PCI device driver to add a node to the
Linux tree. What I want to archieve is that a MAC address of a PCI
device that is initialized in a board specific way is forwarded to
Linux using the mac-address property. For this case there are is no
further code needed, the only piece missing is the creation of the
PCI device nodes added with this series.

Signed-off-by: Sascha Hauer <s.hauer at pengutronix.de>
---
Sascha Hauer (4):
      of: fall back to parent-prefixed encoding when address translation fails
      pci: fix DT node matching when reg encodes a non-zero bus number
      pci: add pci_is_bridge() helper
      pci: synthesize devicetree nodes for enumerated devices

 drivers/of/base.c        |   9 ++-
 drivers/pci/Kconfig      |  23 +++++++
 drivers/pci/Makefile     |   1 +
 drivers/pci/of-dynamic.c | 173 +++++++++++++++++++++++++++++++++++++++++++++++
 drivers/pci/pci.c        |  12 +++-
 include/linux/pci.h      |  14 ++++
 include/of_pci.h         |   6 ++
 7 files changed, 235 insertions(+), 3 deletions(-)
---
base-commit: 6bde1c5bcd518f378189c2f4b41704126713f3c4
change-id: 20260521-pci-of-dynamic-15df50ff7905

Best regards,
-- 
Sascha Hauer <s.hauer at pengutronix.de>




More information about the barebox mailing list