Message ID | 20240203002834.171462-4-william.zhang@broadcom.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel+bounces-50777-ouuuleilei=gmail.com@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7301:9bc1:b0:106:209c:c626 with SMTP id op1csp821662dyc; Fri, 2 Feb 2024 19:00:05 -0800 (PST) X-Google-Smtp-Source: AGHT+IHd1fzDi4/MnJtK5fwPYmJaj4YWdB7JiXUZmQ5Ysb6CxM02qVmT+UPQmnADMDP4vP15g7Qf X-Received: by 2002:a05:620a:8d9:b0:783:e2ed:cf1c with SMTP id z25-20020a05620a08d900b00783e2edcf1cmr7460683qkz.35.1706929205443; Fri, 02 Feb 2024 19:00:05 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1706929205; cv=pass; d=google.com; s=arc-20160816; b=cYaJa1wkUYLzWJcW8Rqluh1CZJqdPaxaYA7z7IM+jLaHd3Z0paymEsITm+H/5ZTVU/ hAYoQTwv6KpKIP8uMFGpFwuZYT6Q0SIlVgHX4RE1C/YYXwwnwOpEADzNvafq3KsdyJ4o liVgVWTg0/zQrws2K1YkMJ1aJ5N8fWyExCEp+7Gi9pnhS2tVntTE6e9JXnyZc+sLw2+4 e0uxytNVYbi+n0olKjkuz/JS8lOfYsQusjrl0ESvgLuO4PlDz6VJTrBayoThhAjKmhaV eyPmIKP9UrW1DdNaJWuZwmjReCUNZ6LmNypHnXp1lSJgTq3dIvnX04M75y7VxHqPVONY nXdw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature:dkim-filter; bh=gZDn/As6UULU3B80feN3/8QHRxtRkZHA9N1Yp3+myeg=; fh=2Z1tZOanrYf3gBdPYluAg5vEZ95Dx36RYlx59g0+ZBg=; b=r9tUwYy4lHtxzqMladD2mgCyU8bOIPJyddADvwh6ZP9No01s0pl13vy19aN3z1zL50 y8TARCU2P9cwUJZ0H/BQeShinb6xE+MopvZ3LT1Ksddd5n1mQdUdfN4eQ6hcG/Pb290P IeEdIerXLvR0Y/2rqaHjlCOoSxCsiafISYD4BQKIMRULERLsE7IbwW0ohMW1I4fopELD yPj2TE5SRvexV00tcmvS+jbCdL1reafvRxA8ebDH/y7QQLkgWfdF7fKE3c4xpK/ueoJc u7NgqPHIbEcoFYH8pRQRdiSDjOJ0r/JKxCzj7kk2sje71SyHWePWcN9c9oRhZDEjLrxR MnUg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@broadcom.com header.s=dkimrelay header.b=ty2gDHgv; arc=pass (i=1 dkim=pass dkdomain=broadcom.com dmarc=pass fromdomain=broadcom.com); spf=pass (google.com: domain of linux-kernel+bounces-50777-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-50777-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=broadcom.com X-Forwarded-Encrypted: i=1; AJvYcCUYSWNRO7+5nf3sXXJLG+okMtyq9xkDsZQ48R6bT570KaBHWn3vzm7s4/7fEWs64gIUNnTVkVkVhFQWEhwV/babgf338w== Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id t12-20020a05620a034c00b00783cbc35e43si3468755qkm.495.2024.02.02.19.00.04 for <ouuuleilei@gmail.com> (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 02 Feb 2024 19:00:04 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-50777-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@broadcom.com header.s=dkimrelay header.b=ty2gDHgv; arc=pass (i=1 dkim=pass dkdomain=broadcom.com dmarc=pass fromdomain=broadcom.com); spf=pass (google.com: domain of linux-kernel+bounces-50777-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-50777-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=broadcom.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id 913891C23501 for <ouuuleilei@gmail.com>; Sat, 3 Feb 2024 00:30:08 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id BB9407469; Sat, 3 Feb 2024 00:29:22 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=broadcom.com header.i=@broadcom.com header.b="ty2gDHgv" Received: from relay.smtp-ext.broadcom.com (unknown [192.19.166.231]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id AEA487468; Sat, 3 Feb 2024 00:29:18 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=192.19.166.231 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706920160; cv=none; b=CW+hIZjerGaX2iLSWq7Z0AnlKtSSLWwwjRrPPl9/uxvDwYnWb8FR5mjnM/gim79YlL3tCd9w8RntdAJeOQRgF9CHWfXRzavHiayS6ZXHudhMd+k5tYKq0s0eXPGxOTzuXVh2RmrNuQ7f0HiNv2o4w4Icgg0FCFFvGR/d86BYXCg= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706920160; c=relaxed/simple; bh=te5+l18ZZxWvnmfq+UvIJN6+FYEaQdsKeXHBLOKms1E=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=PFvuHACZWZqxNi81kOg34+CMH5iK10HJsrcN78OTvoH1wwKVqET6NBcv/d30Hlu7FnBxDLnSC5eGZotmK23uj8mUbmb36Cmqpn1BmifK11tNgG0TFo3zA3uKMkacHd/vGznxGYyqd1IZcneQoeg9YH2mTpKSq8/4vLV8+dyAN+g= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=broadcom.com; spf=fail smtp.mailfrom=broadcom.com; dkim=pass (1024-bit key) header.d=broadcom.com header.i=@broadcom.com header.b=ty2gDHgv; arc=none smtp.client-ip=192.19.166.231 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=broadcom.com Authentication-Results: smtp.subspace.kernel.org; spf=fail smtp.mailfrom=broadcom.com Received: from mail-lvn-it-01.lvn.broadcom.net (mail-lvn-it-01.lvn.broadcom.net [10.36.132.253]) by relay.smtp-ext.broadcom.com (Postfix) with ESMTP id 0AC1AC001668; Fri, 2 Feb 2024 16:29:18 -0800 (PST) DKIM-Filter: OpenDKIM Filter v2.11.0 relay.smtp-ext.broadcom.com 0AC1AC001668 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=broadcom.com; s=dkimrelay; t=1706920158; bh=te5+l18ZZxWvnmfq+UvIJN6+FYEaQdsKeXHBLOKms1E=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=ty2gDHgv+jc6uy7673PtqGYXFmrpGpr/XOfWkQZt2NVMDG34t3iGTNr/MwC4zIL/H cMNoD2hcIjF62NLa9sUCpg5cgECxGbB9GP2s0EK60Mn1UsGiunyIEk9+/OBg2UggyY op+TypxFuMBBfe7j3uvH5VR6ku6uctfclC31MeCE= Received: from bcacpedev-irv-3.lvn.broadcom.net (bcacpedev-irv-3.lvn.broadcom.net [10.173.232.202]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail-lvn-it-01.lvn.broadcom.net (Postfix) with ESMTPSA id 98EA018041CAC4; Fri, 2 Feb 2024 16:29:16 -0800 (PST) From: William Zhang <william.zhang@broadcom.com> To: Linux MTD List <linux-mtd@lists.infradead.org>, Linux ARM List <linux-arm-kernel@lists.infradead.org>, Broadcom Kernel List <bcm-kernel-feedback-list@broadcom.com> Cc: f.fainelli@gmail.com, kursad.oney@broadcom.com, joel.peshkin@broadcom.com, anand.gore@broadcom.com, dregan@mail.com, kamal.dasu@broadcom.com, tomer.yacoby@broadcom.com, dan.beygelman@broadcom.com, William Zhang <william.zhang@broadcom.com>, devicetree@vger.kernel.org, Brian Norris <computersforpeace@gmail.com>, linux-kernel@vger.kernel.org, Conor Dooley <conor+dt@kernel.org>, Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>, Vignesh Raghavendra <vigneshr@ti.com>, Miquel Raynal <miquel.raynal@bootlin.com>, Richard Weinberger <richard@nod.at>, Kamal Dasu <kdasu.kdev@gmail.com>, Rob Herring <robh+dt@kernel.org> Subject: [PATCH v4 03/12] dt-bindings: mtd: brcmnand: Add ecc strap property Date: Fri, 2 Feb 2024 16:28:24 -0800 Message-Id: <20240203002834.171462-4-william.zhang@broadcom.com> X-Mailer: git-send-email 2.37.3 In-Reply-To: <20240203002834.171462-1-william.zhang@broadcom.com> References: <20240203002834.171462-1-william.zhang@broadcom.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: <linux-kernel.vger.kernel.org> List-Subscribe: <mailto:linux-kernel+subscribe@vger.kernel.org> List-Unsubscribe: <mailto:linux-kernel+unsubscribe@vger.kernel.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1789844997513386620 X-GMAIL-MSGID: 1789844997513386620 |
Series |
dt-bindings: mtd: brcmnand: Updates for bcmbca SoCs
|
|
Commit Message
William Zhang
Feb. 3, 2024, 12:28 a.m. UTC
Add brcm,nand-ecc-use-strap to get ecc and spare area size settings from
board boot strap for broadband board designs because they do not specify
ecc setting in dts but rather using the strap setting.
Signed-off-by: William Zhang <william.zhang@broadcom.com>
---
Changes in v4:
- Move ecc strap property to this separate patch and remove some
non-binding related text from the description
Changes in v3: None
Changes in v2: None
Documentation/devicetree/bindings/mtd/brcm,brcmnand.yaml | 8 ++++++++
1 file changed, 8 insertions(+)
Comments
On Fri, Feb 02, 2024 at 04:28:24PM -0800, William Zhang wrote: > Add brcm,nand-ecc-use-strap to get ecc and spare area size settings from > board boot strap for broadband board designs because they do not specify > ecc setting in dts but rather using the strap setting. > > Signed-off-by: William Zhang <william.zhang@broadcom.com> > > --- > > Changes in v4: > - Move ecc strap property to this separate patch and remove some > non-binding related text from the description > > Changes in v3: None > Changes in v2: None > > Documentation/devicetree/bindings/mtd/brcm,brcmnand.yaml | 8 ++++++++ > 1 file changed, 8 insertions(+) > > diff --git a/Documentation/devicetree/bindings/mtd/brcm,brcmnand.yaml b/Documentation/devicetree/bindings/mtd/brcm,brcmnand.yaml > index d0168d55c73e..2599d902ec3a 100644 > --- a/Documentation/devicetree/bindings/mtd/brcm,brcmnand.yaml > +++ b/Documentation/devicetree/bindings/mtd/brcm,brcmnand.yaml > @@ -147,6 +147,14 @@ patternProperties: > layout. > $ref: /schemas/types.yaml#/definitions/uint32 > > + brcm,nand-ecc-use-strap: > + description: > + This flag indicates the ecc strength and spare area size should > + be retrieved from the SoC NAND boot strap setting instead of > + nand-ecc-strength and brcm,nand-oob-sector-size or auto detection. I'm still on the fence about this being overly prescriptive about the operating systems behaviour. I think it would be good to say why the strap values are better than those explicitly provided in DT rather than just saying "these strap values should be used". > + This is commonly used by the BCMBCA SoC board design. > + $ref: /schemas/types.yaml#/definitions/flag > + > unevaluatedProperties: false > > allOf: > -- > 2.37.3 >
On 2/3/24 06:49, Conor Dooley wrote: > On Fri, Feb 02, 2024 at 04:28:24PM -0800, William Zhang wrote: >> Add brcm,nand-ecc-use-strap to get ecc and spare area size settings from >> board boot strap for broadband board designs because they do not specify >> ecc setting in dts but rather using the strap setting. >> >> Signed-off-by: William Zhang <william.zhang@broadcom.com> >> >> --- >> >> Changes in v4: >> - Move ecc strap property to this separate patch and remove some >> non-binding related text from the description >> >> Changes in v3: None >> Changes in v2: None >> >> Documentation/devicetree/bindings/mtd/brcm,brcmnand.yaml | 8 ++++++++ >> 1 file changed, 8 insertions(+) >> >> diff --git a/Documentation/devicetree/bindings/mtd/brcm,brcmnand.yaml b/Documentation/devicetree/bindings/mtd/brcm,brcmnand.yaml >> index d0168d55c73e..2599d902ec3a 100644 >> --- a/Documentation/devicetree/bindings/mtd/brcm,brcmnand.yaml >> +++ b/Documentation/devicetree/bindings/mtd/brcm,brcmnand.yaml >> @@ -147,6 +147,14 @@ patternProperties: >> layout. >> $ref: /schemas/types.yaml#/definitions/uint32 >> >> + brcm,nand-ecc-use-strap: >> + description: >> + This flag indicates the ecc strength and spare area size should >> + be retrieved from the SoC NAND boot strap setting instead of >> + nand-ecc-strength and brcm,nand-oob-sector-size or auto detection. > > I'm still on the fence about this being overly prescriptive about the > operating systems behaviour. I think it would be good to say why the > strap values are better than those explicitly provided in DT rather than > just saying "these strap values should be used". > This is a board/SoC design choice. I wouldn't advise it as better choice as other board/SoC may not have that option. But definitively for BCMBCA SoC board design, it is better and much easier and convenient option than explicit dt setting. How about: This property provides a choice for retrieving ecc strength and spare area size from the SoC NAND boot strap setting. It is commonly used by the BCMBCA SoC board design. >> + This is commonly used by the BCMBCA SoC board design. >> + $ref: /schemas/types.yaml#/definitions/flag >> + >> unevaluatedProperties: false >> >> allOf: >> -- >> 2.37.3 >>
Hi, conor@kernel.org wrote on Sat, 3 Feb 2024 14:49:50 +0000: > On Fri, Feb 02, 2024 at 04:28:24PM -0800, William Zhang wrote: > > Add brcm,nand-ecc-use-strap to get ecc and spare area size settings from > > board boot strap for broadband board designs because they do not specify > > ecc setting in dts but rather using the strap setting. > > > > Signed-off-by: William Zhang <william.zhang@broadcom.com> > > > > --- > > > > Changes in v4: > > - Move ecc strap property to this separate patch and remove some > > non-binding related text from the description > > > > Changes in v3: None > > Changes in v2: None > > > > Documentation/devicetree/bindings/mtd/brcm,brcmnand.yaml | 8 ++++++++ > > 1 file changed, 8 insertions(+) > > > > diff --git a/Documentation/devicetree/bindings/mtd/brcm,brcmnand.yaml b/Documentation/devicetree/bindings/mtd/brcm,brcmnand.yaml > > index d0168d55c73e..2599d902ec3a 100644 > > --- a/Documentation/devicetree/bindings/mtd/brcm,brcmnand.yaml > > +++ b/Documentation/devicetree/bindings/mtd/brcm,brcmnand.yaml > > @@ -147,6 +147,14 @@ patternProperties: > > layout. > > $ref: /schemas/types.yaml#/definitions/uint32 > > > > + brcm,nand-ecc-use-strap: > > + description: > > + This flag indicates the ecc strength and spare area size should > > + be retrieved from the SoC NAND boot strap setting instead of > > + nand-ecc-strength and brcm,nand-oob-sector-size or auto detection. > > I'm still on the fence about this being overly prescriptive about the > operating systems behaviour. I think it would be good to say why the > strap values are better than those explicitly provided in DT rather than > just saying "these strap values should be used". I don't know if there is a point is saying why they would be better, as they are not. It is a -questionable- design choice. However I would just get rid of any mention to other properties. Just say one should expect the strap value to be read and applied by the system when this property is present. > > + This is commonly used by the BCMBCA SoC board design. > > + $ref: /schemas/types.yaml#/definitions/flag > > + > > unevaluatedProperties: false > > > > allOf: > > -- > > 2.37.3 > > Thanks, Miquèl
Hi Miquel, On 2/5/24 05:26, Miquel Raynal wrote: > Hi, > > conor@kernel.org wrote on Sat, 3 Feb 2024 14:49:50 +0000: > >> On Fri, Feb 02, 2024 at 04:28:24PM -0800, William Zhang wrote: >>> Add brcm,nand-ecc-use-strap to get ecc and spare area size settings from >>> board boot strap for broadband board designs because they do not specify >>> ecc setting in dts but rather using the strap setting. >>> >>> Signed-off-by: William Zhang <william.zhang@broadcom.com> >>> >>> --- >>> >>> Changes in v4: >>> - Move ecc strap property to this separate patch and remove some >>> non-binding related text from the description >>> >>> Changes in v3: None >>> Changes in v2: None >>> >>> Documentation/devicetree/bindings/mtd/brcm,brcmnand.yaml | 8 ++++++++ >>> 1 file changed, 8 insertions(+) >>> >>> diff --git a/Documentation/devicetree/bindings/mtd/brcm,brcmnand.yaml b/Documentation/devicetree/bindings/mtd/brcm,brcmnand.yaml >>> index d0168d55c73e..2599d902ec3a 100644 >>> --- a/Documentation/devicetree/bindings/mtd/brcm,brcmnand.yaml >>> +++ b/Documentation/devicetree/bindings/mtd/brcm,brcmnand.yaml >>> @@ -147,6 +147,14 @@ patternProperties: >>> layout. >>> $ref: /schemas/types.yaml#/definitions/uint32 >>> >>> + brcm,nand-ecc-use-strap: >>> + description: >>> + This flag indicates the ecc strength and spare area size should >>> + be retrieved from the SoC NAND boot strap setting instead of >>> + nand-ecc-strength and brcm,nand-oob-sector-size or auto detection. >> >> I'm still on the fence about this being overly prescriptive about the >> operating systems behaviour. I think it would be good to say why the >> strap values are better than those explicitly provided in DT rather than >> just saying "these strap values should be used". > > I don't know if there is a point is saying why they would be better, as > they are not. It is a -questionable- design choice. However I would > just get rid of any mention to other properties. Just say one should > expect the strap value to be read and applied by the system when this > property is present. > Agree we don't need to say which is better as it is just a design choice. And it is used by all BCMBCA internal ref boards and customer designs. But if we just say strap value is read and applied, it is vague and nobody would know what is applied. I replied this email yesterday and suggest the followings: This property provides a choice for retrieving ecc strength and spare area size from the SoC NAND boot strap setting. It is commonly used by the BCMBCA SoC board design. Hope this make everyone happy and we can move forward. >>> + This is commonly used by the BCMBCA SoC board design. >>> + $ref: /schemas/types.yaml#/definitions/flag >>> + >>> unevaluatedProperties: false >>> >>> allOf: >>> -- >>> 2.37.3 >>> > > > Thanks, > Miquèl
Hi William, william.zhang@broadcom.com wrote on Mon, 5 Feb 2024 10:05:14 -0800: > Hi Miquel, > > On 2/5/24 05:26, Miquel Raynal wrote: > > Hi, > > > > conor@kernel.org wrote on Sat, 3 Feb 2024 14:49:50 +0000: > > > >> On Fri, Feb 02, 2024 at 04:28:24PM -0800, William Zhang wrote: > >>> Add brcm,nand-ecc-use-strap to get ecc and spare area size settings from > >>> board boot strap for broadband board designs because they do not specify > >>> ecc setting in dts but rather using the strap setting. > >>> > >>> Signed-off-by: William Zhang <william.zhang@broadcom.com> > >>> > >>> --- > >>> > >>> Changes in v4: > >>> - Move ecc strap property to this separate patch and remove some > >>> non-binding related text from the description > >>> > >>> Changes in v3: None > >>> Changes in v2: None > >>> > >>> Documentation/devicetree/bindings/mtd/brcm,brcmnand.yaml | 8 ++++++++ > >>> 1 file changed, 8 insertions(+) > >>> > >>> diff --git a/Documentation/devicetree/bindings/mtd/brcm,brcmnand.yaml b/Documentation/devicetree/bindings/mtd/brcm,brcmnand.yaml > >>> index d0168d55c73e..2599d902ec3a 100644 > >>> --- a/Documentation/devicetree/bindings/mtd/brcm,brcmnand.yaml > >>> +++ b/Documentation/devicetree/bindings/mtd/brcm,brcmnand.yaml > >>> @@ -147,6 +147,14 @@ patternProperties: > >>> layout. > >>> $ref: /schemas/types.yaml#/definitions/uint32 > >>> >>> + brcm,nand-ecc-use-strap: > >>> + description: > >>> + This flag indicates the ecc strength and spare area size should > >>> + be retrieved from the SoC NAND boot strap setting instead of > >>> + nand-ecc-strength and brcm,nand-oob-sector-size or auto detection. > >> > >> I'm still on the fence about this being overly prescriptive about the > >> operating systems behaviour. I think it would be good to say why the > >> strap values are better than those explicitly provided in DT rather than > >> just saying "these strap values should be used". > > > > I don't know if there is a point is saying why they would be better, as > > they are not. It is a -questionable- design choice. However I would > > just get rid of any mention to other properties. Just say one should > > expect the strap value to be read and applied by the system when this > > property is present. > > > Agree we don't need to say which is better as it is just a design choice. And it is used by all BCMBCA internal ref boards and customer designs. But if we just say strap value is read and applied, it is vague and nobody would know what is applied. I replied this email yesterday and suggest the followings: > > This property provides a choice for retrieving ecc strength and spare area size from the SoC NAND boot strap setting. It is commonly used by the BCMBCA SoC board design. What about: This property requires the host system to get the ECC strength and step size from the SoC NAND boot strap setting. This is a common hardware design on BCMBCA based boards. I would also like to constrain this more by adding an exclusive use wrt the nand-ecc-* properties. So either you put this property, or you put the generic nand-ecc-* properties, or you put nothing (which, again, is by far the best solution), but in no case you can have a mix. > > Hope this make everyone happy and we can move forward. I was advising to avoid mentioning too specific DT properties, but mentioning the kind of impact it has (on the choice for the ECC strength and size) is fine. > > > >>> + This is commonly used by the BCMBCA SoC board design. > >>> + $ref: /schemas/types.yaml#/definitions/flag > >>> + > >>> unevaluatedProperties: false > >>> >>> allOf: > >>> -- >>> 2.37.3 > >>> > > > > Thanks, > > Miquèl Thanks, Miquèl
On 2/6/24 01:34, Miquel Raynal wrote: > Hi William, > > william.zhang@broadcom.com wrote on Mon, 5 Feb 2024 10:05:14 -0800: > >> Hi Miquel, >> >> On 2/5/24 05:26, Miquel Raynal wrote: >>> Hi, >>> >>> conor@kernel.org wrote on Sat, 3 Feb 2024 14:49:50 +0000: >>> >>>> On Fri, Feb 02, 2024 at 04:28:24PM -0800, William Zhang wrote: >>>>> Add brcm,nand-ecc-use-strap to get ecc and spare area size settings from >>>>> board boot strap for broadband board designs because they do not specify >>>>> ecc setting in dts but rather using the strap setting. >>>>> >>>>> Signed-off-by: William Zhang <william.zhang@broadcom.com> >>>>> >>>>> --- >>>>> >>>>> Changes in v4: >>>>> - Move ecc strap property to this separate patch and remove some >>>>> non-binding related text from the description >>>>> >>>>> Changes in v3: None >>>>> Changes in v2: None >>>>> >>>>> Documentation/devicetree/bindings/mtd/brcm,brcmnand.yaml | 8 ++++++++ >>>>> 1 file changed, 8 insertions(+) >>>>> >>>>> diff --git a/Documentation/devicetree/bindings/mtd/brcm,brcmnand.yaml b/Documentation/devicetree/bindings/mtd/brcm,brcmnand.yaml >>>>> index d0168d55c73e..2599d902ec3a 100644 >>>>> --- a/Documentation/devicetree/bindings/mtd/brcm,brcmnand.yaml >>>>> +++ b/Documentation/devicetree/bindings/mtd/brcm,brcmnand.yaml >>>>> @@ -147,6 +147,14 @@ patternProperties: >>>>> layout. >>>>> $ref: /schemas/types.yaml#/definitions/uint32 >>>>> >>> + brcm,nand-ecc-use-strap: >>>>> + description: >>>>> + This flag indicates the ecc strength and spare area size should >>>>> + be retrieved from the SoC NAND boot strap setting instead of >>>>> + nand-ecc-strength and brcm,nand-oob-sector-size or auto detection. >>>> >>>> I'm still on the fence about this being overly prescriptive about the >>>> operating systems behaviour. I think it would be good to say why the >>>> strap values are better than those explicitly provided in DT rather than >>>> just saying "these strap values should be used". >>> >>> I don't know if there is a point is saying why they would be better, as >>> they are not. It is a -questionable- design choice. However I would >>> just get rid of any mention to other properties. Just say one should >>> expect the strap value to be read and applied by the system when this >>> property is present. >>> >> Agree we don't need to say which is better as it is just a design choice. And it is used by all BCMBCA internal ref boards and customer designs. But if we just say strap value is read and applied, it is vague and nobody would know what is applied. I replied this email yesterday and suggest the followings: >> >> This property provides a choice for retrieving ecc strength and spare area size from > the SoC NAND boot strap setting. It is commonly used by the BCMBCA SoC board design. > > What about: > > This property requires the host system to get the ECC strength and step > size from the SoC NAND boot strap setting. This is a common hardware > design on BCMBCA based boards. > Sounds good. Will update. > I would also like to constrain this more by adding an exclusive use wrt > the nand-ecc-* properties. So either you put this property, or you put > the generic nand-ecc-* properties, or you put nothing (which, again, is > by far the best solution), but in no case you can have a mix. > Right, nobody should have a mix but in case it happens, the driver code handles that well by taking nand-ecc-* property. So not sure if the exclusion check is really important. Anyway I will add a condition check in the yaml on them as you requested. >> >> Hope this make everyone happy and we can move forward. > > I was advising to avoid mentioning too specific DT properties, but > mentioning the kind of impact it has (on the choice for the ECC > strength and size) is fine. > >> >> >>>>> + This is commonly used by the BCMBCA SoC board design. >>>>> + $ref: /schemas/types.yaml#/definitions/flag >>>>> + >>>>> unevaluatedProperties: false >>>>> >>> allOf: >>>>> -- >>> 2.37.3 >>>>> > > >>> Thanks, >>> Miquèl > > > Thanks, > Miquèl
diff --git a/Documentation/devicetree/bindings/mtd/brcm,brcmnand.yaml b/Documentation/devicetree/bindings/mtd/brcm,brcmnand.yaml index d0168d55c73e..2599d902ec3a 100644 --- a/Documentation/devicetree/bindings/mtd/brcm,brcmnand.yaml +++ b/Documentation/devicetree/bindings/mtd/brcm,brcmnand.yaml @@ -147,6 +147,14 @@ patternProperties: layout. $ref: /schemas/types.yaml#/definitions/uint32 + brcm,nand-ecc-use-strap: + description: + This flag indicates the ecc strength and spare area size should + be retrieved from the SoC NAND boot strap setting instead of + nand-ecc-strength and brcm,nand-oob-sector-size or auto detection. + This is commonly used by the BCMBCA SoC board design. + $ref: /schemas/types.yaml#/definitions/flag + unevaluatedProperties: false allOf: