Texas Instruments GPMC NAND Flash controller.

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

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

Maintainers (maintainers): "Tony Lindgren <tony@atomide.com>", "Roger Quadros <rogerq@kernel.org>"

GPMC NAND controller/Flash is represented as a child of the GPMC controller node.

Properties and child nodes (properties) #

compatible — required here #

Array item rules (items) #

Item 1

Allowed values (enum): "ti,am64-nand", "ti,omap2-nand"

reg — required here #

Maximum number of items (maxItems): 1

interrupts — not listed as required here #

Array item rules (items) #

Item 1

Interrupt for fifoevent

Item 2

Interrupt for termcount

#address-cells — not listed as required here #

true — No constraints added by this property rule.

#size-cells — not listed as required here #

true — No constraints added by this property rule.

ti,nand-ecc-opt — required here #

Desired ECC algorithm

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

Allowed values (enum): "sw", "ham1", "bch4", "bch8", "bch16"

ti,nand-xfer-type — not listed as required here #

Data transfer method between controller and chip.

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

Allowed values (enum): "prefetch-polled", "polled", "prefetch-dma", "prefetch-irq"

Default value (default): "prefetch-polled"

ti,elm-id — not listed as required here #

phandle to the ELM (Error Location Module).

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

nand-bus-width — not listed as required here #

Bus width to the NAND chip

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

Allowed values (enum): 8, 16

Default value (default): 8

rb-gpios — not listed as required here #

GPIO connection to R/B signal from NAND chip

Maximum number of items (maxItems): 1

All of these rules must match (allOf) #

Rule 1 #

Shared schema rule ($ref): /schemas/memory-controllers/ti,gpmc-child.yaml

Rule 2 #

Shared schema rule ($ref): mtd.yaml#

Required in this object (required): "compatible", "reg", "ti,nand-ecc-opt"

Properties not evaluated by applicable rules (unevaluatedProperties) #

false

Not allowed by this rule.

Examples (examples) #

#include <dt-bindings/interrupt-controller/arm-gic.h>
#include <dt-bindings/gpio/gpio.h>

gpmc: memory-controller@50000000 {
  compatible = "ti,am3352-gpmc";
  dmas = <&edma 52 0>;
  dma-names = "rxtx";
  clocks = <&l3s_gclk>;
  clock-names = "fck";
  reg = <0x50000000 0x2000>;
  interrupts = <GIC_SPI 100 IRQ_TYPE_LEVEL_HIGH>;
  gpmc,num-cs = <7>;
  gpmc,num-waitpins = <2>;
  #address-cells = <2>;
  #size-cells = <1>;
  interrupt-controller;
  #interrupt-cells = <2>;
  gpio-controller;
  #gpio-cells = <2>;

  ranges = <0 0 0x08000000 0x01000000>;   /* CS0 space. Min partition = 16MB */
  nand@0,0 {
    compatible = "ti,omap2-nand";
    reg = <0 0 4>;          /* device IO registers */
    interrupt-parent = <&gpmc>;
    interrupts = <0 IRQ_TYPE_NONE>, /* fifoevent */
                 <1 IRQ_TYPE_NONE>; /* termcount */
    ti,nand-xfer-type = "prefetch-dma";
    ti,nand-ecc-opt = "bch16";
    ti,elm-id = <&elm>;
    #address-cells = <1>;
    #size-cells = <1>;

    /* NAND generic properties */
    nand-bus-width = <8>;
    rb-gpios = <&gpmc 0 GPIO_ACTIVE_HIGH>;  /* gpmc_wait0 */

    /* GPMC properties*/
    gpmc,device-width = <1>;

    partition@0 {
      label = "NAND.SPL";
      reg = <0x00000000 0x00040000>;
    };
    partition@1 {
      label = "NAND.SPL.backup1";
      reg = <0x00040000 0x00040000>;
    };
  };
};

Source notes #

Annotations retained from the schema source

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

Edit this page