[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <3e21a3ba-623e-4b75-959b-3cdf906ee1bd@app.fastmail.com>
Date: Wed, 02 Oct 2024 14:31:13 +0000
From: "Arnd Bergmann" <arnd@...db.de>
To: "Herve Codina" <herve.codina@...tlin.com>
Cc: "Geert Uytterhoeven" <geert@...ux-m68k.org>,
"Andy Shevchenko" <andy.shevchenko@...il.com>,
"Simon Horman" <horms@...nel.org>, "Lee Jones" <lee@...nel.org>,
"derek.kiernan@....com" <derek.kiernan@....com>,
"dragan.cvetic@....com" <dragan.cvetic@....com>,
"Greg Kroah-Hartman" <gregkh@...uxfoundation.org>,
"Bjorn Helgaas" <bhelgaas@...gle.com>,
"Philipp Zabel" <p.zabel@...gutronix.de>,
"Lars Povlsen" <lars.povlsen@...rochip.com>,
"Steen Hegelund" <Steen.Hegelund@...rochip.com>,
"Daniel Machon" <daniel.machon@...rochip.com>,
UNGLinuxDriver@...rochip.com, "Rob Herring" <robh@...nel.org>,
"Krzysztof Kozlowski" <krzk+dt@...nel.org>,
"Conor Dooley" <conor+dt@...nel.org>,
"Saravana Kannan" <saravanak@...gle.com>,
"David S . Miller" <davem@...emloft.net>,
"Eric Dumazet" <edumazet@...gle.com>, "Jakub Kicinski" <kuba@...nel.org>,
"Paolo Abeni" <pabeni@...hat.com>,
"Horatiu Vultur" <horatiu.vultur@...rochip.com>,
"Andrew Lunn" <andrew@...n.ch>, devicetree@...r.kernel.org,
linux-kernel@...r.kernel.org, Netdev <netdev@...r.kernel.org>,
linux-pci@...r.kernel.org, linux-arm-kernel@...ts.infradead.org,
"Allan Nielsen" <allan.nielsen@...rochip.com>,
"Luca Ceresoli" <luca.ceresoli@...tlin.com>,
"Thomas Petazzoni" <thomas.petazzoni@...tlin.com>
Subject: Re: [PATCH v6 3/7] misc: Add support for LAN966x PCI device
On Wed, Oct 2, 2024, at 12:41, Herve Codina wrote:
> On Wed, 02 Oct 2024 11:08:15 +0000
> "Arnd Bergmann" <arnd@...db.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
Powered by blists - more mailing lists