18c2ecf20Sopenharmony_ciDevice tree bindings for OMAP general purpose memory controllers (GPMC) 28c2ecf20Sopenharmony_ci 38c2ecf20Sopenharmony_ciThe actual devices are instantiated from the child nodes of a GPMC node. 48c2ecf20Sopenharmony_ci 58c2ecf20Sopenharmony_ciRequired properties: 68c2ecf20Sopenharmony_ci 78c2ecf20Sopenharmony_ci - compatible: Should be set to one of the following: 88c2ecf20Sopenharmony_ci 98c2ecf20Sopenharmony_ci ti,omap2420-gpmc (omap2420) 108c2ecf20Sopenharmony_ci ti,omap2430-gpmc (omap2430) 118c2ecf20Sopenharmony_ci ti,omap3430-gpmc (omap3430 & omap3630) 128c2ecf20Sopenharmony_ci ti,omap4430-gpmc (omap4430 & omap4460 & omap543x) 138c2ecf20Sopenharmony_ci ti,am3352-gpmc (am335x devices) 148c2ecf20Sopenharmony_ci 158c2ecf20Sopenharmony_ci - reg: A resource specifier for the register space 168c2ecf20Sopenharmony_ci (see the example below) 178c2ecf20Sopenharmony_ci - ti,hwmods: Should be set to "ti,gpmc" until the DT transition is 188c2ecf20Sopenharmony_ci completed. 198c2ecf20Sopenharmony_ci - #address-cells: Must be set to 2 to allow memory address translation 208c2ecf20Sopenharmony_ci - #size-cells: Must be set to 1 to allow CS address passing 218c2ecf20Sopenharmony_ci - gpmc,num-cs: The maximum number of chip-select lines that controller 228c2ecf20Sopenharmony_ci can support. 238c2ecf20Sopenharmony_ci - gpmc,num-waitpins: The maximum number of wait pins that controller can 248c2ecf20Sopenharmony_ci support. 258c2ecf20Sopenharmony_ci - ranges: Must be set up to reflect the memory layout with four 268c2ecf20Sopenharmony_ci integer values for each chip-select line in use: 278c2ecf20Sopenharmony_ci 288c2ecf20Sopenharmony_ci <cs-number> 0 <physical address of mapping> <size> 298c2ecf20Sopenharmony_ci 308c2ecf20Sopenharmony_ci Currently, calculated values derived from the contents 318c2ecf20Sopenharmony_ci of the per-CS register GPMC_CONFIG7 (as set up by the 328c2ecf20Sopenharmony_ci bootloader) are used for the physical address decoding. 338c2ecf20Sopenharmony_ci As this will change in the future, filling correct 348c2ecf20Sopenharmony_ci values here is a requirement. 358c2ecf20Sopenharmony_ci - interrupt-controller: The GPMC driver implements and interrupt controller for 368c2ecf20Sopenharmony_ci the NAND events "fifoevent" and "termcount" plus the 378c2ecf20Sopenharmony_ci rising/falling edges on the GPMC_WAIT pins. 388c2ecf20Sopenharmony_ci The interrupt number mapping is as follows 398c2ecf20Sopenharmony_ci 0 - NAND_fifoevent 408c2ecf20Sopenharmony_ci 1 - NAND_termcount 418c2ecf20Sopenharmony_ci 2 - GPMC_WAIT0 pin edge 428c2ecf20Sopenharmony_ci 3 - GPMC_WAIT1 pin edge, and so on. 438c2ecf20Sopenharmony_ci - interrupt-cells: Must be set to 2 448c2ecf20Sopenharmony_ci - gpio-controller: The GPMC driver implements a GPIO controller for the 458c2ecf20Sopenharmony_ci GPMC WAIT pins that can be used as general purpose inputs. 468c2ecf20Sopenharmony_ci 0 maps to GPMC_WAIT0 pin. 478c2ecf20Sopenharmony_ci - gpio-cells: Must be set to 2 488c2ecf20Sopenharmony_ci 498c2ecf20Sopenharmony_ciRequired properties when using NAND prefetch dma: 508c2ecf20Sopenharmony_ci - dmas GPMC NAND prefetch dma channel 518c2ecf20Sopenharmony_ci - dma-names Must be set to "rxtx" 528c2ecf20Sopenharmony_ci 538c2ecf20Sopenharmony_ciTiming properties for child nodes. All are optional and default to 0. 548c2ecf20Sopenharmony_ci 558c2ecf20Sopenharmony_ci - gpmc,sync-clk-ps: Minimum clock period for synchronous mode, in picoseconds 568c2ecf20Sopenharmony_ci 578c2ecf20Sopenharmony_ci Chip-select signal timings (in nanoseconds) corresponding to GPMC_CONFIG2: 588c2ecf20Sopenharmony_ci - gpmc,cs-on-ns: Assertion time 598c2ecf20Sopenharmony_ci - gpmc,cs-rd-off-ns: Read deassertion time 608c2ecf20Sopenharmony_ci - gpmc,cs-wr-off-ns: Write deassertion time 618c2ecf20Sopenharmony_ci 628c2ecf20Sopenharmony_ci ADV signal timings (in nanoseconds) corresponding to GPMC_CONFIG3: 638c2ecf20Sopenharmony_ci - gpmc,adv-on-ns: Assertion time 648c2ecf20Sopenharmony_ci - gpmc,adv-rd-off-ns: Read deassertion time 658c2ecf20Sopenharmony_ci - gpmc,adv-wr-off-ns: Write deassertion time 668c2ecf20Sopenharmony_ci - gpmc,adv-aad-mux-on-ns: Assertion time for AAD 678c2ecf20Sopenharmony_ci - gpmc,adv-aad-mux-rd-off-ns: Read deassertion time for AAD 688c2ecf20Sopenharmony_ci - gpmc,adv-aad-mux-wr-off-ns: Write deassertion time for AAD 698c2ecf20Sopenharmony_ci 708c2ecf20Sopenharmony_ci WE signals timings (in nanoseconds) corresponding to GPMC_CONFIG4: 718c2ecf20Sopenharmony_ci - gpmc,we-on-ns Assertion time 728c2ecf20Sopenharmony_ci - gpmc,we-off-ns: Deassertion time 738c2ecf20Sopenharmony_ci 748c2ecf20Sopenharmony_ci OE signals timings (in nanoseconds) corresponding to GPMC_CONFIG4: 758c2ecf20Sopenharmony_ci - gpmc,oe-on-ns: Assertion time 768c2ecf20Sopenharmony_ci - gpmc,oe-off-ns: Deassertion time 778c2ecf20Sopenharmony_ci - gpmc,oe-aad-mux-on-ns: Assertion time for AAD 788c2ecf20Sopenharmony_ci - gpmc,oe-aad-mux-off-ns: Deassertion time for AAD 798c2ecf20Sopenharmony_ci 808c2ecf20Sopenharmony_ci Access time and cycle time timings (in nanoseconds) corresponding to 818c2ecf20Sopenharmony_ci GPMC_CONFIG5: 828c2ecf20Sopenharmony_ci - gpmc,page-burst-access-ns: Multiple access word delay 838c2ecf20Sopenharmony_ci - gpmc,access-ns: Start-cycle to first data valid delay 848c2ecf20Sopenharmony_ci - gpmc,rd-cycle-ns: Total read cycle time 858c2ecf20Sopenharmony_ci - gpmc,wr-cycle-ns: Total write cycle time 868c2ecf20Sopenharmony_ci - gpmc,bus-turnaround-ns: Turn-around time between successive accesses 878c2ecf20Sopenharmony_ci - gpmc,cycle2cycle-delay-ns: Delay between chip-select pulses 888c2ecf20Sopenharmony_ci - gpmc,clk-activation-ns: GPMC clock activation time 898c2ecf20Sopenharmony_ci - gpmc,wait-monitoring-ns: Start of wait monitoring with regard to valid 908c2ecf20Sopenharmony_ci data 918c2ecf20Sopenharmony_ci 928c2ecf20Sopenharmony_ciBoolean timing parameters. If property is present parameter enabled and 938c2ecf20Sopenharmony_cidisabled if omitted: 948c2ecf20Sopenharmony_ci - gpmc,adv-extra-delay: ADV signal is delayed by half GPMC clock 958c2ecf20Sopenharmony_ci - gpmc,cs-extra-delay: CS signal is delayed by half GPMC clock 968c2ecf20Sopenharmony_ci - gpmc,cycle2cycle-diffcsen: Add "cycle2cycle-delay" between successive 978c2ecf20Sopenharmony_ci accesses to a different CS 988c2ecf20Sopenharmony_ci - gpmc,cycle2cycle-samecsen: Add "cycle2cycle-delay" between successive 998c2ecf20Sopenharmony_ci accesses to the same CS 1008c2ecf20Sopenharmony_ci - gpmc,oe-extra-delay: OE signal is delayed by half GPMC clock 1018c2ecf20Sopenharmony_ci - gpmc,we-extra-delay: WE signal is delayed by half GPMC clock 1028c2ecf20Sopenharmony_ci - gpmc,time-para-granularity: Multiply all access times by 2 1038c2ecf20Sopenharmony_ci 1048c2ecf20Sopenharmony_ciThe following are only applicable to OMAP3+ and AM335x: 1058c2ecf20Sopenharmony_ci - gpmc,wr-access-ns: In synchronous write mode, for single or 1068c2ecf20Sopenharmony_ci burst accesses, defines the number of 1078c2ecf20Sopenharmony_ci GPMC_FCLK cycles from start access time 1088c2ecf20Sopenharmony_ci to the GPMC_CLK rising edge used by the 1098c2ecf20Sopenharmony_ci memory device for the first data capture. 1108c2ecf20Sopenharmony_ci - gpmc,wr-data-mux-bus-ns: In address-data multiplex mode, specifies 1118c2ecf20Sopenharmony_ci the time when the first data is driven on 1128c2ecf20Sopenharmony_ci the address-data bus. 1138c2ecf20Sopenharmony_ci 1148c2ecf20Sopenharmony_ciGPMC chip-select settings properties for child nodes. All are optional. 1158c2ecf20Sopenharmony_ci 1168c2ecf20Sopenharmony_ci- gpmc,burst-length Page/burst length. Must be 4, 8 or 16. 1178c2ecf20Sopenharmony_ci- gpmc,burst-wrap Enables wrap bursting 1188c2ecf20Sopenharmony_ci- gpmc,burst-read Enables read page/burst mode 1198c2ecf20Sopenharmony_ci- gpmc,burst-write Enables write page/burst mode 1208c2ecf20Sopenharmony_ci- gpmc,device-width Total width of device(s) connected to a GPMC 1218c2ecf20Sopenharmony_ci chip-select in bytes. The GPMC supports 8-bit 1228c2ecf20Sopenharmony_ci and 16-bit devices and so this property must be 1238c2ecf20Sopenharmony_ci 1 or 2. 1248c2ecf20Sopenharmony_ci- gpmc,mux-add-data Address and data multiplexing configuration. 1258c2ecf20Sopenharmony_ci Valid values are 1 for address-address-data 1268c2ecf20Sopenharmony_ci multiplexing mode and 2 for address-data 1278c2ecf20Sopenharmony_ci multiplexing mode. 1288c2ecf20Sopenharmony_ci- gpmc,sync-read Enables synchronous read. Defaults to asynchronous 1298c2ecf20Sopenharmony_ci is this is not set. 1308c2ecf20Sopenharmony_ci- gpmc,sync-write Enables synchronous writes. Defaults to asynchronous 1318c2ecf20Sopenharmony_ci is this is not set. 1328c2ecf20Sopenharmony_ci- gpmc,wait-pin Wait-pin used by client. Must be less than 1338c2ecf20Sopenharmony_ci "gpmc,num-waitpins". 1348c2ecf20Sopenharmony_ci- gpmc,wait-on-read Enables wait monitoring on reads. 1358c2ecf20Sopenharmony_ci- gpmc,wait-on-write Enables wait monitoring on writes. 1368c2ecf20Sopenharmony_ci 1378c2ecf20Sopenharmony_ciExample for an AM33xx board: 1388c2ecf20Sopenharmony_ci 1398c2ecf20Sopenharmony_ci gpmc: gpmc@50000000 { 1408c2ecf20Sopenharmony_ci compatible = "ti,am3352-gpmc"; 1418c2ecf20Sopenharmony_ci ti,hwmods = "gpmc"; 1428c2ecf20Sopenharmony_ci reg = <0x50000000 0x2000>; 1438c2ecf20Sopenharmony_ci interrupts = <100>; 1448c2ecf20Sopenharmony_ci dmas = <&edma 52 0>; 1458c2ecf20Sopenharmony_ci dma-names = "rxtx"; 1468c2ecf20Sopenharmony_ci gpmc,num-cs = <8>; 1478c2ecf20Sopenharmony_ci gpmc,num-waitpins = <2>; 1488c2ecf20Sopenharmony_ci #address-cells = <2>; 1498c2ecf20Sopenharmony_ci #size-cells = <1>; 1508c2ecf20Sopenharmony_ci ranges = <0 0 0x08000000 0x10000000>; /* CS0 @addr 0x8000000, size 0x10000000 */ 1518c2ecf20Sopenharmony_ci interrupt-controller; 1528c2ecf20Sopenharmony_ci #interrupt-cells = <2>; 1538c2ecf20Sopenharmony_ci gpio-controller; 1548c2ecf20Sopenharmony_ci #gpio-cells = <2>; 1558c2ecf20Sopenharmony_ci 1568c2ecf20Sopenharmony_ci /* child nodes go here */ 1578c2ecf20Sopenharmony_ci }; 158