From: Roger Quadros <rogerq@kernel.org>
To: Rob Herring <robh+dt@kernel.org>
Cc: Miquel Raynal <miquel.raynal@bootlin.com>,
Grygorii Strashko <grygorii.strashko@ti.com>,
tony@atomide.com, nm@ti.com, lokeshvutla@ti.com, nsekhar@ti.com,
krzysztof.kozlowski@canonical.com, devicetree@vger.kernel.org,
linux-mtd@lists.infradead.org, linux-omap@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH v3 5/8] dt-bindings: mtd: ti,gpmc-nand: Convert to yaml
Date: Wed, 8 Sep 2021 09:55:36 +0300 [thread overview]
Message-ID: <1afc71e6-5104-2ce1-f176-97f4583507ef@kernel.org> (raw)
In-Reply-To: <CAL_JsqJPnUawYafrk4XmeVBETf-Lr+MZn+j_0nGfJTpvfzbkRA@mail.gmail.com>
On 08/09/2021 01:24, Rob Herring wrote:
> On Tue, Sep 7, 2021 at 11:57 AM Roger Quadros <rogerq@kernel.org> wrote:
>>
>> Hi Miquel,
>>
>> On 07/09/2021 19:35, Miquel Raynal wrote:
>>> Hi Grygorii,
>>>
>>>>>
>>>>>> +
>>>>>> + nand-bus-width:
>>>>>> + description:
>>>>>> + Bus width to the NAND chip
>>>>>> + $ref: /schemas/types.yaml#/definitions/uint32
>>>>>> + enum: [8, 16]
>>>>>> + default: 8
>>>>>
>>>>> This is part of nand-controller.yaml binding and should not be there.
>>>>>
>>>>>> +
>>>>>> +allOf:
>>>>>> + - $ref: "../memory-controllers/ti,gpmc-child.yaml"
>>>>>
>>>>> Maybe you need to reference the nand controller bindings as well
>>>>>
>>>>
>>>> This will not work out of the box :( as nand-controller.yaml defines both
>>>> nand controller and nand memory. It potentially might work if it will be possible to split
>>>> nand memory definition (or nand memory properties) out of and-controller.yaml, similarly to
>>>> ti,gpmc-child.yaml from this series.
>>>
>>> What you think would be the issue?
>>
>> The issue is that dt_binding checks will fail if I reference nand-controller.yaml
>> as we currently represent the controller as follows
>>
>> memory-controller { /* GPMC controller */
>> memory-controller-props;
>> nand-chip {
>> /* @chip select 0 */
>> nand-controller-props;
>> memory-controller-timing-props;
>> chip-props;
>> }
>> nand-chip {
>> /* @chip select 1 */
>> nand-controller-props;
>> memory-controller-timing-props;
>> chip-props;
>> }
>> nor-chip {
>> /* @chip select 2 */
>> memory-controller-timing-props;
>> chip-props;
>> }
>> }
>>
>> The NAND controller IO registers are at different addresses for different
>> chip select regions. Also, this is one way we can specify GPMC settings/timings
>> for different chip selects.
>>
>>>
>>> I am not opposed to split nand-controller.yaml into
>>> nand-controller.yaml and nand-chip.yaml if it simplifies the
>>> description of controllers but I don't get why it would be needed. In
>>> particular since we expect all drivers to support the
>>>
>>> nand-controller {
>>> controller-props;
>>> nand-chip {
>>> chip-props;
>>> }
>>> }
>>
>> Changing to this format will cause a lot of churn in DT files, which I'm not sure
>> if it gives enough benefit.
>> TI platforms will never have 2 NAND chips in the same chip select region.
>
> Probably best to just leave this alone. Unless this is getting used in
> new chips? If so, I'd say it's a separate change.
>
>>> organization which has been enforced since at least 2018. Having a
>>> controller vs. chip representation is fundamentally right. But here I
>>> see how "legacy" are these bindings with so much unneeded specific "ti,"
>>> properties... On one side it would be good to verify that the driver
>>> supports this representation (which I believe is true) and on the other
>>> side maybe it's time to advertise "better" bindings as well.
>>
>> Yes, I'm OK to mark ti specific properties deprecated and use standard NAND chip
>> bindings.
>
> I don't think it's really worth it to go half way using common
> properties but not the common structure.
I agree.
We will be having new chips that will use this driver but we will migrate to new
common structure when adding support for those chips.
So I will leave this patch as it is for now.
cheers,
-roger
next prev parent reply other threads:[~2021-09-08 6:55 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-09-07 11:32 [PATCH v3 0/8] dt-bindings: memory-controllers: ti,gpmc: " Roger Quadros
2021-09-07 11:32 ` [PATCH v3 1/8] ARM: dts: omap: Fixup GPMC child nodes Roger Quadros
2021-09-07 12:44 ` Krzysztof Kozlowski
2021-09-15 8:53 ` Roger Quadros
2021-09-07 11:32 ` [PATCH v3 2/8] dt-bindings: mtd: Remove gpmc-nor.txt Roger Quadros
2021-09-07 11:32 ` [PATCH v3 3/8] dt-bindings: net: Remove gpmc-eth.txt Roger Quadros
2021-09-07 11:32 ` [PATCH v3 4/8] dt-bindings: memory-controllers: Introduce ti,gpmc-child Roger Quadros
2021-09-07 11:32 ` [PATCH v3 5/8] dt-bindings: mtd: ti,gpmc-nand: Convert to yaml Roger Quadros
2021-09-07 14:03 ` Miquel Raynal
2021-09-07 15:27 ` Grygorii Strashko
2021-09-07 16:35 ` Miquel Raynal
2021-09-07 16:57 ` Roger Quadros
2021-09-07 22:24 ` Rob Herring
2021-09-08 6:55 ` Roger Quadros [this message]
2021-09-07 17:01 ` Rob Herring
2021-09-08 11:14 ` Roger Quadros
2021-09-08 12:46 ` Rob Herring
2021-09-07 11:32 ` [PATCH v3 6/8] dt-bindings: mtd: ti,gpmc-onenand: " Roger Quadros
2021-09-07 11:32 ` [PATCH v3 7/8] dt-bindings: memory-controllers: ti,gpmc: " Roger Quadros
2021-09-07 11:32 ` [PATCH v3 8/8] memory: gpmc-omap: "gpmc,device-width" DT property is optional Roger Quadros
2021-09-07 12:36 ` Krzysztof Kozlowski
2021-09-15 9:11 ` Roger Quadros
2021-09-16 10:48 ` Krzysztof Kozlowski
2021-09-17 7:17 ` Roger Quadros
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=1afc71e6-5104-2ce1-f176-97f4583507ef@kernel.org \
--to=rogerq@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=grygorii.strashko@ti.com \
--cc=krzysztof.kozlowski@canonical.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mtd@lists.infradead.org \
--cc=linux-omap@vger.kernel.org \
--cc=lokeshvutla@ti.com \
--cc=miquel.raynal@bootlin.com \
--cc=nm@ti.com \
--cc=nsekhar@ti.com \
--cc=robh+dt@kernel.org \
--cc=tony@atomide.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
all inboxes | Powered by JetHome®