From nobody Thu Nov 28 11:25:22 2024 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 750DD19414E; Wed, 2 Oct 2024 08:10:59 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1727856659; cv=none; b=CW4QTBRh3Ewt9Xyt3vbl8W0MuduBa87ZOibK9DNk5gUfoOCptvCFxh0neXcecsPulO9K/oEOwWOUk/xJSebNkYBbgE/rV9rtLZgI1bCYPLVnoXCa7e/WVhbfEwuDuiy232X9iCqEfwNlX7bhpkW+JaUEvE8jyPgIP3W5rvUsFCg= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1727856659; c=relaxed/simple; bh=9U87gehNfv+OIiykmTtAtZTkXnM63KPDWEuzd0j08CA=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=jG1OI5xKHB4zKurkcMR3i7aV5dj8OspC3Xn5EKzMRBjky3aaZdJrSKU9Su2HbVb212LUO34s2P5TRl33zfvD4v8k3p7excRtnh8dNTIS81gYilUYjWJ9b92YXG6gtqGA+CTnDzacs+OuQKYAZvQTwrvFrZs+A4T82pw6NHDL62M= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=Mz5kOqx6; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="Mz5kOqx6" Received: by smtp.kernel.org (Postfix) with ESMTPS id 145C9C4CED1; Wed, 2 Oct 2024 08:10:59 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1727856659; bh=9U87gehNfv+OIiykmTtAtZTkXnM63KPDWEuzd0j08CA=; h=From:Date:Subject:References:In-Reply-To:To:Cc:Reply-To:From; b=Mz5kOqx6sjNI831Htam91rfZV7cGaY9oAO2hz6U6WNlxcEQR6RSO4AzvHKBIOgDuE ybFZDuKU5L+nrW+MN/HZeTd8x81mAuq9adw01BdCCOPvW4abiJwjLGEMNmUivpVhJ0 JfwDpbYF55JnhQEJtvaWcFQbmLe/ANXw3GHAKMSgVp26mH0bB6vsQcCKFh2jufqXT5 PROz4g9ztqWavGLIeeZgUIhmCN4t/UHZdQUnqvozyAz1suUl0OxLUBynTMf+0XRJET l4K8xaZgXGGK+n9J9mVWtOBXZprAubw4gktfRBArEmcuZR6hi27MyIBktZTCPVjfc+ mSEChVBxwoupA== Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id 04324CF319D; Wed, 2 Oct 2024 08:10:59 +0000 (UTC) From: Keguang Zhang via B4 Relay Date: Wed, 02 Oct 2024 16:10:45 +0800 Subject: [PATCH v10 1/2] dt-bindings: mtd: Add Loongson-1 NAND Controller Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20241002-loongson1-nand-v10-1-17162eff80e2@gmail.com> References: <20241002-loongson1-nand-v10-0-17162eff80e2@gmail.com> In-Reply-To: <20241002-loongson1-nand-v10-0-17162eff80e2@gmail.com> To: Miquel Raynal , Richard Weinberger , Vignesh Raghavendra , Rob Herring , Krzysztof Kozlowski , Conor Dooley Cc: linux-mtd@lists.infradead.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, linux-media@vger.kernel.org, Keguang Zhang , Krzysztof Kozlowski X-Mailer: b4 0.13.0 X-Developer-Signature: v=1; a=ed25519-sha256; t=1727856656; l=2914; i=keguang.zhang@gmail.com; s=20231129; h=from:subject:message-id; bh=ijmjreV0PHp6NKGPauLRqbwAJA1s+bytYg7cJBivIQE=; b=jUvDcnOrTZH8FMfischBNLDPJG79OGkwDGwzEV8b+WoE863Tqjjd/O2Oaz/gK1rEKNC2zhCU9 jLBbcj8tWWbBlATbAfymyp63YgU6nnfGKhaDDiJyAbwZT2f4wEOIV41 X-Developer-Key: i=keguang.zhang@gmail.com; a=ed25519; pk=FMKGj/JgKll/MgClpNZ3frIIogsh5e5r8CeW2mr+WLs= X-Endpoint-Received: by B4 Relay for keguang.zhang@gmail.com/20231129 with auth_id=102 X-Original-From: Keguang Zhang Reply-To: keguang.zhang@gmail.com From: Keguang Zhang Add devicetree binding document for Loongson-1 NAND controller. Reviewed-by: Krzysztof Kozlowski Signed-off-by: Keguang Zhang --- Changes in v10: - None Changes in v9: - Change the compatible to 'loongson,ls1*-nand-controller'. - Rename the file to loongson,ls1b-nand-controller.yaml - Some minor adjustments. Changes in v8: - Add a description part. - Adjust the compatible because the match data for ls1c-nfc differs from ls= 1b-nfc. - Mark 'nand-use-soft-ecc-engine' and 'nand-ecc-algo' as mandatory. - Delete the superfluous blank lines. Changes in v7: - rename the file to loongson,ls1b-nfc.yaml Changes in v6: - A newly added patch --- .../mtd/loongson,ls1b-nand-controller.yaml | 75 ++++++++++++++++++= ++++ 1 file changed, 75 insertions(+) diff --git a/Documentation/devicetree/bindings/mtd/loongson,ls1b-nand-contr= oller.yaml b/Documentation/devicetree/bindings/mtd/loongson,ls1b-nand-contr= oller.yaml new file mode 100644 index 000000000000..308baf23221b --- /dev/null +++ b/Documentation/devicetree/bindings/mtd/loongson,ls1b-nand-controller.y= aml @@ -0,0 +1,75 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/mtd/loongson,ls1b-nand-controller.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Loongson-1 NAND Controller + +maintainers: + - Keguang Zhang + +description: + The Loongson-1 NAND controller abstracts all supported operations, + meaning it does not support low-level access to raw NAND flash chips. + Moreover, the controller is paired with the DMA engine to perform + READ and PROGRAM functions. + +allOf: + - $ref: nand-controller.yaml + +properties: + compatible: + oneOf: + - enum: + - loongson,ls1b-nand-controller + - loongson,ls1c-nand-controller + - items: + - enum: + - loongson,ls1a-nand-controller + - const: loongson,ls1b-nand-controller + + reg: + maxItems: 1 + + dmas: + maxItems: 1 + + dma-names: + const: rxtx + +patternProperties: + "^nand@[0-3]$": + type: object + $ref: raw-nand-chip.yaml + + required: + - nand-use-soft-ecc-engine + - nand-ecc-algo + + unevaluatedProperties: false + +required: + - compatible + - reg + - dmas + - dma-names + +unevaluatedProperties: false + +examples: + - | + nand-controller@1fe78000 { + compatible =3D "loongson,ls1b-nand-controller"; + reg =3D <0x1fe78000 0x40>; + dmas =3D <&dma 0>; + dma-names =3D "rxtx"; + #address-cells =3D <1>; + #size-cells =3D <0>; + + nand@0 { + reg =3D <0>; + nand-use-soft-ecc-engine; + nand-ecc-algo =3D "hamming"; + }; + }; --=20 2.43.0