MediaTek(MTK) SoCs raw NAND FLASH controller (NFC)

Schema identifier ($id): "http://devicetree.org/schemas/mtd/mediatek,mtk-nfc.yaml#"

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

Maintainers (maintainers): "Xiangsheng Hou <xiangsheng.hou@mediatek.com>"

Properties and child nodes (properties) #

compatible — required here #

Allowed values (enum): "mediatek,mt2701-nfc", "mediatek,mt2712-nfc", "mediatek,mt7622-nfc"

reg — required here #

Array item rules (items) #

Item 1

Base physical address and size of NFI.

interrupts — required here #

Array item rules (items) #

Item 1

NFI interrupt

clocks — required here #

Array item rules (items) #

Item 1

clock used for the controller

Item 2

clock used for the pad

clock-names — required here #

Array item rules (items) #

Item 1

Exact value (const): "nfi_clk"

Item 2

Exact value (const): "pad_clk"

ecc-engine — required here #

device-tree node of the required ECC engine.

Shared schema rule ($ref): /schemas/types.yaml#/definitions/phandle

Properties matching a name pattern (patternProperties) #

^nand@[a-f0-9]$ — name matches this regular expression #

Shared schema rule ($ref): raw-nand-chip.yaml#

Properties not evaluated by applicable rules (unevaluatedProperties) #

false

Not allowed by this rule.

Properties and child nodes (properties) #

reg — not listed as required here

Maximum value (maximum): 1

nand-ecc-mode — not listed as required here

Exact value (const): "hw"

All of these rules must match (allOf) #

Rule 1 #

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

Rule 2 #

Condition (if) #

Properties and child nodes (properties)

compatible — not listed as required here

Rule for matching array elements (contains)

Exact value (const): "mediatek,mt2701-nfc"

When the condition matches (then) #

Properties matching a name pattern (patternProperties)

^nand@[a-f0-9]$ — name matches this regular expression

Properties and child nodes (properties)

nand-ecc-step-size — not listed as required here

Allowed values (enum): 512, 1024

nand-ecc-strength — not listed as required here

Allowed values (enum): 4, 6, 8, 10, 12, 14, 16, 18, 20, 22, 24, 28, 32, 36, 40, 44, 48, 52, 56, 60

Rule 3 #

Condition (if) #

Properties and child nodes (properties)

compatible — not listed as required here

Rule for matching array elements (contains)

Exact value (const): "mediatek,mt2712-nfc"

When the condition matches (then) #

Properties matching a name pattern (patternProperties)

^nand@[a-f0-9]$ — name matches this regular expression

Properties and child nodes (properties)

nand-ecc-step-size — not listed as required here

Allowed values (enum): 512, 1024

nand-ecc-strength — not listed as required here

Allowed values (enum): 4, 6, 8, 10, 12, 14, 16, 18, 20, 22, 24, 28, 32, 36, 40, 44, 48, 52, 56, 60, 68, 72, 80

Rule 4 #

Condition (if) #

Properties and child nodes (properties)

compatible — not listed as required here

Rule for matching array elements (contains)

Exact value (const): "mediatek,mt7622-nfc"

When the condition matches (then) #

Properties matching a name pattern (patternProperties)

^nand@[a-f0-9]$ — name matches this regular expression

Properties and child nodes (properties)

nand-ecc-step-size — not listed as required here

Exact value (const): 512

nand-ecc-strength — not listed as required here

Allowed values (enum): 4, 6, 8, 10, 12

Required in this object (required): "compatible", "reg", "interrupts", "clocks", "clock-names", "ecc-engine"

Properties not evaluated by applicable rules (unevaluatedProperties) #

false

Not allowed by this rule.

Examples (examples) #

#include <dt-bindings/clock/mt2701-clk.h>
#include <dt-bindings/interrupt-controller/arm-gic.h>
#include <dt-bindings/interrupt-controller/irq.h>

soc {
    #address-cells = <2>;
    #size-cells = <2>;

    nand-controller@1100d000 {
        compatible = "mediatek,mt2701-nfc";
        reg = <0 0x1100d000 0 0x1000>;
        interrupts = <GIC_SPI 56 IRQ_TYPE_LEVEL_LOW>;
        clocks = <&pericfg CLK_PERI_NFI>,
                 <&pericfg CLK_PERI_NFI_PAD>;
        clock-names = "nfi_clk", "pad_clk";
        ecc-engine = <&bch>;
        #address-cells = <1>;
        #size-cells = <0>;

        nand@0 {
            reg = <0>;

            nand-on-flash-bbt;
            nand-ecc-mode = "hw";
            nand-ecc-step-size = <1024>;
            nand-ecc-strength = <24>;

            partitions {
                compatible = "fixed-partitions";
                #address-cells = <1>;
                #size-cells = <1>;

                preloader@0 {
                    label = "pl";
                    read-only;
                    reg = <0x0 0x400000>;
                };
                android@400000 {
                    label = "android";
                    reg = <0x400000 0x12c00000>;
                };
            };
        };
    };
};

Source notes #

Annotations retained from the schema source

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

Edit this page