[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <Ztc2DadAnxLIYFj-@apocalypse>
Date: Tue, 3 Sep 2024 18:15:09 +0200
From: Andrea della Porta <andrea.porta@...e.com>
To: Rob Herring <robh@...nel.org>
Cc: Andrea della Porta <andrea.porta@...e.com>,
Michael Turquette <mturquette@...libre.com>,
Stephen Boyd <sboyd@...nel.org>,
Krzysztof Kozlowski <krzk+dt@...nel.org>,
Conor Dooley <conor+dt@...nel.org>,
Florian Fainelli <florian.fainelli@...adcom.com>,
Broadcom internal kernel review list <bcm-kernel-feedback-list@...adcom.com>,
Linus Walleij <linus.walleij@...aro.org>,
Catalin Marinas <catalin.marinas@....com>,
Will Deacon <will@...nel.org>,
Derek Kiernan <derek.kiernan@....com>,
Dragan Cvetic <dragan.cvetic@....com>,
Arnd Bergmann <arnd@...db.de>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
Nicolas Ferre <nicolas.ferre@...rochip.com>,
Claudiu Beznea <claudiu.beznea@...on.dev>,
"David S. Miller" <davem@...emloft.net>,
Eric Dumazet <edumazet@...gle.com>,
Jakub Kicinski <kuba@...nel.org>, Paolo Abeni <pabeni@...hat.com>,
Saravana Kannan <saravanak@...gle.com>,
Bjorn Helgaas <bhelgaas@...gle.com>, linux-clk@...r.kernel.org,
devicetree@...r.kernel.org, linux-rpi-kernel@...ts.infradead.org,
linux-arm-kernel@...ts.infradead.org, linux-kernel@...r.kernel.org,
linux-gpio@...r.kernel.org, netdev@...r.kernel.org,
linux-pci@...r.kernel.org, linux-arch@...r.kernel.org,
Lee Jones <lee@...nel.org>, Andrew Lunn <andrew@...n.ch>,
Stefan Wahren <wahrenst@....net>,
Herve Codina <herve.codina@...tlin.com>,
Luca Ceresoli <luca.ceresoli@...tlin.com>,
Thomas Petazzoni <thomas.petazzoni@...tlin.com>
Subject: Re: [PATCH 04/11] of: address: Preserve the flags portion on 1:1
dma-ranges mapping
Hi Rob,
On 14:37 Fri 30 Aug , Rob Herring wrote:
> On Thu, Aug 29, 2024 at 11:26 AM Andrea della Porta
> <andrea.porta@...e.com> wrote:
> >
> > Hi Rob,
> >
...
>
> I think simple-bus where you have it is fine. It is really 1 level up
> that needs to be specified. Basically something that's referenced from
> the specific PCI device's schema (e.g. the RP1 schema (which you are
> missing)).
>
> That schema needs to roughly look like this:
>
> properties:
> "#address-cells":
> const: 3
> "#size-cells":
> const: 2
> ranges:
> minItems: 1
> maxItems: 6
> items:
> additionalItems: true
> items:
> - maximum: 5 # The BAR number
> - const: 0
> - const: 0
> - # TODO: valid PCI memory flags
>
> patternProperties:
> "^bar-bus@[0-5]$":
> type: object
> additionalProperties: true
> properties:
> compatible:
> const: simple-bus
> ranges: true
>
Hmmm.. not sure how this is going to work. The PCI device (RP1) will
havei, at runtime, a compatible like this:
compatible = "pci1de4,1\0pciclass,0200000\0pciclass,0200";
that is basically generated automatically by the OF framework. So, in the
schema you proposed above, I can put something like:
properties:
compatible:
contains:
pattern: '^pci1de4,1'
or maybe I could omit the compatible entirely, like in:
https://github.com/devicetree-org/dt-schema/blob/main/dtschema/schemas/pci/pci-iommu.yaml
that seems to refer to generic compatible values.
In both cases though, I don't see how these binding could work with
make dt_binding_check, since there's no compatible known at compile
time (for the first approach), or no compatible at all (the second
approach).
Is it intended only as a loose documentation?
Or are you proposing that for a future new bus (hence with a new, specific,
compatible) that could be described by the schema above?
Many thanks,
Andrea
> There were some discussions around interrupt handling that might also
> factor into this.
>
> Rob
Powered by blists - more mailing lists