[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAL_JsqJ7Of-0H+qW-ts7cVkeK0+4BR5mxocx00eVFKHaLfj45Q@mail.gmail.com>
Date: Sat, 21 Sep 2024 09:43:17 -0500
From: Rob Herring <robh@...nel.org>
To: Frank Li <Frank.Li@....com>
Cc: Lorenzo Pieralisi <lpieralisi@...nel.org>, Krzysztof Wilczyński <kw@...ux.com>,
Manivannan Sadhasivam <manivannan.sadhasivam@...aro.org>, Bjorn Helgaas <bhelgaas@...gle.com>,
Krzysztof Kozlowski <krzk+dt@...nel.org>, Conor Dooley <conor+dt@...nel.org>, Abraham I <kishon@...nel.org>,
Saravana Kannan <saravanak@...gle.com>, Jingoo Han <jingoohan1@...il.com>,
Gustavo Pimentel <gustavo.pimentel@...opsys.com>, Jesper Nilsson <jesper.nilsson@...s.com>,
Richard Zhu <hongxing.zhu@....com>, Lucas Stach <l.stach@...gutronix.de>,
Shawn Guo <shawnguo@...nel.org>, Sascha Hauer <s.hauer@...gutronix.de>,
Pengutronix Kernel Team <kernel@...gutronix.de>, Fabio Estevam <festevam@...il.com>, linux-pci@...r.kernel.org,
devicetree@...r.kernel.org, linux-kernel@...r.kernel.org,
linux-arm-kernel@...s.com, linux-arm-kernel@...ts.infradead.org,
imx@...ts.linux.dev, Krzysztof Wilczyński <kwilczynski@...nel.org>
Subject: Re: [PATCH 0/9] PCI-EP: Add 'ranges' support for PCI endpoint devices
On Thu, Sep 19, 2024 at 5:03 PM Frank Li <Frank.Li@....com> wrote:
>
> The PCI bus device tree supports 'ranges' properties that indicate
> how to convert PCI addresses to CPU addresses. Many PCI controllers
> are dual-role controllers, supporting both Root Complex (RC) and
> Endpoint (EP) modes. The EP side also needs similar information for
> proper address translation.
>
> This commit introduces several changes to add 'ranges' support for
> PCI endpoint devices:
>
> 1. **Modify of_address.c**: Add support for the new `device_type`
> "pci-ep", enabling it to parse 'ranges' using the same functions
> as for PCI devices.
>
> 2. **Update DesignWare PCIe EP driver**: Enhance the driver to
> support 'ranges' when 'addr_space' is missing, maintaining
> compatibility with existing drivers.
>
> 3. **Update binding documentation**: Modify the device tree bindings
> to include 'ranges' support and make 'addr_space' an optional
> entry in 'reg-names'.
>
> 4. **Add i.MX8QXP EP support**: Incorporate support for the
> i.MX8QXP PCIe EP in the driver.
>
> i.MX8QXP PCIe dts is upstreaming. Below is pcie-ep part.
>
> pcieb_ep: pcie-ep@...10000 {
> compatible = "fsl,imx8q-pcie-ep";
> reg = <0x5f010000 0x00010000>;
> reg-names = "dbi";
> #address-cells = <3>;
> #size-cells = <2>;
> device_type = "pci-ep";
> ranges = <0x82000000 0 0x80000000 0x70000000 0 0x10000000>;
How does a PCI endpoint set PCI addresses? Those get assigned by the
PCI host system. They can't be static in DT.
If you need the PCI address, just read your BAR registers.
In general, why do you need this when none of the other PCI endpoint
drivers have needed this?
Rob
Powered by blists - more mailing lists