102e107e8SRoger Quadros# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) 202e107e8SRoger Quadros%YAML 1.2 302e107e8SRoger Quadros--- 402e107e8SRoger Quadros$id: http://devicetree.org/schemas/mtd/ti,gpmc-nand.yaml# 502e107e8SRoger Quadros$schema: http://devicetree.org/meta-schemas/core.yaml# 602e107e8SRoger Quadros 702e107e8SRoger Quadrostitle: Texas Instruments GPMC NAND Flash controller. 802e107e8SRoger Quadros 902e107e8SRoger Quadrosmaintainers: 1002e107e8SRoger Quadros - Tony Lindgren <tony@atomide.com> 1102e107e8SRoger Quadros - Roger Quadros <rogerq@kernel.org> 1202e107e8SRoger Quadros 1302e107e8SRoger Quadrosdescription: 1402e107e8SRoger Quadros GPMC NAND controller/Flash is represented as a child of the 1502e107e8SRoger Quadros GPMC controller node. 1602e107e8SRoger Quadros 1702e107e8SRoger Quadrosproperties: 1802e107e8SRoger Quadros compatible: 1902e107e8SRoger Quadros const: ti,omap2-nand 2002e107e8SRoger Quadros 2102e107e8SRoger Quadros reg: 2202e107e8SRoger Quadros maxItems: 1 2302e107e8SRoger Quadros 2402e107e8SRoger Quadros interrupts: 2502e107e8SRoger Quadros items: 2602e107e8SRoger Quadros - description: Interrupt for fifoevent 2702e107e8SRoger Quadros - description: Interrupt for termcount 2802e107e8SRoger Quadros 2902e107e8SRoger Quadros "#address-cells": true 3002e107e8SRoger Quadros 3102e107e8SRoger Quadros "#size-cells": true 3202e107e8SRoger Quadros 3302e107e8SRoger Quadros ti,nand-ecc-opt: 3402e107e8SRoger Quadros description: Desired ECC algorithm 3502e107e8SRoger Quadros $ref: /schemas/types.yaml#/definitions/string 3602e107e8SRoger Quadros enum: [sw, ham1, bch4, bch8, bch16] 3702e107e8SRoger Quadros 3802e107e8SRoger Quadros ti,nand-xfer-type: 3902e107e8SRoger Quadros description: Data transfer method between controller and chip. 4002e107e8SRoger Quadros $ref: /schemas/types.yaml#/definitions/string 4102e107e8SRoger Quadros enum: [prefetch-polled, polled, prefetch-dma, prefetch-irq] 4202e107e8SRoger Quadros default: prefetch-polled 4302e107e8SRoger Quadros 4402e107e8SRoger Quadros ti,elm-id: 4502e107e8SRoger Quadros description: 4602e107e8SRoger Quadros phandle to the ELM (Error Location Module). 4702e107e8SRoger Quadros $ref: /schemas/types.yaml#/definitions/phandle 4802e107e8SRoger Quadros 4902e107e8SRoger Quadros nand-bus-width: 5002e107e8SRoger Quadros description: 5102e107e8SRoger Quadros Bus width to the NAND chip 5202e107e8SRoger Quadros $ref: /schemas/types.yaml#/definitions/uint32 5302e107e8SRoger Quadros enum: [8, 16] 5402e107e8SRoger Quadros default: 8 5502e107e8SRoger Quadros 56*c14e281aSRob Herring rb-gpios: 57*c14e281aSRob Herring description: 58*c14e281aSRob Herring GPIO connection to R/B signal from NAND chip 59*c14e281aSRob Herring maxItems: 1 60*c14e281aSRob Herring 6102e107e8SRoger QuadrospatternProperties: 6202e107e8SRoger Quadros "@[0-9a-f]+$": 6302e107e8SRoger Quadros $ref: "/schemas/mtd/partitions/partition.yaml" 6402e107e8SRoger Quadros 6502e107e8SRoger QuadrosallOf: 6602e107e8SRoger Quadros - $ref: "/schemas/memory-controllers/ti,gpmc-child.yaml" 6702e107e8SRoger Quadros 6802e107e8SRoger Quadrosrequired: 6902e107e8SRoger Quadros - compatible 7002e107e8SRoger Quadros - reg 7102e107e8SRoger Quadros - ti,nand-ecc-opt 7202e107e8SRoger Quadros 7302e107e8SRoger QuadrosunevaluatedProperties: false 7402e107e8SRoger Quadros 7502e107e8SRoger Quadrosexamples: 7602e107e8SRoger Quadros - | 7702e107e8SRoger Quadros #include <dt-bindings/interrupt-controller/arm-gic.h> 7802e107e8SRoger Quadros #include <dt-bindings/gpio/gpio.h> 7902e107e8SRoger Quadros 8002e107e8SRoger Quadros gpmc: memory-controller@50000000 { 8102e107e8SRoger Quadros compatible = "ti,am3352-gpmc"; 8202e107e8SRoger Quadros dmas = <&edma 52 0>; 8302e107e8SRoger Quadros dma-names = "rxtx"; 8402e107e8SRoger Quadros clocks = <&l3s_gclk>; 8502e107e8SRoger Quadros clock-names = "fck"; 8602e107e8SRoger Quadros reg = <0x50000000 0x2000>; 8702e107e8SRoger Quadros interrupts = <GIC_SPI 100 IRQ_TYPE_LEVEL_HIGH>; 8802e107e8SRoger Quadros gpmc,num-cs = <7>; 8902e107e8SRoger Quadros gpmc,num-waitpins = <2>; 9002e107e8SRoger Quadros #address-cells = <2>; 9102e107e8SRoger Quadros #size-cells = <1>; 9202e107e8SRoger Quadros interrupt-controller; 9302e107e8SRoger Quadros #interrupt-cells = <2>; 9402e107e8SRoger Quadros gpio-controller; 9502e107e8SRoger Quadros #gpio-cells = <2>; 9602e107e8SRoger Quadros 9702e107e8SRoger Quadros ranges = <0 0 0x08000000 0x01000000>; /* CS0 space. Min partition = 16MB */ 9802e107e8SRoger Quadros nand@0,0 { 9902e107e8SRoger Quadros compatible = "ti,omap2-nand"; 10002e107e8SRoger Quadros reg = <0 0 4>; /* device IO registers */ 10102e107e8SRoger Quadros interrupt-parent = <&gpmc>; 10202e107e8SRoger Quadros interrupts = <0 IRQ_TYPE_NONE>, /* fifoevent */ 10302e107e8SRoger Quadros <1 IRQ_TYPE_NONE>; /* termcount */ 10402e107e8SRoger Quadros ti,nand-xfer-type = "prefetch-dma"; 10502e107e8SRoger Quadros ti,nand-ecc-opt = "bch16"; 10602e107e8SRoger Quadros ti,elm-id = <&elm>; 10702e107e8SRoger Quadros #address-cells = <1>; 10802e107e8SRoger Quadros #size-cells = <1>; 10902e107e8SRoger Quadros 11002e107e8SRoger Quadros /* NAND generic properties */ 11102e107e8SRoger Quadros nand-bus-width = <8>; 11202e107e8SRoger Quadros rb-gpios = <&gpmc 0 GPIO_ACTIVE_HIGH>; /* gpmc_wait0 */ 11302e107e8SRoger Quadros 11402e107e8SRoger Quadros /* GPMC properties*/ 11502e107e8SRoger Quadros gpmc,device-width = <1>; 11602e107e8SRoger Quadros 11702e107e8SRoger Quadros partition@0 { 11802e107e8SRoger Quadros label = "NAND.SPL"; 11902e107e8SRoger Quadros reg = <0x00000000 0x00040000>; 12002e107e8SRoger Quadros }; 12102e107e8SRoger Quadros partition@1 { 12202e107e8SRoger Quadros label = "NAND.SPL.backup1"; 12302e107e8SRoger Quadros reg = <0x00040000 0x00040000>; 12402e107e8SRoger Quadros }; 12502e107e8SRoger Quadros }; 12602e107e8SRoger Quadros }; 127