mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Alex Elder <elder@riscstar.com>
To: Krzysztof Kozlowski <krzk@kernel.org>
Cc: robh@kernel.org, krzk+dt@kernel.org, conor+dt@kernel.org,
	arnd@arndb.de, gregkh@linuxfoundation.org, bhelgaas@google.com,
	daniel@riscstar.com, mohdayaa@qti.qualcomm.com,
	lbiancon@qti.qualcomm.com, devicetree@vger.kernel.org,
	linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 1/2] dt-bindings: misc: introduce pci1179,0220.yaml
Date: Thu, 20 Aug 2026 12:18:49 -0500	[thread overview]
Message-ID: <dc48b8cd-1bec-43d1-bc33-0a71bd2b6c4e@riscstar.com> (raw)
In-Reply-To: <55991af4-c613-4cde-a121-30f2ff9c8347@kernel.org>

On 8/17/26 1:18 AM, Krzysztof Kozlowski wrote:
> On 14/08/2026 18:55, Alex Elder wrote:
>> On 8/14/26 2:01 AM, Krzysztof Kozlowski wrote:
>>> On Thu, Aug 13, 2026 at 05:29:41PM -0500, Alex Elder wrote:
>>>> Define the binding for the Toshiba TC9564 PCI endpoint function device.
>>>> The third downstream PCIe switch port within this chip has an embedded
>>>> PCIe controller, and that implements two of these PCIe functions.
>>>>
>>>> Signed-off-by: Daniel Thompson <daniel@riscstar.com>
>>>> Signed-off-by: Alex Elder <elder@riscstar.com>
>>>> ---
>>>>    .../bindings/misc/pci1179,0220.yaml           | 150 ++++++++++++++++++
>>>>    MAINTAINERS                                   |   6 +
>>>>    2 files changed, 156 insertions(+)
>>>>    create mode 100644 Documentation/devicetree/bindings/misc/pci1179,0220.yaml
>>>>
>>>
>>> There are no properties in the binding except standard PCIe ones, so why
>>> do you need it in DT in the first place? We do not describe PCI devices
>>> in DT by default, so you are doing something unusual. Commit msg should
>>> explain that.
>>
>> Maybe because it's using pci-ep-bus?  I'm not sure I can answer your
>> question though.
> 
> What is pcie-ep bus? If a device is a PCI device (so not the host
> bridge), we do not need to define it in DT except a few cases and this
> does not look like one.

It's a weird case because PCI has its own enumeration method,
so there should no need to involve devicetree.

Nevertheless the pci-ep-bus model *is* a devicetree thing
related to PCI, describing devices accessible via PCI BARs.
   Documentation/devicetree/bindings/pci/pci-ep-bus.yaml

It is used for the LAN966x SoC, however that driver loads
the devicetree content dynamically using an overlay, and
its overlay source is found under drivers/misc:
   drivers/misc/lan966x_pci.c
   drivers/misc/lan966x_pci.dtso

This use of the LAN966x has no devicetree binding.

The Raspberry Pi RP1 also uses pci-ep-bus.  It, however
does have a binding:
   Documentation/devicetree/bindings/misc/pci1de4,1.yaml
>> An earlier version used auxiliary devices.  This time the PCI device
>> sort of stands by itself as provider of the endpoint buses that are
>> used by other devices within the SoC.  There is otherwise no single
>> driver (e.g., for an Ethernet interface) that is implemented as a
>> PCI driver to bind with the hardware.  The SoC drivers will all be
>> platform drivers.
> 
> All this is driver explanation, so does not really answer my questions.
> Whether something is using platform bus or auxiliary devices it
> absolutely does not matter for the DT. It cannot even matter for DT.

I understand what you're saying, and I do agree with you.

Still, this is a strange case where the devicetree language
is used to describe devices and properties that are not
discoverable, using this pci-ep-bus devicetree *technique*.

The core PCI functionality gets discovered in the usual PCI
way (enumeration).  But this allows additional hardware to
be described.


I think that if the devicetree language is used to describe
hardware, having a binding to explain what's valid for that
hardware description makes sense.


As I understand it, for the LAN966x, the original use of the
SoC used an internal processor to run Linux.  So platform
drivers for the devices within the SoC were created that
matched with compatible strings, etc.

Then in another mode, LAN966x is used as a PCI add-in card,
and the pci-ep-bus allowed all of those other drivers to be
used, unmodified.


So anyway, pci-ep-bus is an odd situation.

If the answer is "don't create a binding for this stuff,
even if it gets defined in the devicetree file" then
I'll accept that.

But my instinct is that it's good to use a binding to
describe what the DTS describing the hardware should look
like (despite it being accessed using what amounts to a
logical bus).

					-Alex

> 
> Best regards,
> Krzysztof


  reply	other threads:[~2026-08-20 17:18 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-08-13 22:29 [PATCH 0/2] PCI: introduce TC9564 misc driver Alex Elder
2026-08-13 22:29 ` [PATCH 1/2] dt-bindings: misc: introduce pci1179,0220.yaml Alex Elder
2026-08-14  7:01   ` Krzysztof Kozlowski
2026-08-14 16:55     ` Alex Elder
2026-08-17  6:18       ` Krzysztof Kozlowski
2026-08-20 17:18         ` Alex Elder [this message]
2026-08-15 20:46   ` Rob Herring (Arm)
2026-08-20 17:18     ` Alex Elder
2026-08-17  2:43   ` Rob Herring
2026-08-20 17:22     ` Alex Elder
2026-08-13 22:29 ` [PATCH 2/2] misc: tc9564: introduce base PCI driver Alex Elder
2026-08-14  1:11   ` Greg KH
2026-08-14  7:31     ` Arnd Bergmann
2026-08-14 16:55       ` Alex Elder
2026-08-14 16:55     ` Alex Elder
2026-08-14  7:03   ` Krzysztof Kozlowski
2026-08-14 16:55     ` Alex Elder
2026-08-17  6:15       ` Krzysztof Kozlowski

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=dc48b8cd-1bec-43d1-bc33-0a71bd2b6c4e@riscstar.com \
    --to=elder@riscstar.com \
    --cc=arnd@arndb.de \
    --cc=bhelgaas@google.com \
    --cc=conor+dt@kernel.org \
    --cc=daniel@riscstar.com \
    --cc=devicetree@vger.kernel.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=krzk+dt@kernel.org \
    --cc=krzk@kernel.org \
    --cc=lbiancon@qti.qualcomm.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pci@vger.kernel.org \
    --cc=mohdayaa@qti.qualcomm.com \
    --cc=robh@kernel.org \
    /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

all inboxes | Powered by JetHome®