[PATCH v1 7/8] dt-bindings: mtd: loongson,ls1b-nand-controller: Document the Loongson-2K1000 NAND controller
Rob Herring
robh at kernel.org
Tue Jul 22 21:53:22 PDT 2025
On Tue, Jul 22, 2025 at 05:11:06PM +0800, Binbin Zhou wrote:
> Add new compatible for the Loongson-2K NAND controller used for
> Loongson-2K1000 SoC.
>
> Signed-off-by: Binbin Zhou <zhoubinbin at loongson.cn>
> ---
> .../mtd/loongson,ls1b-nand-controller.yaml | 58 +++++++++++++++++--
> 1 file changed, 54 insertions(+), 4 deletions(-)
>
> diff --git a/Documentation/devicetree/bindings/mtd/loongson,ls1b-nand-controller.yaml b/Documentation/devicetree/bindings/mtd/loongson,ls1b-nand-controller.yaml
> index 4ec2b5d1e89d..07a0d9b40fdd 100644
> --- a/Documentation/devicetree/bindings/mtd/loongson,ls1b-nand-controller.yaml
> +++ b/Documentation/devicetree/bindings/mtd/loongson,ls1b-nand-controller.yaml
> @@ -26,18 +26,19 @@ properties:
> - loongson,ls1b-nand-controller
> - loongson,ls1c-nand-controller
> - loongson,ls2k0500-nand-controller
> + - loongson,ls2k1000-nand-controller
> - items:
> - enum:
> - loongson,ls1a-nand-controller
> - const: loongson,ls1b-nand-controller
>
> reg:
> - maxItems: 2
> + minItems: 2
> + maxItems: 3
>
> reg-names:
> - items:
> - - const: nand
> - - const: nand-dma
Keep the list and add dma-config here and 'minItems: 2'
> + minItems: 2
> + maxItems: 3
>
> dmas:
> maxItems: 1
> @@ -54,6 +55,32 @@ required:
>
> unevaluatedProperties: false
>
> +if:
> + properties:
> + compatible:
> + contains:
> + enum:
> + - loongson,ls2k1000-nand-controller
> +
> +then:
> + properties:
> + reg:
> + minItems: 3
> + reg-names:
> + items:
> + - const: nand
> + - const: nand-dma
> + - const: dma-config
And just 'minItems: 3' here
> +
> +else:
> + properties:
> + reg:
> + maxItems: 2
> + reg-names:
> + items:
> + - const: nand
> + - const: nand-dma
And 'maxItems: 2' here.
> +
> examples:
> - |
> nand-controller at 1fe78000 {
> @@ -72,3 +99,26 @@ examples:
> nand-ecc-algo = "hamming";
> };
> };
> +
> + - |
> + nand-controller at 1fe26000 {
> + compatible = "loongson,ls2k1000-nand-controller";
> + reg = <0x1fe26000 0x24>,
> + <0x1fe26040 0x4>,
> + <0x1fe00438 0x8>;
> + reg-names = "nand", "nand-dma", "dma-config";
> + dmas = <&apbdma0 0>;
> + dma-names = "rxtx";
> +
> + #address-cells = <1>;
> + #size-cells = <0>;
> +
> + nand at 0 {
> + reg = <0>;
> + label = "ls2k1000-nand";
> + nand-use-soft-ecc-engine;
> + nand-ecc-algo = "bch";
> + nand-ecc-strength = <8>;
> + nand-ecc-step-size = <512>;
> + };
> + };
> --
> 2.47.3
>
More information about the linux-mtd
mailing list