From: Herve Codina <herve.codina@bootlin.com>
To: "Arnd Bergmann" <arnd@arndb.de>
Cc: "Geert Uytterhoeven" <geert@linux-m68k.org>,
"Andy Shevchenko" <andy.shevchenko@gmail.com>,
"Simon Horman" <horms@kernel.org>, "Lee Jones" <lee@kernel.org>,
"derek.kiernan@amd.com" <derek.kiernan@amd.com>,
"dragan.cvetic@amd.com" <dragan.cvetic@amd.com>,
"Greg Kroah-Hartman" <gregkh@linuxfoundation.org>,
"Bjorn Helgaas" <bhelgaas@google.com>,
"Philipp Zabel" <p.zabel@pengutronix.de>,
"Lars Povlsen" <lars.povlsen@microchip.com>,
"Steen Hegelund" <Steen.Hegelund@microchip.com>,
"Daniel Machon" <daniel.machon@microchip.com>,
UNGLinuxDriver@microchip.com, "Rob Herring" <robh@kernel.org>,
"Krzysztof Kozlowski" <krzk+dt@kernel.org>,
"Conor Dooley" <conor+dt@kernel.org>,
"Saravana Kannan" <saravanak@google.com>,
"David S . Miller" <davem@davemloft.net>,
"Eric Dumazet" <edumazet@google.com>,
"Jakub Kicinski" <kuba@kernel.org>,
"Paolo Abeni" <pabeni@redhat.com>,
"Horatiu Vultur" <horatiu.vultur@microchip.com>,
"Andrew Lunn" <andrew@lunn.ch>,
devicetree@vger.kernel.org, linux-kernel@vger.kernel.org,
Netdev <netdev@vger.kernel.org>,
linux-pci@vger.kernel.org, linux-arm-kernel@lists.infradead.org,
"Allan Nielsen" <allan.nielsen@microchip.com>,
"Luca Ceresoli" <luca.ceresoli@bootlin.com>,
"Thomas Petazzoni" <thomas.petazzoni@bootlin.com>
Subject: Re: [PATCH v6 3/7] misc: Add support for LAN966x PCI device
Date: Wed, 2 Oct 2024 18:02:07 +0200 [thread overview]
Message-ID: <20241002180207.550e4cbb@bootlin.com> (raw)
In-Reply-To: <3e21a3ba-623e-4b75-959b-3cdf906ee1bd@app.fastmail.com>
On Wed, 02 Oct 2024 14:31:13 +0000
"Arnd Bergmann" <arnd@arndb.de> wrote:
> On Wed, Oct 2, 2024, at 12:41, Herve Codina wrote:
> > On Wed, 02 Oct 2024 11:08:15 +0000
> > "Arnd Bergmann" <arnd@arndb.de> wrote:
> >> On Mon, Sep 30, 2024, at 12:15, Herve Codina wrote:
> >>
> >> > + pci-ep-bus@0 {
> >> > + compatible = "simple-bus";
> >> > + #address-cells = <1>;
> >> > + #size-cells = <1>;
> >> > +
> >> > + /*
> >> > + * map @0xe2000000 (32MB) to BAR0 (CPU)
> >> > + * map @0xe0000000 (16MB) to BAR1 (AMBA)
> >> > + */
> >> > + ranges = <0xe2000000 0x00 0x00 0x00 0x2000000
> >> > + 0xe0000000 0x01 0x00 0x00 0x1000000>;
> >>
> >> I was wondering about how this fits into the PCI DT
> >> binding, is this a child of the PCI device, or does the
> >> "pci-ep-bus" refer to the PCI device itself?
> >
> > This is a child of the PCI device.
> > The overlay is applied at the PCI device node and so, the pci-ep-bus is
> > a child of the PCI device node.
>
> Ok
>
> > /*
> > * Ranges items allow to reference BAR0,
> > * BAR1, ... from children nodes.
> > * The property is created by the PCI core
> > * during the PCI bus scan.
> > */
> > ranges = <0x00 0x00 0x00 0x82010000 0x00 0xe8000000 0x00 0x2000000
> > 0x01 0x00 0x00 0x82010000 0x00 0xea000000 0x00 0x1000000
> > 0x02 0x00 0x00 0x82010000 0x00 0xeb000000 0x00 0x800000
>
> >
> > Hope this full picture helped to understand the address translations
> > involved.
>
> Right, that makes a lot of sense now, I wasn't aware of those
> range properties getting set. Now I have a new question though:
>
> Is this designed to work both on hosts using devicetree and on
> those not using it? If this is used on devicetree on a board
> that has a hardwired lan966x, we may want to include the
> overlay contents in the board dts file itself in order to
> describe any possible connections between the lan966x chip
> and other onboard components such as additional GPIOs or
> ethernet PHY chips, right?
>
> Arnd
On host with the base hardware described without device-tree (ACPI on
x86 for instance), I have a couple of patches not yet sent upstream.
With those patches, I have a the LAN966x PCI board working on x86.
I plan to send them as soon as this series is applied.
Rob said that before looking at ACPI, we need to have a working system
on DT based systems.
https://lore.kernel.org/all/CAL_JsqKNC1Qv+fucobnzoXmxUYNockWR=BbGhds2tNAYZWqgOA@mail.gmail.com/
If hardwired on a board, the same LAN966x PCI driver could be used.
A possible improvement of the driver could be to request the overlay
from the user-space using request_firmware().
With that, the overlay can be extended with specific onboard parts the
LAN966x PCI device is connected to.
This improvement can be done later when the use case appears.
Best regards,
Hervé
next prev parent reply other threads:[~2024-10-02 16:02 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-09-30 12:15 [PATCH v6 0/7] Add support for the LAN966x PCI device using a DT overlay Herve Codina
2024-09-30 12:15 ` [PATCH v6 1/7] dt-bindings: reset: microchip,rst: Allow to replace cpu-syscon by an additional reg item Herve Codina
2024-10-01 6:43 ` Krzysztof Kozlowski
2024-10-01 16:06 ` Herve Codina
2024-09-30 12:15 ` [PATCH v6 2/7] reset: mchp: sparx5: Use the second reg item when cpu-syscon is not present Herve Codina
2024-09-30 13:03 ` Steen Hegelund
2024-09-30 13:23 ` Geert Uytterhoeven
2024-09-30 13:57 ` Arnd Bergmann
2024-09-30 14:26 ` Herve Codina
2024-10-01 16:30 ` Herve Codina
2024-10-02 9:29 ` Arnd Bergmann
2024-10-02 10:19 ` Herve Codina
2024-10-02 10:58 ` Arnd Bergmann
2024-09-30 12:15 ` [PATCH v6 3/7] misc: Add support for LAN966x PCI device Herve Codina
2024-10-02 11:08 ` Arnd Bergmann
2024-10-02 12:41 ` Herve Codina
2024-10-02 14:31 ` Arnd Bergmann
2024-10-02 16:02 ` Herve Codina [this message]
2024-09-30 12:15 ` [PATCH v6 4/7] MAINTAINERS: Add the Microchip LAN966x PCI driver entry Herve Codina
2024-09-30 12:15 ` [PATCH v6 5/7] reset: mchp: sparx5: Add MCHP_LAN966X_PCI dependency Herve Codina
2024-09-30 12:15 ` [PATCH v6 6/7] reset: mchp: sparx5: Allow building as a module Herve Codina
2024-09-30 12:15 ` [PATCH v6 7/7] reset: mchp: sparx5: set the dev member of the reset controller Herve Codina
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=20241002180207.550e4cbb@bootlin.com \
--to=herve.codina@bootlin.com \
--cc=Steen.Hegelund@microchip.com \
--cc=UNGLinuxDriver@microchip.com \
--cc=allan.nielsen@microchip.com \
--cc=andrew@lunn.ch \
--cc=andy.shevchenko@gmail.com \
--cc=arnd@arndb.de \
--cc=bhelgaas@google.com \
--cc=conor+dt@kernel.org \
--cc=daniel.machon@microchip.com \
--cc=davem@davemloft.net \
--cc=derek.kiernan@amd.com \
--cc=devicetree@vger.kernel.org \
--cc=dragan.cvetic@amd.com \
--cc=edumazet@google.com \
--cc=geert@linux-m68k.org \
--cc=gregkh@linuxfoundation.org \
--cc=horatiu.vultur@microchip.com \
--cc=horms@kernel.org \
--cc=krzk+dt@kernel.org \
--cc=kuba@kernel.org \
--cc=lars.povlsen@microchip.com \
--cc=lee@kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pci@vger.kernel.org \
--cc=luca.ceresoli@bootlin.com \
--cc=netdev@vger.kernel.org \
--cc=p.zabel@pengutronix.de \
--cc=pabeni@redhat.com \
--cc=robh@kernel.org \
--cc=saravanak@google.com \
--cc=thomas.petazzoni@bootlin.com \
/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;
as well as URLs for NNTP newsgroup(s).