1*c66ec88fSEmmanuel VadotDevice tree bindings for OMAP general purpose memory controllers (GPMC) 2*c66ec88fSEmmanuel Vadot 3*c66ec88fSEmmanuel VadotThe actual devices are instantiated from the child nodes of a GPMC node. 4*c66ec88fSEmmanuel Vadot 5*c66ec88fSEmmanuel VadotRequired properties: 6*c66ec88fSEmmanuel Vadot 7*c66ec88fSEmmanuel Vadot - compatible: Should be set to one of the following: 8*c66ec88fSEmmanuel Vadot 9*c66ec88fSEmmanuel Vadot ti,omap2420-gpmc (omap2420) 10*c66ec88fSEmmanuel Vadot ti,omap2430-gpmc (omap2430) 11*c66ec88fSEmmanuel Vadot ti,omap3430-gpmc (omap3430 & omap3630) 12*c66ec88fSEmmanuel Vadot ti,omap4430-gpmc (omap4430 & omap4460 & omap543x) 13*c66ec88fSEmmanuel Vadot ti,am3352-gpmc (am335x devices) 14*c66ec88fSEmmanuel Vadot 15*c66ec88fSEmmanuel Vadot - reg: A resource specifier for the register space 16*c66ec88fSEmmanuel Vadot (see the example below) 17*c66ec88fSEmmanuel Vadot - ti,hwmods: Should be set to "ti,gpmc" until the DT transition is 18*c66ec88fSEmmanuel Vadot completed. 19*c66ec88fSEmmanuel Vadot - #address-cells: Must be set to 2 to allow memory address translation 20*c66ec88fSEmmanuel Vadot - #size-cells: Must be set to 1 to allow CS address passing 21*c66ec88fSEmmanuel Vadot - gpmc,num-cs: The maximum number of chip-select lines that controller 22*c66ec88fSEmmanuel Vadot can support. 23*c66ec88fSEmmanuel Vadot - gpmc,num-waitpins: The maximum number of wait pins that controller can 24*c66ec88fSEmmanuel Vadot support. 25*c66ec88fSEmmanuel Vadot - ranges: Must be set up to reflect the memory layout with four 26*c66ec88fSEmmanuel Vadot integer values for each chip-select line in use: 27*c66ec88fSEmmanuel Vadot 28*c66ec88fSEmmanuel Vadot <cs-number> 0 <physical address of mapping> <size> 29*c66ec88fSEmmanuel Vadot 30*c66ec88fSEmmanuel Vadot Currently, calculated values derived from the contents 31*c66ec88fSEmmanuel Vadot of the per-CS register GPMC_CONFIG7 (as set up by the 32*c66ec88fSEmmanuel Vadot bootloader) are used for the physical address decoding. 33*c66ec88fSEmmanuel Vadot As this will change in the future, filling correct 34*c66ec88fSEmmanuel Vadot values here is a requirement. 35*c66ec88fSEmmanuel Vadot - interrupt-controller: The GPMC driver implements and interrupt controller for 36*c66ec88fSEmmanuel Vadot the NAND events "fifoevent" and "termcount" plus the 37*c66ec88fSEmmanuel Vadot rising/falling edges on the GPMC_WAIT pins. 38*c66ec88fSEmmanuel Vadot The interrupt number mapping is as follows 39*c66ec88fSEmmanuel Vadot 0 - NAND_fifoevent 40*c66ec88fSEmmanuel Vadot 1 - NAND_termcount 41*c66ec88fSEmmanuel Vadot 2 - GPMC_WAIT0 pin edge 42*c66ec88fSEmmanuel Vadot 3 - GPMC_WAIT1 pin edge, and so on. 43*c66ec88fSEmmanuel Vadot - interrupt-cells: Must be set to 2 44*c66ec88fSEmmanuel Vadot - gpio-controller: The GPMC driver implements a GPIO controller for the 45*c66ec88fSEmmanuel Vadot GPMC WAIT pins that can be used as general purpose inputs. 46*c66ec88fSEmmanuel Vadot 0 maps to GPMC_WAIT0 pin. 47*c66ec88fSEmmanuel Vadot - gpio-cells: Must be set to 2 48*c66ec88fSEmmanuel Vadot 49*c66ec88fSEmmanuel VadotRequired properties when using NAND prefetch dma: 50*c66ec88fSEmmanuel Vadot - dmas GPMC NAND prefetch dma channel 51*c66ec88fSEmmanuel Vadot - dma-names Must be set to "rxtx" 52*c66ec88fSEmmanuel Vadot 53*c66ec88fSEmmanuel VadotTiming properties for child nodes. All are optional and default to 0. 54*c66ec88fSEmmanuel Vadot 55*c66ec88fSEmmanuel Vadot - gpmc,sync-clk-ps: Minimum clock period for synchronous mode, in picoseconds 56*c66ec88fSEmmanuel Vadot 57*c66ec88fSEmmanuel Vadot Chip-select signal timings (in nanoseconds) corresponding to GPMC_CONFIG2: 58*c66ec88fSEmmanuel Vadot - gpmc,cs-on-ns: Assertion time 59*c66ec88fSEmmanuel Vadot - gpmc,cs-rd-off-ns: Read deassertion time 60*c66ec88fSEmmanuel Vadot - gpmc,cs-wr-off-ns: Write deassertion time 61*c66ec88fSEmmanuel Vadot 62*c66ec88fSEmmanuel Vadot ADV signal timings (in nanoseconds) corresponding to GPMC_CONFIG3: 63*c66ec88fSEmmanuel Vadot - gpmc,adv-on-ns: Assertion time 64*c66ec88fSEmmanuel Vadot - gpmc,adv-rd-off-ns: Read deassertion time 65*c66ec88fSEmmanuel Vadot - gpmc,adv-wr-off-ns: Write deassertion time 66*c66ec88fSEmmanuel Vadot - gpmc,adv-aad-mux-on-ns: Assertion time for AAD 67*c66ec88fSEmmanuel Vadot - gpmc,adv-aad-mux-rd-off-ns: Read deassertion time for AAD 68*c66ec88fSEmmanuel Vadot - gpmc,adv-aad-mux-wr-off-ns: Write deassertion time for AAD 69*c66ec88fSEmmanuel Vadot 70*c66ec88fSEmmanuel Vadot WE signals timings (in nanoseconds) corresponding to GPMC_CONFIG4: 71*c66ec88fSEmmanuel Vadot - gpmc,we-on-ns Assertion time 72*c66ec88fSEmmanuel Vadot - gpmc,we-off-ns: Deassertion time 73*c66ec88fSEmmanuel Vadot 74*c66ec88fSEmmanuel Vadot OE signals timings (in nanoseconds) corresponding to GPMC_CONFIG4: 75*c66ec88fSEmmanuel Vadot - gpmc,oe-on-ns: Assertion time 76*c66ec88fSEmmanuel Vadot - gpmc,oe-off-ns: Deassertion time 77*c66ec88fSEmmanuel Vadot - gpmc,oe-aad-mux-on-ns: Assertion time for AAD 78*c66ec88fSEmmanuel Vadot - gpmc,oe-aad-mux-off-ns: Deassertion time for AAD 79*c66ec88fSEmmanuel Vadot 80*c66ec88fSEmmanuel Vadot Access time and cycle time timings (in nanoseconds) corresponding to 81*c66ec88fSEmmanuel Vadot GPMC_CONFIG5: 82*c66ec88fSEmmanuel Vadot - gpmc,page-burst-access-ns: Multiple access word delay 83*c66ec88fSEmmanuel Vadot - gpmc,access-ns: Start-cycle to first data valid delay 84*c66ec88fSEmmanuel Vadot - gpmc,rd-cycle-ns: Total read cycle time 85*c66ec88fSEmmanuel Vadot - gpmc,wr-cycle-ns: Total write cycle time 86*c66ec88fSEmmanuel Vadot - gpmc,bus-turnaround-ns: Turn-around time between successive accesses 87*c66ec88fSEmmanuel Vadot - gpmc,cycle2cycle-delay-ns: Delay between chip-select pulses 88*c66ec88fSEmmanuel Vadot - gpmc,clk-activation-ns: GPMC clock activation time 89*c66ec88fSEmmanuel Vadot - gpmc,wait-monitoring-ns: Start of wait monitoring with regard to valid 90*c66ec88fSEmmanuel Vadot data 91*c66ec88fSEmmanuel Vadot 92*c66ec88fSEmmanuel VadotBoolean timing parameters. If property is present parameter enabled and 93*c66ec88fSEmmanuel Vadotdisabled if omitted: 94*c66ec88fSEmmanuel Vadot - gpmc,adv-extra-delay: ADV signal is delayed by half GPMC clock 95*c66ec88fSEmmanuel Vadot - gpmc,cs-extra-delay: CS signal is delayed by half GPMC clock 96*c66ec88fSEmmanuel Vadot - gpmc,cycle2cycle-diffcsen: Add "cycle2cycle-delay" between successive 97*c66ec88fSEmmanuel Vadot accesses to a different CS 98*c66ec88fSEmmanuel Vadot - gpmc,cycle2cycle-samecsen: Add "cycle2cycle-delay" between successive 99*c66ec88fSEmmanuel Vadot accesses to the same CS 100*c66ec88fSEmmanuel Vadot - gpmc,oe-extra-delay: OE signal is delayed by half GPMC clock 101*c66ec88fSEmmanuel Vadot - gpmc,we-extra-delay: WE signal is delayed by half GPMC clock 102*c66ec88fSEmmanuel Vadot - gpmc,time-para-granularity: Multiply all access times by 2 103*c66ec88fSEmmanuel Vadot 104*c66ec88fSEmmanuel VadotThe following are only applicable to OMAP3+ and AM335x: 105*c66ec88fSEmmanuel Vadot - gpmc,wr-access-ns: In synchronous write mode, for single or 106*c66ec88fSEmmanuel Vadot burst accesses, defines the number of 107*c66ec88fSEmmanuel Vadot GPMC_FCLK cycles from start access time 108*c66ec88fSEmmanuel Vadot to the GPMC_CLK rising edge used by the 109*c66ec88fSEmmanuel Vadot memory device for the first data capture. 110*c66ec88fSEmmanuel Vadot - gpmc,wr-data-mux-bus-ns: In address-data multiplex mode, specifies 111*c66ec88fSEmmanuel Vadot the time when the first data is driven on 112*c66ec88fSEmmanuel Vadot the address-data bus. 113*c66ec88fSEmmanuel Vadot 114*c66ec88fSEmmanuel VadotGPMC chip-select settings properties for child nodes. All are optional. 115*c66ec88fSEmmanuel Vadot 116*c66ec88fSEmmanuel Vadot- gpmc,burst-length Page/burst length. Must be 4, 8 or 16. 117*c66ec88fSEmmanuel Vadot- gpmc,burst-wrap Enables wrap bursting 118*c66ec88fSEmmanuel Vadot- gpmc,burst-read Enables read page/burst mode 119*c66ec88fSEmmanuel Vadot- gpmc,burst-write Enables write page/burst mode 120*c66ec88fSEmmanuel Vadot- gpmc,device-width Total width of device(s) connected to a GPMC 121*c66ec88fSEmmanuel Vadot chip-select in bytes. The GPMC supports 8-bit 122*c66ec88fSEmmanuel Vadot and 16-bit devices and so this property must be 123*c66ec88fSEmmanuel Vadot 1 or 2. 124*c66ec88fSEmmanuel Vadot- gpmc,mux-add-data Address and data multiplexing configuration. 125*c66ec88fSEmmanuel Vadot Valid values are 1 for address-address-data 126*c66ec88fSEmmanuel Vadot multiplexing mode and 2 for address-data 127*c66ec88fSEmmanuel Vadot multiplexing mode. 128*c66ec88fSEmmanuel Vadot- gpmc,sync-read Enables synchronous read. Defaults to asynchronous 129*c66ec88fSEmmanuel Vadot is this is not set. 130*c66ec88fSEmmanuel Vadot- gpmc,sync-write Enables synchronous writes. Defaults to asynchronous 131*c66ec88fSEmmanuel Vadot is this is not set. 132*c66ec88fSEmmanuel Vadot- gpmc,wait-pin Wait-pin used by client. Must be less than 133*c66ec88fSEmmanuel Vadot "gpmc,num-waitpins". 134*c66ec88fSEmmanuel Vadot- gpmc,wait-on-read Enables wait monitoring on reads. 135*c66ec88fSEmmanuel Vadot- gpmc,wait-on-write Enables wait monitoring on writes. 136*c66ec88fSEmmanuel Vadot 137*c66ec88fSEmmanuel VadotExample for an AM33xx board: 138*c66ec88fSEmmanuel Vadot 139*c66ec88fSEmmanuel Vadot gpmc: gpmc@50000000 { 140*c66ec88fSEmmanuel Vadot compatible = "ti,am3352-gpmc"; 141*c66ec88fSEmmanuel Vadot ti,hwmods = "gpmc"; 142*c66ec88fSEmmanuel Vadot reg = <0x50000000 0x2000>; 143*c66ec88fSEmmanuel Vadot interrupts = <100>; 144*c66ec88fSEmmanuel Vadot dmas = <&edma 52 0>; 145*c66ec88fSEmmanuel Vadot dma-names = "rxtx"; 146*c66ec88fSEmmanuel Vadot gpmc,num-cs = <8>; 147*c66ec88fSEmmanuel Vadot gpmc,num-waitpins = <2>; 148*c66ec88fSEmmanuel Vadot #address-cells = <2>; 149*c66ec88fSEmmanuel Vadot #size-cells = <1>; 150*c66ec88fSEmmanuel Vadot ranges = <0 0 0x08000000 0x10000000>; /* CS0 @addr 0x8000000, size 0x10000000 */ 151*c66ec88fSEmmanuel Vadot interrupt-controller; 152*c66ec88fSEmmanuel Vadot #interrupt-cells = <2>; 153*c66ec88fSEmmanuel Vadot gpio-controller; 154*c66ec88fSEmmanuel Vadot #gpio-cells = <2>; 155*c66ec88fSEmmanuel Vadot 156*c66ec88fSEmmanuel Vadot /* child nodes go here */ 157*c66ec88fSEmmanuel Vadot }; 158