Devicetree
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: "Manivannan Sadhasivam" <manivannan.sadhasivam@oss.qualcomm.com>
Cc: linux-pci@vger.kernel.org, devicetree@vger.kernel.org,
	robh@kernel.org, conor+dt@kernel.org
Subject: Re: [PATCH 1/2] dt-bindings: PCI: Add generic PCI Endpoint Controller
Date: Fri, 04 Dec 2026 14:14:56 +0000	[thread overview]
Message-ID: <sashiko-outbox-249943@kernel.org> (raw)
In-Reply-To: <20261204-pci-ep-generic-v1-1-30c0e44e170f@oss.qualcomm.com>

Thank you for your contribution! Sashiko AI review found 2 potential
issues to consider:
- [Medium] dt-bindings: PCI: undefined register interface for
  pci-ep-generic
- [Low] dt-bindings: PCI: pci-ep-generic schema rejects dma-coherent
  property
--

commit 5b3ab239c0325679aaf0982e6f6dac40dd23a5b2
Author: Manivannan Sadhasivam <manivannan.sadhasivam@oss.qualcomm.com>

dt-bindings: PCI: Add generic PCI Endpoint Controller

This commit adds a Devicetree binding schema for a generic PCI Endpoint
Controller configured through memory-mapped ctrl and outbound regions.

> diff --git a/Documentation/devicetree/bindings/pci/pci-ep-generic.yaml b/Documentation/devicetree/bindings/pci/pci-ep-generic.yaml
> new file mode 100644
> index 0000000000000..aa0ba619fe251
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/pci/pci-ep-generic.yaml
> @@ -0,0 +1,48 @@

[ ... ]

> +description:
> +  A PCI Endpoint Controller that is initialised by firmware or provided by an
> +  emulation, and is configured through a memory-mapped control region.
> +
> +properties:
> +  compatible:
> +    const: pci-ep-generic
> +
> +  reg:
> +    items:
> +      - description: control region
> +      - description: outbound window
> +
> +  reg-names:
> +    items:
> +      - const: ctrl
> +      - const: outbound

[Severity: Medium]
Can firmware, emulators, and OS drivers agree on the programming interface
for pci-ep-generic without a documented or standardized ctrl register layout?

Unlike pci-host-cam-generic and pci-host-ecam-generic in
host-generic-pci.yaml, which rely on PCI-SIG standardized CAM and ECAM
layouts, PCI-SIG defines no standard MMIO register interface for PCI
Endpoint Controllers.

Even when firmware initializes clocks, regulators, and PHYs, existing
endpoint controller IPs have mutually incompatible ctrl register layouts.
A single vendorless compatible therefore conflates incompatible hardware
with a custom emulated device.

Consider documenting or referencing the ctrl MMIO register specification
(using a vendor-prefixed compatible if this targets a QEMU virtual device)
or using IP-specific compatibles for firmware-initialized hardware.

[ ... ]

> +allOf:
> +  - $ref: pci-ep.yaml#
> +
> +unevaluatedProperties: false

[Severity: Low]
Should this schema allow dma-coherent?

Neither pci-ep-generic.yaml nor pci-ep.yaml declares dma-coherent, so
unevaluatedProperties: false causes dtbs_check to reject any cache-coherent
pci-ep-generic node.

Endpoint function drivers allocate BAR memory via dma_alloc_coherent() in
pci_epf_alloc_space(), so coherent controllers need dma-coherent on
platforms where DMA is not coherent by default.  Adding dma-coherent: true
here (or in pci-ep.yaml) would match host-generic-pci.yaml.

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20261204-pci-ep-generic-v1-0-30c0e44e170f@oss.qualcomm.com?part=1

  reply	other threads:[~2026-12-04 14:14 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-12-04 14:00 [PATCH 0/2] PCI: endpoint: Add a generic PCI Endpoint Controller driver Manivannan Sadhasivam via B4 Relay
2026-12-04 14:00 ` [PATCH 1/2] dt-bindings: PCI: Add generic PCI Endpoint Controller Manivannan Sadhasivam via B4 Relay
2026-12-04 14:14   ` sashiko-bot [this message]
2026-12-04 14:00 ` [PATCH 2/2] PCI: endpoint: Add generic PCI Endpoint Controller driver Manivannan Sadhasivam via B4 Relay
2026-12-04 14:43   ` sashiko-bot

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=sashiko-outbox-249943@kernel.org \
    --to=sashiko-bot@kernel.org \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=linux-pci@vger.kernel.org \
    --cc=manivannan.sadhasivam@oss.qualcomm.com \
    --cc=robh@kernel.org \
    --cc=sashiko-reviews@lists.linux.dev \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox