Loongson NAND Controller

Schema identifier ($id): "http://devicetree.org/schemas/mtd/loongson,ls1b-nand-controller.yaml#"

Schema dialect ($schema): "http://devicetree.org/meta-schemas/core.yaml#"

Maintainers (maintainers): "Keguang Zhang <keguang.zhang@gmail.com>", "Binbin Zhou <zhoubinbin@loongson.cn>"

The Loongson 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.

All of these rules must match (allOf) #

Rule 1 #

Shared schema rule ($ref): nand-controller.yaml

Properties and child nodes (properties) #

compatible — required here #

Exactly one of these rules must match (oneOf) #

Rule 1

Allowed values (enum): "loongson,ls1b-nand-controller", "loongson,ls1c-nand-controller", "loongson,ls2k0500-nand-controller", "loongson,ls2k1000-nand-controller"

Rule 2

Array item rules (items)

Item 1

Allowed values (enum): "loongson,ls1a-nand-controller"

Item 2

Exact value (const): "loongson,ls1b-nand-controller"

reg — required here #

Minimum number of items (minItems): 2

Maximum number of items (maxItems): 3

reg-names — required here #

Minimum number of items (minItems): 2

Array item rules (items) #

Item 1

Exact value (const): "nand"

Item 2

Exact value (const): "nand-dma"

Item 3

Exact value (const): "dma-config"

dmas — required here #

Maximum number of items (maxItems): 1

dma-names — required here #

Exact value (const): "rxtx"

Required in this object (required): "compatible", "reg", "reg-names", "dmas", "dma-names"

Properties not evaluated by applicable rules (unevaluatedProperties) #

false

Not allowed by this rule.

Condition (if) #

Properties and child nodes (properties) #

compatible — not listed as required here #

Rule for matching array elements (contains)

Allowed values (enum): "loongson,ls2k1000-nand-controller"

When the condition matches (then) #

Properties and child nodes (properties) #

reg — not listed as required here #

Minimum number of items (minItems): 3

reg-names — not listed as required here #

Minimum number of items (minItems): 3

When the condition does not match (else) #

Properties and child nodes (properties) #

reg — not listed as required here #

Maximum number of items (maxItems): 2

reg-names — not listed as required here #

Maximum number of items (maxItems): 2

Examples (examples) #

nand-controller@1fe78000 {
    compatible = "loongson,ls1b-nand-controller";
    reg = <0x1fe78000 0x24>, <0x1fe78040 0x4>;
    reg-names = "nand", "nand-dma";
    dmas = <&dma 0>;
    dma-names = "rxtx";
    #address-cells = <1>;
    #size-cells = <0>;

    nand@0 {
        reg = <0>;
        label = "ls1x-nand";
        nand-use-soft-ecc-engine;
        nand-ecc-algo = "hamming";
    };
};
nand-controller@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@0 {
        reg = <0>;
        label = "ls2k1000-nand";
        nand-use-soft-ecc-engine;
        nand-ecc-algo = "bch";
        nand-ecc-strength = <8>;
        nand-ecc-step-size = <512>;
    };
};

Source notes #

Annotations retained from the schema source

Line 1: SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)

Edit this page