18cc087a1SEmmanuel Vadot# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) 28cc087a1SEmmanuel Vadot%YAML 1.2 38cc087a1SEmmanuel Vadot--- 48cc087a1SEmmanuel Vadot$id: http://devicetree.org/schemas/memory-controllers/ti,gpmc.yaml# 58cc087a1SEmmanuel Vadot$schema: http://devicetree.org/meta-schemas/core.yaml# 68cc087a1SEmmanuel Vadot 78bab661aSEmmanuel Vadottitle: Texas Instruments GPMC Memory Controller 88cc087a1SEmmanuel Vadot 98cc087a1SEmmanuel Vadotmaintainers: 108cc087a1SEmmanuel Vadot - Tony Lindgren <tony@atomide.com> 118cc087a1SEmmanuel Vadot - Roger Quadros <rogerq@kernel.org> 128cc087a1SEmmanuel Vadot 138cc087a1SEmmanuel Vadotdescription: 148cc087a1SEmmanuel Vadot The GPMC is a unified memory controller dedicated for interfacing 158cc087a1SEmmanuel Vadot with external memory devices like 168cc087a1SEmmanuel Vadot - Asynchronous SRAM-like memories and ASICs 178cc087a1SEmmanuel Vadot - Asynchronous, synchronous, and page mode burst NOR flash 188cc087a1SEmmanuel Vadot - NAND flash 198cc087a1SEmmanuel Vadot - Pseudo-SRAM devices 208cc087a1SEmmanuel Vadot 218cc087a1SEmmanuel Vadotproperties: 228cc087a1SEmmanuel Vadot compatible: 238cc087a1SEmmanuel Vadot items: 248cc087a1SEmmanuel Vadot - enum: 258cc087a1SEmmanuel Vadot - ti,am3352-gpmc 26e67e8565SEmmanuel Vadot - ti,am64-gpmc 278cc087a1SEmmanuel Vadot - ti,omap2420-gpmc 288cc087a1SEmmanuel Vadot - ti,omap2430-gpmc 298cc087a1SEmmanuel Vadot - ti,omap3430-gpmc 308cc087a1SEmmanuel Vadot - ti,omap4430-gpmc 318cc087a1SEmmanuel Vadot 328cc087a1SEmmanuel Vadot reg: 33e67e8565SEmmanuel Vadot minItems: 1 34e67e8565SEmmanuel Vadot maxItems: 2 35e67e8565SEmmanuel Vadot 36e67e8565SEmmanuel Vadot reg-names: 37e67e8565SEmmanuel Vadot items: 38e67e8565SEmmanuel Vadot - const: cfg 39e67e8565SEmmanuel Vadot - const: data 408cc087a1SEmmanuel Vadot 418cc087a1SEmmanuel Vadot interrupts: 428cc087a1SEmmanuel Vadot maxItems: 1 438cc087a1SEmmanuel Vadot 448cc087a1SEmmanuel Vadot clocks: 458cc087a1SEmmanuel Vadot maxItems: 1 468cc087a1SEmmanuel Vadot description: | 478cc087a1SEmmanuel Vadot Functional clock. Used for bus timing calculations and 488cc087a1SEmmanuel Vadot GPMC configuration. 498cc087a1SEmmanuel Vadot 508cc087a1SEmmanuel Vadot clock-names: 518cc087a1SEmmanuel Vadot items: 528cc087a1SEmmanuel Vadot - const: fck 538cc087a1SEmmanuel Vadot 54e67e8565SEmmanuel Vadot power-domains: 55e67e8565SEmmanuel Vadot maxItems: 1 56e67e8565SEmmanuel Vadot 578cc087a1SEmmanuel Vadot dmas: 588cc087a1SEmmanuel Vadot items: 598cc087a1SEmmanuel Vadot - description: DMA channel for GPMC NAND prefetch 608cc087a1SEmmanuel Vadot 618cc087a1SEmmanuel Vadot dma-names: 628cc087a1SEmmanuel Vadot items: 638cc087a1SEmmanuel Vadot - const: rxtx 648cc087a1SEmmanuel Vadot 658cc087a1SEmmanuel Vadot "#address-cells": true 668cc087a1SEmmanuel Vadot 678cc087a1SEmmanuel Vadot "#size-cells": true 688cc087a1SEmmanuel Vadot 698cc087a1SEmmanuel Vadot gpmc,num-cs: 708cc087a1SEmmanuel Vadot description: maximum number of supported chip-select lines. 718cc087a1SEmmanuel Vadot $ref: /schemas/types.yaml#/definitions/uint32 728cc087a1SEmmanuel Vadot 738cc087a1SEmmanuel Vadot gpmc,num-waitpins: 748cc087a1SEmmanuel Vadot description: maximum number of supported wait pins. 758cc087a1SEmmanuel Vadot $ref: /schemas/types.yaml#/definitions/uint32 768cc087a1SEmmanuel Vadot 778cc087a1SEmmanuel Vadot ranges: 788cc087a1SEmmanuel Vadot minItems: 1 798cc087a1SEmmanuel Vadot description: | 808cc087a1SEmmanuel Vadot Must be set up to reflect the memory layout with four 818cc087a1SEmmanuel Vadot integer values for each chip-select line in use, 828cc087a1SEmmanuel Vadot <cs-number> 0 <physical address of mapping> <size> 838cc087a1SEmmanuel Vadot items: 848cc087a1SEmmanuel Vadot - description: NAND bank 0 858cc087a1SEmmanuel Vadot - description: NOR/SRAM bank 0 868cc087a1SEmmanuel Vadot - description: NOR/SRAM bank 1 878cc087a1SEmmanuel Vadot 888cc087a1SEmmanuel Vadot '#interrupt-cells': 898cc087a1SEmmanuel Vadot const: 2 908cc087a1SEmmanuel Vadot 918cc087a1SEmmanuel Vadot interrupt-controller: 928cc087a1SEmmanuel Vadot description: | 93cb7aa33aSEmmanuel Vadot The GPMC driver implements an interrupt controller for 948cc087a1SEmmanuel Vadot the NAND events "fifoevent" and "termcount" plus the 958cc087a1SEmmanuel Vadot rising/falling edges on the GPMC_WAIT pins. 968cc087a1SEmmanuel Vadot The interrupt number mapping is as follows 978cc087a1SEmmanuel Vadot 0 - NAND_fifoevent 988cc087a1SEmmanuel Vadot 1 - NAND_termcount 998cc087a1SEmmanuel Vadot 2 - GPMC_WAIT0 pin edge 1008cc087a1SEmmanuel Vadot 3 - GPMC_WAIT1 pin edge, and so on. 1018cc087a1SEmmanuel Vadot 1028cc087a1SEmmanuel Vadot '#gpio-cells': 1038cc087a1SEmmanuel Vadot const: 2 1048cc087a1SEmmanuel Vadot 1058cc087a1SEmmanuel Vadot gpio-controller: 1068cc087a1SEmmanuel Vadot description: | 1078cc087a1SEmmanuel Vadot The GPMC driver implements a GPIO controller for the 1088cc087a1SEmmanuel Vadot GPMC WAIT pins that can be used as general purpose inputs. 1098cc087a1SEmmanuel Vadot 0 maps to GPMC_WAIT0 pin. 1108cc087a1SEmmanuel Vadot 1118cc087a1SEmmanuel Vadot ti,hwmods: 1128cc087a1SEmmanuel Vadot description: 1138cc087a1SEmmanuel Vadot Name of the HWMOD associated with GPMC. This is for legacy 1148cc087a1SEmmanuel Vadot omap2/3 platforms only. 1158cc087a1SEmmanuel Vadot $ref: /schemas/types.yaml#/definitions/string 1168cc087a1SEmmanuel Vadot deprecated: true 1178cc087a1SEmmanuel Vadot 1188cc087a1SEmmanuel Vadot ti,no-idle-on-init: 1198cc087a1SEmmanuel Vadot description: 1208cc087a1SEmmanuel Vadot Prevent idling the module at init. This is for legacy omap2/3 1218cc087a1SEmmanuel Vadot platforms only. 1228cc087a1SEmmanuel Vadot type: boolean 1238cc087a1SEmmanuel Vadot deprecated: true 1248cc087a1SEmmanuel Vadot 1258cc087a1SEmmanuel VadotpatternProperties: 1268cc087a1SEmmanuel Vadot "@[0-7],[a-f0-9]+$": 1278cc087a1SEmmanuel Vadot type: object 1288cc087a1SEmmanuel Vadot description: | 1298cc087a1SEmmanuel Vadot The child device node represents the device connected to the GPMC 1308cc087a1SEmmanuel Vadot bus. The device can be a NAND chip, SRAM device, NOR device 1318cc087a1SEmmanuel Vadot or an ASIC. 132f126890aSEmmanuel Vadot $ref: ti,gpmc-child.yaml 133*84943d6fSEmmanuel Vadot additionalProperties: true 1348cc087a1SEmmanuel Vadot 1358cc087a1SEmmanuel Vadotrequired: 1368cc087a1SEmmanuel Vadot - compatible 1378cc087a1SEmmanuel Vadot - reg 1388cc087a1SEmmanuel Vadot - gpmc,num-cs 1398cc087a1SEmmanuel Vadot - gpmc,num-waitpins 1408cc087a1SEmmanuel Vadot - "#address-cells" 1418cc087a1SEmmanuel Vadot - "#size-cells" 1428cc087a1SEmmanuel Vadot 143e67e8565SEmmanuel VadotallOf: 144e67e8565SEmmanuel Vadot - if: 145e67e8565SEmmanuel Vadot properties: 146e67e8565SEmmanuel Vadot compatible: 147e67e8565SEmmanuel Vadot contains: 148e67e8565SEmmanuel Vadot const: ti,am64-gpmc 149e67e8565SEmmanuel Vadot then: 150e67e8565SEmmanuel Vadot required: 151e67e8565SEmmanuel Vadot - reg-names 152e67e8565SEmmanuel Vadot - power-domains 153e67e8565SEmmanuel Vadot 1548cc087a1SEmmanuel VadotadditionalProperties: false 1558cc087a1SEmmanuel Vadot 1568cc087a1SEmmanuel Vadotexamples: 1578cc087a1SEmmanuel Vadot - | 1588cc087a1SEmmanuel Vadot #include <dt-bindings/interrupt-controller/arm-gic.h> 1598cc087a1SEmmanuel Vadot #include <dt-bindings/gpio/gpio.h> 1608cc087a1SEmmanuel Vadot 1618cc087a1SEmmanuel Vadot gpmc: memory-controller@50000000 { 1628cc087a1SEmmanuel Vadot compatible = "ti,am3352-gpmc"; 1638cc087a1SEmmanuel Vadot reg = <0x50000000 0x2000>; 1648cc087a1SEmmanuel Vadot interrupts = <100>; 1658cc087a1SEmmanuel Vadot clocks = <&l3s_clkctrl>; 1668cc087a1SEmmanuel Vadot clock-names = "fck"; 1678cc087a1SEmmanuel Vadot dmas = <&edma 52 0>; 1688cc087a1SEmmanuel Vadot dma-names = "rxtx"; 1698cc087a1SEmmanuel Vadot gpmc,num-cs = <8>; 1708cc087a1SEmmanuel Vadot gpmc,num-waitpins = <2>; 1718cc087a1SEmmanuel Vadot #address-cells = <2>; 1728cc087a1SEmmanuel Vadot #size-cells = <1>; 1738cc087a1SEmmanuel Vadot ranges = <0 0 0x08000000 0x10000000>; /* CS0 @addr 0x8000000, size 0x10000000 */ 1748cc087a1SEmmanuel Vadot interrupt-controller; 1758cc087a1SEmmanuel Vadot #interrupt-cells = <2>; 1768cc087a1SEmmanuel Vadot gpio-controller; 1778cc087a1SEmmanuel Vadot #gpio-cells = <2>; 1788cc087a1SEmmanuel Vadot 1798cc087a1SEmmanuel Vadot nand@0,0 { 1808cc087a1SEmmanuel Vadot compatible = "ti,omap2-nand"; 1818cc087a1SEmmanuel Vadot reg = <0 0 4>; 1828cc087a1SEmmanuel Vadot interrupt-parent = <&gpmc>; 1838cc087a1SEmmanuel Vadot interrupts = <0 IRQ_TYPE_NONE>, /* fifoevent */ 1848cc087a1SEmmanuel Vadot <1 IRQ_TYPE_NONE>; /* termcount */ 1858cc087a1SEmmanuel Vadot ti,nand-xfer-type = "prefetch-dma"; 1868cc087a1SEmmanuel Vadot ti,nand-ecc-opt = "bch16"; 1878cc087a1SEmmanuel Vadot ti,elm-id = <&elm>; 1888cc087a1SEmmanuel Vadot rb-gpios = <&gpmc 0 GPIO_ACTIVE_HIGH>; /* gpmc_wait0 pin */ 1898cc087a1SEmmanuel Vadot }; 1908cc087a1SEmmanuel Vadot }; 191