[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20230616104401.5ca2b4de@xps-13>
Date: Fri, 16 Jun 2023 10:44:01 +0200
From: Miquel Raynal <miquel.raynal@...tlin.com>
To: Krzysztof Kozlowski <krzysztof.kozlowski@...aro.org>
Cc: Chris Packham <Chris.Packham@...iedtelesis.co.nz>,
"richard@....at" <richard@....at>,
"vigneshr@...com" <vigneshr@...com>,
"robh+dt@...nel.org" <robh+dt@...nel.org>,
"krzysztof.kozlowski+dt@...aro.org"
<krzysztof.kozlowski+dt@...aro.org>,
"andrew@...n.ch" <andrew@...n.ch>,
"gregory.clement@...tlin.com" <gregory.clement@...tlin.com>,
"sebastian.hesselbarth@...il.com" <sebastian.hesselbarth@...il.com>,
"linux-mtd@...ts.infradead.org" <linux-mtd@...ts.infradead.org>,
"devicetree@...r.kernel.org" <devicetree@...r.kernel.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
"linux-arm-kernel@...ts.infradead.org"
<linux-arm-kernel@...ts.infradead.org>,
Vadym Kochan <vadym.kochan@...ision.eu>
Subject: Re: [PATCH v9 3/3] dt-bindings: mtd: marvell-nand: Convert to YAML
DT scheme
Hi Krzysztof,
krzysztof.kozlowski@...aro.org wrote on Fri, 16 Jun 2023 10:38:38 +0200:
> On 16/06/2023 10:24, Miquel Raynal wrote:
> > Hi Krzysztof,
> >
> > krzysztof.kozlowski@...aro.org wrote on Fri, 16 Jun 2023 10:15:31 +0200:
> >
> >> On 15/06/2023 23:06, Chris Packham wrote:
> >>>>
> >>>>> +
> >>>>> +properties:
> >>>>> + compatible:
> >>>>> + oneOf:
> >>>>> + - items:
> >>>>> + - const: marvell,armada-8k-nand-controller
> >>>>> + - const: marvell,armada370-nand-controller
> >>>>> + - enum:
> >>>>> + - marvell,armada-8k-nand-controller
> >>>> This is wrong. 8k cannot be both: compatible and not compatible with
> >>>> 370. It's not someone's cat to be in both states at the same time...
> >>>
> >>> The correct state (IMHO, Miquel correct me if I'm wrong) is `compatible
> >>> = "marvell,armada-8k-nand-controller";` as there are some 8K specific
> >>> requirements that aren't present on the 370 (specifically the
> >>> system-controller and the 2nd clock).
> >>
> >> Presence of specific requirements does not invalidate compatibility. Two
> >> devices are compatible if the 8k can bind and work with 370 compatible
> >> string, even if this means some lower performance or less features (e.g.
> >> subset of features).
> >
> > Quoting myself from 2019 (comment in the driver):
> > "Some SoCs like A7k/A8k need to enable manually the NAND controller,
> > gated clocks and reset bits to avoid being bootloader dependent."
> >
> > So can the 8k controller work using a 370 compatible : yes, if the
> > booloader enabled the NAND controller already, no otherwise. But in
> > practice it is the same controller.
> >
> > Given this information I don't know whether it makes sense to qualify
> > the 8k controller compatible with the 370 compatible or not.
>
> Indeed, a bit tricky decision. For me they could stay compatible,
> because apparently programming model is the same or similar.
Agreed, the programming model wrt the controller itself is the same. So
we will expect 8k controllers to be described with both 8k and 370
compatible strings then.
Thanks for your feedback.
Cheers,
Miquèl
Powered by blists - more mailing lists