From: Miquel Raynal <miquel.raynal@bootlin.com>
To: Arseniy Krasnov <avkrasnov@sberdevices.ru>
Cc: Liang Yang <liang.yang@amlogic.com>,
Richard Weinberger <richard@nod.at>,
Vignesh Raghavendra <vigneshr@ti.com>,
Rob Herring <robh+dt@kernel.org>,
Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>,
Conor Dooley <conor+dt@kernel.org>,
Neil Armstrong <neil.armstrong@linaro.org>,
Kevin Hilman <khilman@baylibre.com>,
Jerome Brunet <jbrunet@baylibre.com>,
Martin Blumenstingl <martin.blumenstingl@googlemail.com>,
<oxffffaa@gmail.com>, <kernel@sberdevices.ru>,
<linux-mtd@lists.infradead.org>, <devicetree@vger.kernel.org>,
<linux-arm-kernel@lists.infradead.org>,
<linux-amlogic@lists.infradead.org>,
<linux-kernel@vger.kernel.org>
Subject: Re: [RFC PATCH v2 1/2] dt-bindings: nand: meson: support for 512B ECC step size
Date: Wed, 5 Jul 2023 10:22:54 +0200 [thread overview]
Message-ID: <20230705102254.0aeb94ea@xps-13> (raw)
In-Reply-To: <365898fb-3719-38e0-4383-e04ccc0b475b@sberdevices.ru>
Hi Arseniy,
avkrasnov@sberdevices.ru wrote on Wed, 5 Jul 2023 11:03:30 +0300:
> On 05.07.2023 10:37, Miquel Raynal wrote:
> > Hi Arseniy,
> >
> > AVKrasnov@sberdevices.ru wrote on Wed, 5 Jul 2023 09:54:33 +0300:
> >
> >> Meson NAND supports both 512B and 1024B ECC step size, so replace
> >> 'const' for only 1024B step size with enum for both sizes.
> >>
> >> Signed-off-by: Arseniy Krasnov <AVKrasnov@sberdevices.ru>
> >> ---
> >> Documentation/devicetree/bindings/mtd/amlogic,meson-nand.yaml | 4 +++-
> >> 1 file changed, 3 insertions(+), 1 deletion(-)
> >>
> >> diff --git a/Documentation/devicetree/bindings/mtd/amlogic,meson-nand.yaml b/Documentation/devicetree/bindings/mtd/amlogic,meson-nand.yaml
> >> index 3bec8af91bbb..81ca8828731a 100644
> >> --- a/Documentation/devicetree/bindings/mtd/amlogic,meson-nand.yaml
> >> +++ b/Documentation/devicetree/bindings/mtd/amlogic,meson-nand.yaml
> >> @@ -49,7 +49,8 @@ patternProperties:
> >> const: hw
> >>
> >> nand-ecc-step-size:
> >> - const: 1024
> >> + enum: [512, 1024]
> >> + default: 1024
> >
> > I was actually wrong in my previous review, there is no strong default
> > here as the existing binding (and code) try to use the closest
> > parameters required by the NAND chip: we pick the "optimal"
> > configuration. So if you don't provide any value here, we expect
> > the strength and step size advertized by the chip to be used. This is a
> > common default in the raw NAND subsystem.
> >
> > Please drop the default line, re-integrate the missing R-by tag from
> > Rob and in a separate patch please mark nand-ecc-step-size and
> > nand-ecc-strength mandatory if the other is provide. IOW, we expect
> > either both, or none of them, but not a single one.
>
> I see, no problem! "mandatory" means update description of both fields like:
>
> description:
> Mandatory if nand-ecc-step-size is set.
Nope :-)
Something along:
allOf:
- if:
<nand-chip>:
properties:
contains:
- nand-ecc-step-size
then:
required:
<nand-chip>:
properties:
- nand-ecc-strength
And same with the opposite logic.
>
> etc.
>
> ?
>
> >
> >>
> >> nand-ecc-strength:
> >> enum: [8, 16, 24, 30, 40, 50, 60]
> >> @@ -93,6 +94,7 @@ examples:
> >> nand@0 {
> >> reg = <0>;
> >> nand-rb = <0>;
> >> + nand-ecc-step-size = <1024>;
> >
> > So in the end this line is wrong and once you get the description right
> > as I mentioned it above, this will fail to pass
> > `make DT_SCHEMA_FILES=Documentation/devicetree/bindings/mtd/ dt_binidng_check`
> > Please drop it from the example, don't add the second property here,
> > it's best to show a clean example where people stop tampering for no
> > reason with the optimal values.
>
> Ok!
>
> Thanks, Arseniy
>
> >
> >> };
> >> };
> >>
> >
> >
> > Thanks,
> > Miquèl
Thanks,
Miquèl
_______________________________________________
linux-amlogic mailing list
linux-amlogic@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-amlogic
WARNING: multiple messages have this Message-ID (diff)
From: Miquel Raynal <miquel.raynal@bootlin.com>
To: Arseniy Krasnov <avkrasnov@sberdevices.ru>
Cc: Liang Yang <liang.yang@amlogic.com>,
Richard Weinberger <richard@nod.at>,
Vignesh Raghavendra <vigneshr@ti.com>,
Rob Herring <robh+dt@kernel.org>,
Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>,
Conor Dooley <conor+dt@kernel.org>,
Neil Armstrong <neil.armstrong@linaro.org>,
Kevin Hilman <khilman@baylibre.com>,
Jerome Brunet <jbrunet@baylibre.com>,
Martin Blumenstingl <martin.blumenstingl@googlemail.com>,
<oxffffaa@gmail.com>, <kernel@sberdevices.ru>,
<linux-mtd@lists.infradead.org>, <devicetree@vger.kernel.org>,
<linux-arm-kernel@lists.infradead.org>,
<linux-amlogic@lists.infradead.org>,
<linux-kernel@vger.kernel.org>
Subject: Re: [RFC PATCH v2 1/2] dt-bindings: nand: meson: support for 512B ECC step size
Date: Wed, 5 Jul 2023 10:22:54 +0200 [thread overview]
Message-ID: <20230705102254.0aeb94ea@xps-13> (raw)
In-Reply-To: <365898fb-3719-38e0-4383-e04ccc0b475b@sberdevices.ru>
Hi Arseniy,
avkrasnov@sberdevices.ru wrote on Wed, 5 Jul 2023 11:03:30 +0300:
> On 05.07.2023 10:37, Miquel Raynal wrote:
> > Hi Arseniy,
> >
> > AVKrasnov@sberdevices.ru wrote on Wed, 5 Jul 2023 09:54:33 +0300:
> >
> >> Meson NAND supports both 512B and 1024B ECC step size, so replace
> >> 'const' for only 1024B step size with enum for both sizes.
> >>
> >> Signed-off-by: Arseniy Krasnov <AVKrasnov@sberdevices.ru>
> >> ---
> >> Documentation/devicetree/bindings/mtd/amlogic,meson-nand.yaml | 4 +++-
> >> 1 file changed, 3 insertions(+), 1 deletion(-)
> >>
> >> diff --git a/Documentation/devicetree/bindings/mtd/amlogic,meson-nand.yaml b/Documentation/devicetree/bindings/mtd/amlogic,meson-nand.yaml
> >> index 3bec8af91bbb..81ca8828731a 100644
> >> --- a/Documentation/devicetree/bindings/mtd/amlogic,meson-nand.yaml
> >> +++ b/Documentation/devicetree/bindings/mtd/amlogic,meson-nand.yaml
> >> @@ -49,7 +49,8 @@ patternProperties:
> >> const: hw
> >>
> >> nand-ecc-step-size:
> >> - const: 1024
> >> + enum: [512, 1024]
> >> + default: 1024
> >
> > I was actually wrong in my previous review, there is no strong default
> > here as the existing binding (and code) try to use the closest
> > parameters required by the NAND chip: we pick the "optimal"
> > configuration. So if you don't provide any value here, we expect
> > the strength and step size advertized by the chip to be used. This is a
> > common default in the raw NAND subsystem.
> >
> > Please drop the default line, re-integrate the missing R-by tag from
> > Rob and in a separate patch please mark nand-ecc-step-size and
> > nand-ecc-strength mandatory if the other is provide. IOW, we expect
> > either both, or none of them, but not a single one.
>
> I see, no problem! "mandatory" means update description of both fields like:
>
> description:
> Mandatory if nand-ecc-step-size is set.
Nope :-)
Something along:
allOf:
- if:
<nand-chip>:
properties:
contains:
- nand-ecc-step-size
then:
required:
<nand-chip>:
properties:
- nand-ecc-strength
And same with the opposite logic.
>
> etc.
>
> ?
>
> >
> >>
> >> nand-ecc-strength:
> >> enum: [8, 16, 24, 30, 40, 50, 60]
> >> @@ -93,6 +94,7 @@ examples:
> >> nand@0 {
> >> reg = <0>;
> >> nand-rb = <0>;
> >> + nand-ecc-step-size = <1024>;
> >
> > So in the end this line is wrong and once you get the description right
> > as I mentioned it above, this will fail to pass
> > `make DT_SCHEMA_FILES=Documentation/devicetree/bindings/mtd/ dt_binidng_check`
> > Please drop it from the example, don't add the second property here,
> > it's best to show a clean example where people stop tampering for no
> > reason with the optimal values.
>
> Ok!
>
> Thanks, Arseniy
>
> >
> >> };
> >> };
> >>
> >
> >
> > Thanks,
> > Miquèl
Thanks,
Miquèl
______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/
WARNING: multiple messages have this Message-ID (diff)
From: Miquel Raynal <miquel.raynal@bootlin.com>
To: Arseniy Krasnov <avkrasnov@sberdevices.ru>
Cc: Liang Yang <liang.yang@amlogic.com>,
Richard Weinberger <richard@nod.at>,
Vignesh Raghavendra <vigneshr@ti.com>,
Rob Herring <robh+dt@kernel.org>,
Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>,
Conor Dooley <conor+dt@kernel.org>,
Neil Armstrong <neil.armstrong@linaro.org>,
Kevin Hilman <khilman@baylibre.com>,
Jerome Brunet <jbrunet@baylibre.com>,
Martin Blumenstingl <martin.blumenstingl@googlemail.com>,
<oxffffaa@gmail.com>, <kernel@sberdevices.ru>,
<linux-mtd@lists.infradead.org>, <devicetree@vger.kernel.org>,
<linux-arm-kernel@lists.infradead.org>,
<linux-amlogic@lists.infradead.org>,
<linux-kernel@vger.kernel.org>
Subject: Re: [RFC PATCH v2 1/2] dt-bindings: nand: meson: support for 512B ECC step size
Date: Wed, 5 Jul 2023 10:22:54 +0200 [thread overview]
Message-ID: <20230705102254.0aeb94ea@xps-13> (raw)
In-Reply-To: <365898fb-3719-38e0-4383-e04ccc0b475b@sberdevices.ru>
Hi Arseniy,
avkrasnov@sberdevices.ru wrote on Wed, 5 Jul 2023 11:03:30 +0300:
> On 05.07.2023 10:37, Miquel Raynal wrote:
> > Hi Arseniy,
> >
> > AVKrasnov@sberdevices.ru wrote on Wed, 5 Jul 2023 09:54:33 +0300:
> >
> >> Meson NAND supports both 512B and 1024B ECC step size, so replace
> >> 'const' for only 1024B step size with enum for both sizes.
> >>
> >> Signed-off-by: Arseniy Krasnov <AVKrasnov@sberdevices.ru>
> >> ---
> >> Documentation/devicetree/bindings/mtd/amlogic,meson-nand.yaml | 4 +++-
> >> 1 file changed, 3 insertions(+), 1 deletion(-)
> >>
> >> diff --git a/Documentation/devicetree/bindings/mtd/amlogic,meson-nand.yaml b/Documentation/devicetree/bindings/mtd/amlogic,meson-nand.yaml
> >> index 3bec8af91bbb..81ca8828731a 100644
> >> --- a/Documentation/devicetree/bindings/mtd/amlogic,meson-nand.yaml
> >> +++ b/Documentation/devicetree/bindings/mtd/amlogic,meson-nand.yaml
> >> @@ -49,7 +49,8 @@ patternProperties:
> >> const: hw
> >>
> >> nand-ecc-step-size:
> >> - const: 1024
> >> + enum: [512, 1024]
> >> + default: 1024
> >
> > I was actually wrong in my previous review, there is no strong default
> > here as the existing binding (and code) try to use the closest
> > parameters required by the NAND chip: we pick the "optimal"
> > configuration. So if you don't provide any value here, we expect
> > the strength and step size advertized by the chip to be used. This is a
> > common default in the raw NAND subsystem.
> >
> > Please drop the default line, re-integrate the missing R-by tag from
> > Rob and in a separate patch please mark nand-ecc-step-size and
> > nand-ecc-strength mandatory if the other is provide. IOW, we expect
> > either both, or none of them, but not a single one.
>
> I see, no problem! "mandatory" means update description of both fields like:
>
> description:
> Mandatory if nand-ecc-step-size is set.
Nope :-)
Something along:
allOf:
- if:
<nand-chip>:
properties:
contains:
- nand-ecc-step-size
then:
required:
<nand-chip>:
properties:
- nand-ecc-strength
And same with the opposite logic.
>
> etc.
>
> ?
>
> >
> >>
> >> nand-ecc-strength:
> >> enum: [8, 16, 24, 30, 40, 50, 60]
> >> @@ -93,6 +94,7 @@ examples:
> >> nand@0 {
> >> reg = <0>;
> >> nand-rb = <0>;
> >> + nand-ecc-step-size = <1024>;
> >
> > So in the end this line is wrong and once you get the description right
> > as I mentioned it above, this will fail to pass
> > `make DT_SCHEMA_FILES=Documentation/devicetree/bindings/mtd/ dt_binidng_check`
> > Please drop it from the example, don't add the second property here,
> > it's best to show a clean example where people stop tampering for no
> > reason with the optimal values.
>
> Ok!
>
> Thanks, Arseniy
>
> >
> >> };
> >> };
> >>
> >
> >
> > Thanks,
> > Miquèl
Thanks,
Miquèl
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
WARNING: multiple messages have this Message-ID (diff)
From: Miquel Raynal <miquel.raynal@bootlin.com>
To: Arseniy Krasnov <avkrasnov@sberdevices.ru>
Cc: Liang Yang <liang.yang@amlogic.com>,
Richard Weinberger <richard@nod.at>,
Vignesh Raghavendra <vigneshr@ti.com>,
Rob Herring <robh+dt@kernel.org>,
Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>,
Conor Dooley <conor+dt@kernel.org>,
Neil Armstrong <neil.armstrong@linaro.org>,
Kevin Hilman <khilman@baylibre.com>,
Jerome Brunet <jbrunet@baylibre.com>,
Martin Blumenstingl <martin.blumenstingl@googlemail.com>,
<oxffffaa@gmail.com>, <kernel@sberdevices.ru>,
<linux-mtd@lists.infradead.org>, <devicetree@vger.kernel.org>,
<linux-arm-kernel@lists.infradead.org>,
<linux-amlogic@lists.infradead.org>,
<linux-kernel@vger.kernel.org>
Subject: Re: [RFC PATCH v2 1/2] dt-bindings: nand: meson: support for 512B ECC step size
Date: Wed, 5 Jul 2023 10:22:54 +0200 [thread overview]
Message-ID: <20230705102254.0aeb94ea@xps-13> (raw)
In-Reply-To: <365898fb-3719-38e0-4383-e04ccc0b475b@sberdevices.ru>
Hi Arseniy,
avkrasnov@sberdevices.ru wrote on Wed, 5 Jul 2023 11:03:30 +0300:
> On 05.07.2023 10:37, Miquel Raynal wrote:
> > Hi Arseniy,
> >
> > AVKrasnov@sberdevices.ru wrote on Wed, 5 Jul 2023 09:54:33 +0300:
> >
> >> Meson NAND supports both 512B and 1024B ECC step size, so replace
> >> 'const' for only 1024B step size with enum for both sizes.
> >>
> >> Signed-off-by: Arseniy Krasnov <AVKrasnov@sberdevices.ru>
> >> ---
> >> Documentation/devicetree/bindings/mtd/amlogic,meson-nand.yaml | 4 +++-
> >> 1 file changed, 3 insertions(+), 1 deletion(-)
> >>
> >> diff --git a/Documentation/devicetree/bindings/mtd/amlogic,meson-nand.yaml b/Documentation/devicetree/bindings/mtd/amlogic,meson-nand.yaml
> >> index 3bec8af91bbb..81ca8828731a 100644
> >> --- a/Documentation/devicetree/bindings/mtd/amlogic,meson-nand.yaml
> >> +++ b/Documentation/devicetree/bindings/mtd/amlogic,meson-nand.yaml
> >> @@ -49,7 +49,8 @@ patternProperties:
> >> const: hw
> >>
> >> nand-ecc-step-size:
> >> - const: 1024
> >> + enum: [512, 1024]
> >> + default: 1024
> >
> > I was actually wrong in my previous review, there is no strong default
> > here as the existing binding (and code) try to use the closest
> > parameters required by the NAND chip: we pick the "optimal"
> > configuration. So if you don't provide any value here, we expect
> > the strength and step size advertized by the chip to be used. This is a
> > common default in the raw NAND subsystem.
> >
> > Please drop the default line, re-integrate the missing R-by tag from
> > Rob and in a separate patch please mark nand-ecc-step-size and
> > nand-ecc-strength mandatory if the other is provide. IOW, we expect
> > either both, or none of them, but not a single one.
>
> I see, no problem! "mandatory" means update description of both fields like:
>
> description:
> Mandatory if nand-ecc-step-size is set.
Nope :-)
Something along:
allOf:
- if:
<nand-chip>:
properties:
contains:
- nand-ecc-step-size
then:
required:
<nand-chip>:
properties:
- nand-ecc-strength
And same with the opposite logic.
>
> etc.
>
> ?
>
> >
> >>
> >> nand-ecc-strength:
> >> enum: [8, 16, 24, 30, 40, 50, 60]
> >> @@ -93,6 +94,7 @@ examples:
> >> nand@0 {
> >> reg = <0>;
> >> nand-rb = <0>;
> >> + nand-ecc-step-size = <1024>;
> >
> > So in the end this line is wrong and once you get the description right
> > as I mentioned it above, this will fail to pass
> > `make DT_SCHEMA_FILES=Documentation/devicetree/bindings/mtd/ dt_binidng_check`
> > Please drop it from the example, don't add the second property here,
> > it's best to show a clean example where people stop tampering for no
> > reason with the optimal values.
>
> Ok!
>
> Thanks, Arseniy
>
> >
> >> };
> >> };
> >>
> >
> >
> > Thanks,
> > Miquèl
Thanks,
Miquèl
next prev parent reply other threads:[~2023-07-05 8:23 UTC|newest]
Thread overview: 36+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-07-05 6:54 [RFC PATCH v2 0/2] support 512B ECC step size for Meson NAND Arseniy Krasnov
2023-07-05 6:54 ` Arseniy Krasnov
2023-07-05 6:54 ` Arseniy Krasnov
2023-07-05 6:54 ` Arseniy Krasnov
2023-07-05 6:54 ` [RFC PATCH v2 1/2] dt-bindings: nand: meson: support for 512B ECC step size Arseniy Krasnov
2023-07-05 6:54 ` Arseniy Krasnov
2023-07-05 6:54 ` Arseniy Krasnov
2023-07-05 6:54 ` Arseniy Krasnov
2023-07-05 7:37 ` Miquel Raynal
2023-07-05 7:37 ` Miquel Raynal
2023-07-05 7:37 ` Miquel Raynal
2023-07-05 7:37 ` Miquel Raynal
2023-07-05 8:03 ` Arseniy Krasnov
2023-07-05 8:03 ` Arseniy Krasnov
2023-07-05 8:03 ` Arseniy Krasnov
2023-07-05 8:03 ` Arseniy Krasnov
2023-07-05 8:22 ` Miquel Raynal [this message]
2023-07-05 8:22 ` Miquel Raynal
2023-07-05 8:22 ` Miquel Raynal
2023-07-05 8:22 ` Miquel Raynal
2023-07-06 5:57 ` Arseniy Krasnov
2023-07-06 5:57 ` Arseniy Krasnov
2023-07-06 5:57 ` Arseniy Krasnov
2023-07-06 5:57 ` Arseniy Krasnov
2023-07-06 6:05 ` Miquel Raynal
2023-07-06 6:05 ` Miquel Raynal
2023-07-06 6:05 ` Miquel Raynal
2023-07-06 6:05 ` Miquel Raynal
2023-07-05 16:03 ` Rob Herring
2023-07-05 16:03 ` Rob Herring
2023-07-05 16:03 ` Rob Herring
2023-07-05 16:03 ` Rob Herring
2023-07-05 6:54 ` [RFC PATCH v2 2/2] mtd: rawnand: " Arseniy Krasnov
2023-07-05 6:54 ` Arseniy Krasnov
2023-07-05 6:54 ` Arseniy Krasnov
2023-07-05 6:54 ` Arseniy Krasnov
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=20230705102254.0aeb94ea@xps-13 \
--to=miquel.raynal@bootlin.com \
--cc=avkrasnov@sberdevices.ru \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=jbrunet@baylibre.com \
--cc=kernel@sberdevices.ru \
--cc=khilman@baylibre.com \
--cc=krzysztof.kozlowski+dt@linaro.org \
--cc=liang.yang@amlogic.com \
--cc=linux-amlogic@lists.infradead.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mtd@lists.infradead.org \
--cc=martin.blumenstingl@googlemail.com \
--cc=neil.armstrong@linaro.org \
--cc=oxffffaa@gmail.com \
--cc=richard@nod.at \
--cc=robh+dt@kernel.org \
--cc=vigneshr@ti.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.