Rockchip SoCs NAND FLASH Controller (NFC)

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

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

All of these rules must match (allOf) #

Rule 1 #

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

Maintainers (maintainers): "Heiko Stuebner <heiko@sntech.de>"

Properties and child nodes (properties) #

compatible — required here #

Exactly one of these rules must match (oneOf) #

Rule 1

Exact value (const): "rockchip,px30-nfc"

Rule 2

Exact value (const): "rockchip,rk2928-nfc"

Rule 3

Exact value (const): "rockchip,rv1108-nfc"

Rule 4

Array item rules (items)

Item 1

Allowed values (enum): "rockchip,rk3036-nfc", "rockchip,rk3128-nfc"

Item 2

Exact value (const): "rockchip,rk2928-nfc"

Rule 5

Array item rules (items)

Item 1

Exact value (const): "rockchip,rk3308-nfc"

Item 2

Exact value (const): "rockchip,rv1108-nfc"

reg — required here #

Maximum number of items (maxItems): 1

interrupts — required here #

Maximum number of items (maxItems): 1

clocks — required here #

Minimum number of items (minItems): 1

Array item rules (items) #

Item 1

Bus Clock

Item 2

Module Clock

clock-names — required here #

Minimum number of items (minItems): 1

Array item rules (items) #

Item 1

Exact value (const): "ahb"

Item 2

Exact value (const): "nfc"

assigned-clocks — not listed as required here #

Maximum number of items (maxItems): 1

assigned-clock-rates — not listed as required here #

Maximum number of items (maxItems): 1

power-domains — not listed as required here #

Maximum number of items (maxItems): 1

Properties matching a name pattern (patternProperties) #

^nand@[0-7]$ — name matches this regular expression #

Value type (type): "object"

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

Properties and child nodes (properties) #

reg — not listed as required here

Minimum value (minimum): 0

Maximum value (maximum): 7

nand-ecc-mode — not listed as required here

Exact value (const): "hw"

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

Exact value (const): 1024

nand-ecc-strength — not listed as required here

Allowed values (enum): 16, 24, 40, 60, 70

The ECC configurations that can be supported are as follows.
  NFC v600 ECC 16, 24, 40, 60
    RK2928, RK3066, RK3188
  NFC v622 ECC 16, 24, 40, 60
    RK3036, RK3128
  NFC v800 ECC 16
    RK3308, RV1108
  NFC v900 ECC 16, 40, 60, 70
    RK3326, PX30

nand-bus-width — not listed as required here

Exact value (const): 8

rockchip,boot-blks — not listed as required here

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

Minimum value (minimum): 2

Default value (default): 16

The NFC driver need this information to select ECC algorithms supported by the boot ROM. Only used in combination with 'nand-is-boot-medium'.

rockchip,boot-ecc-strength — not listed as required here

Allowed values (enum): 16, 24, 40, 60, 70

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

If specified it indicates that a different BCH/ECC setting is
supported by the boot ROM.
  NFC v600 ECC 16, 24
    RK2928, RK3066, RK3188
  NFC v622 ECC 16, 24, 40, 60
    RK3036, RK3128
  NFC v800 ECC 16
    RK3308, RV1108
  NFC v900 ECC 16, 70
    RK3326, PX30

Only used in combination with 'nand-is-boot-medium'.

Properties not evaluated by applicable rules (unevaluatedProperties) #

false

Not allowed by this rule.

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

Properties not evaluated by applicable rules (unevaluatedProperties) #

false

Not allowed by this rule.

Examples (examples) #

#include <dt-bindings/clock/rk3308-cru.h>
#include <dt-bindings/interrupt-controller/arm-gic.h>
nfc: nand-controller@ff4b0000 {
  compatible = "rockchip,rk3308-nfc",
               "rockchip,rv1108-nfc";
  reg = <0xff4b0000 0x4000>;
  interrupts = <GIC_SPI 81 IRQ_TYPE_LEVEL_HIGH>;
  clocks = <&cru HCLK_NANDC>, <&cru SCLK_NANDC>;
  clock-names = "ahb", "nfc";
  assigned-clocks = <&clks SCLK_NANDC>;
  assigned-clock-rates = <150000000>;

  pinctrl-0 = <&flash_ale &flash_bus8 &flash_cle &flash_csn0
               &flash_rdn &flash_rdy &flash_wrn>;
  pinctrl-names = "default";

  #address-cells = <1>;
  #size-cells = <0>;

  nand@0 {
    reg = <0>;
    label = "rk-nand";
    nand-bus-width = <8>;
    nand-ecc-mode = "hw";
    nand-ecc-step-size = <1024>;
    nand-ecc-strength = <16>;
    nand-is-boot-medium;
    rockchip,boot-blks = <8>;
    rockchip,boot-ecc-strength = <16>;
  };
};

Source notes #

Annotations retained from the schema source

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

Edit this page