[PATCH 0/4] Fix RP1 DeviceTree hierarchy and drop overlay support

Andrea della Porta posted 4 patches 1 month, 2 weeks ago
.../devicetree/bindings/misc/pci1de4,1.yaml   |  8 +++-
arch/arm64/boot/dts/broadcom/Makefile         |  4 +-
...-ovl-rp1.dts => bcm2712-rpi-5-b-base.dtsi} |  0
.../boot/dts/broadcom/bcm2712-rpi-5-b.dts     | 39 ++++++++++++-------
arch/arm64/boot/dts/broadcom/rp1-nexus.dtsi   | 14 -------
arch/arm64/boot/dts/broadcom/rp1.dtso         | 11 ------
drivers/misc/rp1/Kconfig                      |  6 +--
drivers/misc/rp1/Makefile                     |  3 +-
drivers/misc/rp1/rp1-pci.dtso                 | 25 ------------
drivers/misc/rp1/rp1_pci.c                    | 37 ++----------------
drivers/pci/quirks.c                          |  1 -
11 files changed, 40 insertions(+), 108 deletions(-)
rename arch/arm64/boot/dts/broadcom/{bcm2712-rpi-5-b-ovl-rp1.dts => bcm2712-rpi-5-b-base.dtsi} (100%)
delete mode 100644 arch/arm64/boot/dts/broadcom/rp1-nexus.dtsi
delete mode 100644 arch/arm64/boot/dts/broadcom/rp1.dtso
delete mode 100644 drivers/misc/rp1/rp1-pci.dtso
[PATCH 0/4] Fix RP1 DeviceTree hierarchy and drop overlay support
Posted by Andrea della Porta 1 month, 2 weeks ago
The current RP1 implementation is plagued by several issues, as follows:

- the node name for RP1 is too specific and should be generic instead
  (see [1]).

- the fully defined DTS has its PCI hierarchy wrongly described. There
  should be a PCI root port between the root complex and the endpoint
  (see [1]).

- since CONFIG_PCI_DYNAMIC_OF_NODES can be dropped in the future
  becoming an automatically enabled feature, it would be wise to not
  depend on it (see [2]).

- overlay support has led to a lot of confusion. It's not really usable 
  right now and users are not even used to it (see [3]).

This patch aims at solving the aforementioned problems by amending the
PCI topology as follows:

  ...
  pcie@1000120000 {
    ...

    pci@0,0 {
      device_type = "pci";
      reg = <0x00 0x00 0x00 0x00 0x00>;
      ...

      dev@0,0 {
        compatible = "pci1de4,1";
        reg = <0x10000 0x00 0x00 0x00 0x00>;
        ...

        pci-ep-bus@1 {
          compatible = "simple-bus";
          ...

          /* peripherals child nodes */
        }; 
      }; 
    }; 
  }; 

The reg property is important since it permits the binding the OF
device_node structure to the pci_dev, encoding the BDF in the upper
portion of the address.

This patch also drops the overlay support in favor of the fully
described DT while streamlining it as a result.

Links:
[1] - https://lore.kernel.org/all/aTvz_OeVnciiqATz@apocalypse/
[2] - https://lore.kernel.org/all/CAL_JsqJUzB71QdMcxJtNZ7raoPcK+SfTh7EVzGmk=syo8xLKQw@mail.gmail.com/
[3] - https://lore.kernel.org/all/CAL_JsqJUzB71QdMcxJtNZ7raoPcK+SfTh7EVzGmk=syo8xLKQw@mail.gmail.com/

Andrea della Porta (4):
  dt-bindings: misc: pci1de4,1: add required reg property for endpoint
  misc: rp1: drop overlay support
  arm64: dts: broadcom: bcm2712: fix RP1 endpoint PCI topology
  arm64: dts: broadcom: rp1: drop RP1 overlay

 .../devicetree/bindings/misc/pci1de4,1.yaml   |  8 +++-
 arch/arm64/boot/dts/broadcom/Makefile         |  4 +-
 ...-ovl-rp1.dts => bcm2712-rpi-5-b-base.dtsi} |  0
 .../boot/dts/broadcom/bcm2712-rpi-5-b.dts     | 39 ++++++++++++-------
 arch/arm64/boot/dts/broadcom/rp1-nexus.dtsi   | 14 -------
 arch/arm64/boot/dts/broadcom/rp1.dtso         | 11 ------
 drivers/misc/rp1/Kconfig                      |  6 +--
 drivers/misc/rp1/Makefile                     |  3 +-
 drivers/misc/rp1/rp1-pci.dtso                 | 25 ------------
 drivers/misc/rp1/rp1_pci.c                    | 37 ++----------------
 drivers/pci/quirks.c                          |  1 -
 11 files changed, 40 insertions(+), 108 deletions(-)
 rename arch/arm64/boot/dts/broadcom/{bcm2712-rpi-5-b-ovl-rp1.dts => bcm2712-rpi-5-b-base.dtsi} (100%)
 delete mode 100644 arch/arm64/boot/dts/broadcom/rp1-nexus.dtsi
 delete mode 100644 arch/arm64/boot/dts/broadcom/rp1.dtso
 delete mode 100644 drivers/misc/rp1/rp1-pci.dtso

-- 
2.35.3
Re: [PATCH 0/4] Fix RP1 DeviceTree hierarchy and drop overlay support
Posted by Rob Herring 1 month, 2 weeks ago
On Thu, Dec 18, 2025 at 08:09:05PM +0100, Andrea della Porta wrote:
> The current RP1 implementation is plagued by several issues, as follows:
> 
> - the node name for RP1 is too specific and should be generic instead
>   (see [1]).
> 
> - the fully defined DTS has its PCI hierarchy wrongly described. There
>   should be a PCI root port between the root complex and the endpoint
>   (see [1]).
> 
> - since CONFIG_PCI_DYNAMIC_OF_NODES can be dropped in the future
>   becoming an automatically enabled feature, it would be wise to not
>   depend on it (see [2]).
> 
> - overlay support has led to a lot of confusion. It's not really usable 
>   right now and users are not even used to it (see [3]).
> 
> This patch aims at solving the aforementioned problems by amending the
> PCI topology as follows:
> 
>   ...
>   pcie@1000120000 {
>     ...
> 
>     pci@0,0 {
>       device_type = "pci";
>       reg = <0x00 0x00 0x00 0x00 0x00>;
>       ...
> 
>       dev@0,0 {
>         compatible = "pci1de4,1";
>         reg = <0x10000 0x00 0x00 0x00 0x00>;
>         ...
> 
>         pci-ep-bus@1 {
>           compatible = "simple-bus";
>           ...
> 
>           /* peripherals child nodes */
>         }; 
>       }; 
>     }; 
>   }; 
> 
> The reg property is important since it permits the binding the OF
> device_node structure to the pci_dev, encoding the BDF in the upper
> portion of the address.
> 
> This patch also drops the overlay support in favor of the fully
> described DT while streamlining it as a result.
> 
> Links:
> [1] - https://lore.kernel.org/all/aTvz_OeVnciiqATz@apocalypse/
> [2] - https://lore.kernel.org/all/CAL_JsqJUzB71QdMcxJtNZ7raoPcK+SfTh7EVzGmk=syo8xLKQw@mail.gmail.com/
> [3] - https://lore.kernel.org/all/CAL_JsqJUzB71QdMcxJtNZ7raoPcK+SfTh7EVzGmk=syo8xLKQw@mail.gmail.com/
> 
> Andrea della Porta (4):
>   dt-bindings: misc: pci1de4,1: add required reg property for endpoint
>   misc: rp1: drop overlay support
>   arm64: dts: broadcom: bcm2712: fix RP1 endpoint PCI topology
>   arm64: dts: broadcom: rp1: drop RP1 overlay

Thanks for doing this.

Reviewed-by: Rob Herring <robh@kernel.org>
Re: [PATCH 0/4] Fix RP1 DeviceTree hierarchy and drop overlay support
Posted by Florian Fainelli 1 month, 2 weeks ago
On 12/18/25 11:09, Andrea della Porta wrote:
> The current RP1 implementation is plagued by several issues, as follows:
> 
> - the node name for RP1 is too specific and should be generic instead
>    (see [1]).
> 
> - the fully defined DTS has its PCI hierarchy wrongly described. There
>    should be a PCI root port between the root complex and the endpoint
>    (see [1]).
> 
> - since CONFIG_PCI_DYNAMIC_OF_NODES can be dropped in the future
>    becoming an automatically enabled feature, it would be wise to not
>    depend on it (see [2]).
> 
> - overlay support has led to a lot of confusion. It's not really usable
>    right now and users are not even used to it (see [3]).
> 
> This patch aims at solving the aforementioned problems by amending the
> PCI topology as follows:
> 
>    ...
>    pcie@1000120000 {
>      ...
> 
>      pci@0,0 {
>        device_type = "pci";
>        reg = <0x00 0x00 0x00 0x00 0x00>;
>        ...
> 
>        dev@0,0 {
>          compatible = "pci1de4,1";
>          reg = <0x10000 0x00 0x00 0x00 0x00>;
>          ...
> 
>          pci-ep-bus@1 {
>            compatible = "simple-bus";
>            ...
> 
>            /* peripherals child nodes */
>          };
>        };
>      };
>    };
> 
> The reg property is important since it permits the binding the OF
> device_node structure to the pci_dev, encoding the BDF in the upper
> portion of the address.
> 
> This patch also drops the overlay support in favor of the fully
> described DT while streamlining it as a result.

Timing could not have been better as I was just going to apply Rob's patch:

https://lore.kernel.org/all/20251211193854.1778221-1-robh@kernel.org

Yours is definitively more complete. Rob, Krzysztof, can you review this 
series and I will fast track it today.

Thanks!
-- 
Florian