1207753Smm# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) 2207753Smm%YAML 1.2 3207753Smm--- 4207753Smm$id: http://devicetree.org/schemas/mtd/ti,gpmc-nand.yaml# 5207753Smm$schema: http://devicetree.org/meta-schemas/core.yaml# 6207753Smm 7207753Smmtitle: Texas Instruments GPMC NAND Flash controller. 8207753Smm 9207753Smmmaintainers: 10207753Smm - Tony Lindgren <tony@atomide.com> 11207753Smm - Roger Quadros <rogerq@kernel.org> 12207753Smm 13207753Smmdescription: 14207753Smm GPMC NAND controller/Flash is represented as a child of the 15207753Smm GPMC controller node. 16207753Smm 17207753Smmproperties: 18207753Smm compatible: 19207753Smm items: 20207753Smm - enum: 21207753Smm - ti,am64-nand 22207753Smm - ti,omap2-nand 23207753Smm 24207753Smm reg: 25207753Smm maxItems: 1 26207753Smm 27207753Smm interrupts: 28207753Smm items: 29207753Smm - description: Interrupt for fifoevent 30207753Smm - description: Interrupt for termcount 31207753Smm 32207753Smm "#address-cells": true 33207753Smm 34207753Smm "#size-cells": true 35207753Smm 36207753Smm ti,nand-ecc-opt: 37207753Smm description: Desired ECC algorithm 38207753Smm $ref: /schemas/types.yaml#/definitions/string 39207753Smm enum: [sw, ham1, bch4, bch8, bch16] 40207753Smm 41207753Smm ti,nand-xfer-type: 42207753Smm description: Data transfer method between controller and chip. 43207753Smm $ref: /schemas/types.yaml#/definitions/string 44207753Smm enum: [prefetch-polled, polled, prefetch-dma, prefetch-irq] 45207753Smm default: prefetch-polled 46207753Smm 47207753Smm ti,elm-id: 48207753Smm description: 49207753Smm phandle to the ELM (Error Location Module). 50207753Smm $ref: /schemas/types.yaml#/definitions/phandle 51207753Smm 52207753Smm nand-bus-width: 53207753Smm description: 54207753Smm Bus width to the NAND chip 55207753Smm $ref: /schemas/types.yaml#/definitions/uint32 56207753Smm enum: [8, 16] 57207753Smm default: 8 58207753Smm 59207753Smm rb-gpios: 60207753Smm description: 61207753Smm GPIO connection to R/B signal from NAND chip 62207753Smm maxItems: 1 63207753Smm 64207753SmmpatternProperties: 65207753Smm "@[0-9a-f]+$": 66207753Smm $ref: /schemas/mtd/partitions/partition.yaml 67207753Smm 68207753SmmallOf: 69207753Smm - $ref: /schemas/memory-controllers/ti,gpmc-child.yaml 70207753Smm 71207753Smmrequired: 72207753Smm - compatible 73207753Smm - reg 74207753Smm - ti,nand-ecc-opt 75207753Smm 76207753SmmunevaluatedProperties: false 77207753Smm 78207753Smmexamples: 79207753Smm - | 80207753Smm #include <dt-bindings/interrupt-controller/arm-gic.h> 81207753Smm #include <dt-bindings/gpio/gpio.h> 82207753Smm 83207753Smm gpmc: memory-controller@50000000 { 84207753Smm compatible = "ti,am3352-gpmc"; 85207753Smm dmas = <&edma 52 0>; 86207753Smm dma-names = "rxtx"; 87207753Smm clocks = <&l3s_gclk>; 88207753Smm clock-names = "fck"; 89207753Smm reg = <0x50000000 0x2000>; 90207753Smm interrupts = <GIC_SPI 100 IRQ_TYPE_LEVEL_HIGH>; 91207753Smm gpmc,num-cs = <7>; 92207753Smm gpmc,num-waitpins = <2>; 93207753Smm #address-cells = <2>; 94207753Smm #size-cells = <1>; 95207753Smm interrupt-controller; 96207753Smm #interrupt-cells = <2>; 97207753Smm gpio-controller; 98207753Smm #gpio-cells = <2>; 99207753Smm 100207753Smm ranges = <0 0 0x08000000 0x01000000>; /* CS0 space. Min partition = 16MB */ 101207753Smm nand@0,0 { 102207753Smm compatible = "ti,omap2-nand"; 103207753Smm reg = <0 0 4>; /* device IO registers */ 104207753Smm interrupt-parent = <&gpmc>; 105207753Smm interrupts = <0 IRQ_TYPE_NONE>, /* fifoevent */ 106207753Smm <1 IRQ_TYPE_NONE>; /* termcount */ 107207753Smm ti,nand-xfer-type = "prefetch-dma"; 108207753Smm ti,nand-ecc-opt = "bch16"; 109207753Smm ti,elm-id = <&elm>; 110207753Smm #address-cells = <1>; 111207753Smm #size-cells = <1>; 112207753Smm 113207753Smm /* NAND generic properties */ 114207753Smm nand-bus-width = <8>; 115207753Smm rb-gpios = <&gpmc 0 GPIO_ACTIVE_HIGH>; /* gpmc_wait0 */ 116207753Smm 117207753Smm /* GPMC properties*/ 118207753Smm gpmc,device-width = <1>; 119207753Smm 120207753Smm partition@0 { 121207753Smm label = "NAND.SPL"; 122207753Smm reg = <0x00000000 0x00040000>; 123207753Smm }; 124207753Smm partition@1 { 125207753Smm label = "NAND.SPL.backup1"; 126207753Smm reg = <0x00040000 0x00040000>; 127207753Smm }; 128207753Smm }; 129207753Smm }; 130207753Smm