Re: [PATCH v7 1/2] dt-bindings: PCI: amd-mdb: Add CPM6 support

From: Rob Herring

Date: Tue Oct 06 2026 - 11:11:50 EST


On Tue, Oct 06, 2026 at 10:01:31AM +0000, Musham, Sai Krishna wrote:
> AMD General
>
> Hi Rob,
>
> > -----Original Message-----
> > From: Rob Herring <robh@xxxxxxxxxx>
> > Sent: Friday, September 18, 2026 12:55 AM
> > To: Musham, Sai Krishna <sai.krishna.musham@xxxxxxx>
> > Cc: bhelgaas@xxxxxxxxxx; lpieralisi@xxxxxxxxxx; kw@xxxxxxxxx;
> > mani@xxxxxxxxxx; krzk+dt@xxxxxxxxxx; conor+dt@xxxxxxxxxx;
> > cassel@xxxxxxxxxx; linux-pci@xxxxxxxxxxxxxxx; devicetree@xxxxxxxxxxxxxxx;
> > linux-kernel@xxxxxxxxxxxxxxx; Simek, Michal <michal.simek@xxxxxxx>;
> > Gogada, Bharat Kumar <bharat.kumar.gogada@xxxxxxx>; Havalige,
> > Thippeswamy <thippeswamy.havalige@xxxxxxx>; Sanwal, Pranav
> > <Pranav.sanwal@xxxxxxx>
> > Subject: Re: [PATCH v7 1/2] dt-bindings: PCI: amd-mdb: Add CPM6 support
> >
> > On Sun, Aug 23, 2026 at 09:37:14AM +0530, Sai Krishna Musham wrote:
> > > The AMD CPM6 PCIe controller is based on the Synopsys DesignWare PCIe
> > > IP and integrates two PCIe host controller instances. Add the
> > > "amd,versal2-cpm6-host" and "amd,versal2-cpm6-host1" compatible strings
> > > to describe the HOST0 and HOST1 controller instances.
> >
> > That is clear from the diff. What's not clear in this patch, and I
> > probably already asked, what is the difference between host0 and host1?
> > Usually instances are not different compatibles...
> >
>
> Thanks for reviewing, there is no functional difference between HOST0 and
> HOST1. They are two instances of the same CPM6 PCIe controller and support
> the same feature set.
>
> The underlying hardware and driver behavior are identical between the
> two instances. The only differences are instance-specific resources,
> such as register regions and controller-specific interrupt status bits.

The only difference I see in the driver is:

+/* MERGED input bits for the MISC_EVENT sources this driver handles. */
+#define AMD_CPM6_MERGED_MISC_EVENT_HOST0 14
+#define AMD_CPM6_MERGED_MISC_EVENT_HOST1 17

If that is the only difference, I would make this a property instead.

But there's another problem here:

+ /*
+ * CPM6 moves the per-controller MISC_EVENT registers
+ * into a separate "intr" region. The SLCR block, which holds
+ * the shared MERGED/PS_MISC aggregators, is shared by both CPM6
+ * host controllers, so map it without requesting exclusive
+ * ownership; otherwise the second controller fails to probe.
+ */

This implies the 'slcr' region is the same address for both controllers?
That's a problem because the DT should not contain the same address in
multiple nodes. There should be a single 'slcr' node.

> I understand your point that instances are typically not represented by
> different compatible strings. Given that the driver needs to distinguish
> between the two controller instances for these instance-specific
> resources, could you please suggest the preferred DT representation for
> this case?

The answer depends on what the variation is, so the patch needs to
explain that.

Rob