From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id C00F2EB64D9 for ; Thu, 6 Jul 2023 06:05:55 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232713AbjGFGFy (ORCPT ); Thu, 6 Jul 2023 02:05:54 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39884 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232145AbjGFGFx (ORCPT ); Thu, 6 Jul 2023 02:05:53 -0400 Received: from relay3-d.mail.gandi.net (relay3-d.mail.gandi.net [IPv6:2001:4b98:dc4:8::223]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2889910F2; Wed, 5 Jul 2023 23:05:44 -0700 (PDT) X-GND-Sasl: miquel.raynal@bootlin.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1688623543; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=lv0loJdFyoV3AVvlZn4Pmp1SJuFFj/UT8jk6/AKpsHw=; b=XSoSSqqmC+dg4D1FnsJ6ZVW/YzNN62aPkQUj3ryPOrMUWEHAzVFi9Rn3GIJj0dGkJYus2Z ZUU8RnizTHDhli0m0xi81adQ50HCJsXR0kS7++DOmxVyhktuUKphg2JopBfL41Nrnjxckc ovnVM0Pp8b+N/MC/zWCIUeRNrT8/vgduZP/aMJtI5qG353fiM4aa5ksBhFCdJadu36YrCt 3P3t2XXlAxkvP/DLxXGNwhNo16SHoYQh2ftsVeVyAabBLwvHNAqhP7S3xL9SYCINsvCHmZ O3Mofv4k+vNA+HzRLm8qBVndCfhrUQI8Os0Dl97bhZ+B5tYbC/I38teUSg2T1w== X-GND-Sasl: miquel.raynal@bootlin.com X-GND-Sasl: miquel.raynal@bootlin.com X-GND-Sasl: miquel.raynal@bootlin.com X-GND-Sasl: miquel.raynal@bootlin.com X-GND-Sasl: miquel.raynal@bootlin.com X-GND-Sasl: miquel.raynal@bootlin.com X-GND-Sasl: miquel.raynal@bootlin.com X-GND-Sasl: miquel.raynal@bootlin.com X-GND-Sasl: miquel.raynal@bootlin.com X-GND-Sasl: miquel.raynal@bootlin.com X-GND-Sasl: miquel.raynal@bootlin.com X-GND-Sasl: miquel.raynal@bootlin.com X-GND-Sasl: miquel.raynal@bootlin.com X-GND-Sasl: miquel.raynal@bootlin.com X-GND-Sasl: miquel.raynal@bootlin.com X-GND-Sasl: miquel.raynal@bootlin.com X-GND-Sasl: miquel.raynal@bootlin.com Received: by mail.gandi.net (Postfix) with ESMTPSA id B87B560005; Thu, 6 Jul 2023 06:05:40 +0000 (UTC) Date: Thu, 6 Jul 2023 08:05:39 +0200 From: Miquel Raynal To: Arseniy Krasnov Cc: Liang Yang , Richard Weinberger , Vignesh Raghavendra , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Neil Armstrong , Kevin Hilman , Jerome Brunet , Martin Blumenstingl , , , , , , , Subject: Re: [RFC PATCH v2 1/2] dt-bindings: nand: meson: support for 512B ECC step size Message-ID: <20230706080539.11b57e10@xps-13> In-Reply-To: <677b0b16-2bfc-46e5-6029-e3b56abcaa3c@sberdevices.ru> References: <20230705065434.297040-1-AVKrasnov@sberdevices.ru> <20230705065434.297040-2-AVKrasnov@sberdevices.ru> <20230705093702.6c0421d7@xps-13> <365898fb-3719-38e0-4383-e04ccc0b475b@sberdevices.ru> <20230705102254.0aeb94ea@xps-13> <677b0b16-2bfc-46e5-6029-e3b56abcaa3c@sberdevices.ru> Organization: Bootlin X-Mailer: Claws Mail 4.0.0 (GTK+ 3.24.33; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org Hi Arseniy, avkrasnov@sberdevices.ru wrote on Thu, 6 Jul 2023 08:57:00 +0300: > On 05.07.2023 11:22, Miquel Raynal wrote: > > Hi Arseniy, > >=20 > > avkrasnov@sberdevices.ru wrote on Wed, 5 Jul 2023 11:03:30 +0300: > > =20 > >> On 05.07.2023 10:37, Miquel Raynal wrote: =20 > >>> Hi Arseniy, > >>> > >>> AVKrasnov@sberdevices.ru wrote on Wed, 5 Jul 2023 09:54:33 +0300: > >>> =20 > >>>> 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 > >>>> --- > >>>> 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-nan= d.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 > >>>> =20 > >>>> nand-ecc-step-size: > >>>> - const: 1024 > >>>> + enum: [512, 1024] > >>>> + default: 1024 =20 > >>> > >>> 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. =20 > >> > >> I see, no problem! "mandatory" means update description of both fields= like: > >> > >> description: = =20 > >> Mandatory if nand-ecc-step-size is set. =20 > >=20 > > Nope :-) > >=20 > > Something along: > >=20 > > allOf: > > - if: > > : > > properties: > > contains: > > - nand-ecc-step-size > > then: > > required: > > : > > properties: > > - nand-ecc-strength > >=20 > > And same with the opposite logic. =20 >=20 > I see, thanks! And this should be for all nand chips, not only Amlogic? I= mean in > nand-chip.yaml?=20 Some drivers can directly manage the user requests in terms of either step size *or* strength, so I would keep this into the Amlogic file for now. > I'll include it as third patch in this patchset. >=20 > Thanks, Arseniy Thanks, Miqu=C3=A8l