Message ID | 20240207202257.271784-4-william.zhang@broadcom.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel+bounces-57014-ouuuleilei=gmail.com@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7301:168b:b0:106:860b:bbdd with SMTP id ma11csp2580691dyb; Wed, 7 Feb 2024 16:03:52 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCUc7/Pnkc2rDrbPZfJhI27uWD6OHNZZVJ/72FSZDzzzCQusqdQg00VAgLF1xJBJpOVvyRCHjUnYEzWC/yjfM0HYH8rW1Q== X-Google-Smtp-Source: AGHT+IE08TJZHds6MGY1gTDt4896vdEgwOorWxV/DDskDMYOb7PkFRaNJpG88SF5/ydCASkHYCgq X-Received: by 2002:a17:902:e746:b0:1d9:a3f4:6452 with SMTP id p6-20020a170902e74600b001d9a3f46452mr7460946plf.23.1707350632354; Wed, 07 Feb 2024 16:03:52 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1707350632; cv=pass; d=google.com; s=arc-20160816; b=jDXBPOHwz8wnXuCJn3iZaTRQ/pyj/on/FQKcWN4MQUyACWGjbucYbWUM8b3VtuqvGH yk4caDJ5crn+OBF2LAPWWje9wv5fY9/4wJuD9KepLZNuUk8qqvnI8udXa6ksjgerMd9d egpWO6YaU0/Pkv6tR4RRb1+JOPLzEGOU5yfKz1WoAsoUqwec44sGV91UwLjK44Uxn+sL bc1CLdIjHm83UmP+mF0h5yK8r5xyZnhOZrtGDwPilUUQZ75nbnElfGGvmcnoEzmUWGH5 9eDYwogd41GrPTUgCKaRztHdf43PV+6C4bCsIL2ofCSqYq/oQ7gmL2bbpN+nDuoese7I CCxg== 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=mKzxWW0mGxIoPonH39yER9sLg7y5VlCXxSuwsmgHDpU=; fh=YbZU+n6IzwM2BlijNJgEMVUOdSp4aSDk38aHM1IFeeo=; b=oI12cqNqTuO5byNUbrRhuX8V450PPW5JH7y6ysFTN1KcB1VmT6i1nGusudhEhVlXiO kE+W3ZM7bw/g0jz3ib96YFzUDlWtvn9Dh6viTI1R4FiLFxRkwhg1fQFXzYiO9jaopAsm TqLfNzEEf2uHFz/8Z1uMrXjFqZ3k2+cKnfszJkUBc8G+P18DESWogi5edKuhAz5kwk9q sfgNG3NjkEj0yjBC9hlfV9NtaCOhdFyUeVQtL7GEa93ZChp4jRacZt2Id2BB5mLmteZS D8h5CjO65xsGyV886YujIu+FRx80sX6EOg8TqZ/ZJjvQ91WuqMHDu4bJtXGqV1sMLrEN wagg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@broadcom.com header.s=dkimrelay header.b=Ix1v4o9b; arc=pass (i=1 dkim=pass dkdomain=broadcom.com dmarc=pass fromdomain=broadcom.com); spf=pass (google.com: domain of linux-kernel+bounces-57014-ouuuleilei=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-57014-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=broadcom.com X-Forwarded-Encrypted: i=2; AJvYcCVrV5E/AxHpwJlJW3uXx/y9TV9nUWmdBrmoqRBuA7cm8cW6YWcaIXHBGI+CZQTVyUUBLwg7Dt5s/uZLRfW9boSXn6vthA== Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id t11-20020a170902dccb00b001d8cbbc3290si2483672pll.300.2024.02.07.16.03.52 for <ouuuleilei@gmail.com> (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 07 Feb 2024 16:03:52 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-57014-ouuuleilei=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; dkim=pass header.i=@broadcom.com header.s=dkimrelay header.b=Ix1v4o9b; arc=pass (i=1 dkim=pass dkdomain=broadcom.com dmarc=pass fromdomain=broadcom.com); spf=pass (google.com: domain of linux-kernel+bounces-57014-ouuuleilei=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-57014-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 sv.mirrors.kernel.org (Postfix) with ESMTPS id 347B728B91E for <ouuuleilei@gmail.com>; Wed, 7 Feb 2024 20:24:42 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 1D07C12AAC7; Wed, 7 Feb 2024 20:23:40 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=broadcom.com header.i=@broadcom.com header.b="Ix1v4o9b" 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 E581A1292EB; Wed, 7 Feb 2024 20:23:35 +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=1707337417; cv=none; b=iP8XOc8w34zp7pytTavgCavb16ZUsOwTcADNqvGqJ2kzltJ72V2fPNnPeRTnw01p38hl8a2wh6n+KodZ7ZyQNIELD5/P8ebryEX8ugjunb5RxeBniJZboZwqMOu1VQTx166YMaPHyPuJoldEB2QKJIbEfVSgfcS2xdLU6h823XQ= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707337417; c=relaxed/simple; bh=tkkKLCiY+CmMh/9fyV9TP9Qpf1i/v+KHxHF98/KxN+U=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=FaVBbm2PGv4J2215Lig/ISyeBGJ7Fy6u92pEUGDNzwDZsse9Ug5KmtYixDW1fxLrKr/K2Lw8bP6vKQCtZuS1ktbl1GubSNIB2TmnvXFjd3P4ABC9qeePQQqdQf9BwaAe8T+m6NbfCiwkCgJCfYcwnbVfdmuNM0Ke1vyuzDHWiXI= 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=Ix1v4o9b; 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 2C616C002E08; Wed, 7 Feb 2024 12:23:35 -0800 (PST) DKIM-Filter: OpenDKIM Filter v2.11.0 relay.smtp-ext.broadcom.com 2C616C002E08 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=broadcom.com; s=dkimrelay; t=1707337415; bh=tkkKLCiY+CmMh/9fyV9TP9Qpf1i/v+KHxHF98/KxN+U=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Ix1v4o9bKQFqE4Iq/7WQfxDfx2qYveU8FtEqQHEPNaNYdCYT5IM5bJE59Thpp+1fU N3mVgwVY7/aetVlvupau5v6F1Xu2oNkutjYM1hhd9zaNT5Y6NSwhag2LcWJoyOiZAU 9dnxC7ZPD4zTY1BFOQRaD+dmuN/wsu05Rn1R5w/Y= 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 BB3FF18041CAC4; Wed, 7 Feb 2024 12:23:33 -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 v5 03/12] dt-bindings: mtd: brcmnand: Add ecc strap property Date: Wed, 7 Feb 2024 12:22:48 -0800 Message-Id: <20240207202257.271784-4-william.zhang@broadcom.com> X-Mailer: git-send-email 2.37.3 In-Reply-To: <20240207202257.271784-1-william.zhang@broadcom.com> References: <20240207202257.271784-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: 1790286896360924168 X-GMAIL-MSGID: 1790286896360924168 |
Series |
mtd: rawnand: brcmnand: driver and doc updates
|
|
Commit Message
William Zhang
Feb. 7, 2024, 8:22 p.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 v5:
- Update the description for this ecc strap property
- Add check to make sure brcm,nand-ecc-use-strap and
nand-ecc-strength/brcm,nand-oob-sector-size can not be used at the
same time
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
.../bindings/mtd/brcm,brcmnand.yaml | 19 +++++++++++++++++++
1 file changed, 19 insertions(+)
Comments
On Wed, Feb 07, 2024 at 12:22:48PM -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> If Miquel is happy with this, then I am too. Reviewed-by: Conor Dooley <conor.dooley@microchip.com> Cheers, Conor. > > --- > > Changes in v5: > - Update the description for this ecc strap property > - Add check to make sure brcm,nand-ecc-use-strap and > nand-ecc-strength/brcm,nand-oob-sector-size can not be used at the > same time > > 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 > > .../bindings/mtd/brcm,brcmnand.yaml | 19 +++++++++++++++++++ > 1 file changed, 19 insertions(+) > > diff --git a/Documentation/devicetree/bindings/mtd/brcm,brcmnand.yaml b/Documentation/devicetree/bindings/mtd/brcm,brcmnand.yaml > index 6a717bcedfd3..52a4c993b6f1 100644 > --- a/Documentation/devicetree/bindings/mtd/brcm,brcmnand.yaml > +++ b/Documentation/devicetree/bindings/mtd/brcm,brcmnand.yaml > @@ -146,6 +146,13 @@ patternProperties: > layout. > $ref: /schemas/types.yaml#/definitions/uint32 > > + brcm,nand-ecc-use-strap: > + description: > + 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. > + $ref: /schemas/types.yaml#/definitions/flag > + > unevaluatedProperties: false > > allOf: > @@ -195,6 +202,18 @@ allOf: > required: > - interrupt-names > > + - if: > + patternProperties: > + "^nand@[a-f0-9]$": > + required: > + - brcm,nand-ecc-use-strap > + then: > + patternProperties: > + "^nand@[a-f0-9]$": > + properties: > + nand-ecc-strength: false > + brcm,nand-oob-sector-size: false > + > unevaluatedProperties: false > > required: > -- > 2.37.3 >
Hi William, william.zhang@broadcom.com wrote on Wed, 7 Feb 2024 12:22:48 -0800: > 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 v5: > - Update the description for this ecc strap property > - Add check to make sure brcm,nand-ecc-use-strap and > nand-ecc-strength/brcm,nand-oob-sector-size can not be used at the > same time > > 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 > > .../bindings/mtd/brcm,brcmnand.yaml | 19 +++++++++++++++++++ > 1 file changed, 19 insertions(+) > > diff --git a/Documentation/devicetree/bindings/mtd/brcm,brcmnand.yaml b/Documentation/devicetree/bindings/mtd/brcm,brcmnand.yaml > index 6a717bcedfd3..52a4c993b6f1 100644 > --- a/Documentation/devicetree/bindings/mtd/brcm,brcmnand.yaml > +++ b/Documentation/devicetree/bindings/mtd/brcm,brcmnand.yaml > @@ -146,6 +146,13 @@ patternProperties: > layout. > $ref: /schemas/types.yaml#/definitions/uint32 > > + brcm,nand-ecc-use-strap: > + description: > + 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. > + $ref: /schemas/types.yaml#/definitions/flag > + > unevaluatedProperties: false > > allOf: > @@ -195,6 +202,18 @@ allOf: > required: > - interrupt-names > > + - if: > + patternProperties: > + "^nand@[a-f0-9]$": > + required: > + - brcm,nand-ecc-use-strap > + then: > + patternProperties: > + "^nand@[a-f0-9]$": > + properties: > + nand-ecc-strength: false > + brcm,nand-oob-sector-size: false Can you also excluse all the other nand-ecc- settings and brcm, settings as well? Either you use the strap *or* you provide values in the DT, but not both. > + > unevaluatedProperties: false > > required: Thanks, Miquèl
diff --git a/Documentation/devicetree/bindings/mtd/brcm,brcmnand.yaml b/Documentation/devicetree/bindings/mtd/brcm,brcmnand.yaml index 6a717bcedfd3..52a4c993b6f1 100644 --- a/Documentation/devicetree/bindings/mtd/brcm,brcmnand.yaml +++ b/Documentation/devicetree/bindings/mtd/brcm,brcmnand.yaml @@ -146,6 +146,13 @@ patternProperties: layout. $ref: /schemas/types.yaml#/definitions/uint32 + brcm,nand-ecc-use-strap: + description: + 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. + $ref: /schemas/types.yaml#/definitions/flag + unevaluatedProperties: false allOf: @@ -195,6 +202,18 @@ allOf: required: - interrupt-names + - if: + patternProperties: + "^nand@[a-f0-9]$": + required: + - brcm,nand-ecc-use-strap + then: + patternProperties: + "^nand@[a-f0-9]$": + properties: + nand-ecc-strength: false + brcm,nand-oob-sector-size: false + unevaluatedProperties: false required: