1*4882a593Smuzhiyun* Device tree bindings for Texas instruments AEMIF controller 2*4882a593Smuzhiyun 3*4882a593SmuzhiyunThe Async External Memory Interface (EMIF16/AEMIF) controller is intended to 4*4882a593Smuzhiyunprovide a glue-less interface to a variety of asynchronous memory devices like 5*4882a593SmuzhiyunASRA M, NOR and NAND memory. A total of 256M bytes of any of these memories 6*4882a593Smuzhiyuncan be accessed at any given time via four chip selects with 64M byte access 7*4882a593Smuzhiyunper chip select. Synchronous memories such as DDR1 SD RAM, SDR SDRAM 8*4882a593Smuzhiyunand Mobile SDR are not supported. 9*4882a593Smuzhiyun 10*4882a593SmuzhiyunDocumentation: 11*4882a593SmuzhiyunDavinci DM646x - http://www.ti.com/lit/ug/sprueq7c/sprueq7c.pdf 12*4882a593SmuzhiyunOMAP-L138 (DA850) - http://www.ti.com/lit/ug/spruh77a/spruh77a.pdf 13*4882a593SmuzhiyunKestone - http://www.ti.com/lit/ug/sprugz3a/sprugz3a.pdf 14*4882a593Smuzhiyun 15*4882a593SmuzhiyunRequired properties: 16*4882a593Smuzhiyun 17*4882a593Smuzhiyun- compatible: "ti,davinci-aemif" 18*4882a593Smuzhiyun "ti,keystone-aemif" 19*4882a593Smuzhiyun "ti,da850-aemif" 20*4882a593Smuzhiyun 21*4882a593Smuzhiyun- reg: contains offset/length value for AEMIF control registers 22*4882a593Smuzhiyun space. 23*4882a593Smuzhiyun 24*4882a593Smuzhiyun- #address-cells: Must be 2. The partition number has to be encoded in the 25*4882a593Smuzhiyun first address cell and it may accept values 0..N-1 26*4882a593Smuzhiyun (N - total number of partitions). It's recommended to 27*4882a593Smuzhiyun assign N-1 number for the control partition. The second 28*4882a593Smuzhiyun cell is the offset into the partition. 29*4882a593Smuzhiyun 30*4882a593Smuzhiyun- #size-cells: Must be set to 1. 31*4882a593Smuzhiyun 32*4882a593Smuzhiyun- ranges: Contains memory regions. There are two types of 33*4882a593Smuzhiyun ranges/partitions: 34*4882a593Smuzhiyun - CS-specific partition/range. If continuous, must be 35*4882a593Smuzhiyun set up to reflect the memory layout for 4 chipselects, 36*4882a593Smuzhiyun if not then additional range/partition can be added and 37*4882a593Smuzhiyun child device can select the proper one. 38*4882a593Smuzhiyun - control partition which is common for all CS 39*4882a593Smuzhiyun interfaces. 40*4882a593Smuzhiyun 41*4882a593Smuzhiyun- clocks: the clock feeding the controller clock. Required only 42*4882a593Smuzhiyun if clock tree data present in device tree. 43*4882a593Smuzhiyun See clock-bindings.txt 44*4882a593Smuzhiyun 45*4882a593Smuzhiyun- clock-names: clock name. It has to be "aemif". Required only if clock 46*4882a593Smuzhiyun tree data present in device tree, in another case don't 47*4882a593Smuzhiyun use it. 48*4882a593Smuzhiyun See clock-bindings.txt 49*4882a593Smuzhiyun 50*4882a593Smuzhiyun- clock-ranges: Empty property indicating that child nodes can inherit 51*4882a593Smuzhiyun named clocks. Required only if clock tree data present 52*4882a593Smuzhiyun in device tree. 53*4882a593Smuzhiyun See clock-bindings.txt 54*4882a593Smuzhiyun 55*4882a593Smuzhiyun 56*4882a593SmuzhiyunChild chip-select (cs) nodes contain the memory devices nodes connected to 57*4882a593Smuzhiyunsuch as NOR (e.g. cfi-flash) and NAND (ti,davinci-nand, see davinci-nand.txt). 58*4882a593SmuzhiyunThere might be board specific devices like FPGAs. 59*4882a593Smuzhiyun 60*4882a593SmuzhiyunRequired child cs node properties: 61*4882a593Smuzhiyun 62*4882a593Smuzhiyun- #address-cells: Must be 2. 63*4882a593Smuzhiyun 64*4882a593Smuzhiyun- #size-cells: Must be 1. 65*4882a593Smuzhiyun 66*4882a593Smuzhiyun- ranges: Empty property indicating that child nodes can inherit 67*4882a593Smuzhiyun memory layout. 68*4882a593Smuzhiyun 69*4882a593Smuzhiyun- clock-ranges: Empty property indicating that child nodes can inherit 70*4882a593Smuzhiyun named clocks. Required only if clock tree data present 71*4882a593Smuzhiyun in device tree. 72*4882a593Smuzhiyun 73*4882a593Smuzhiyun- ti,cs-chipselect: number of chipselect. Indicates on the aemif driver 74*4882a593Smuzhiyun which chipselect is used for accessing the memory. For 75*4882a593Smuzhiyun compatibles "ti,davinci-aemif" and "ti,keystone-aemif" 76*4882a593Smuzhiyun it can be in range [0-3]. For compatible 77*4882a593Smuzhiyun "ti,da850-aemif" range is [2-5]. 78*4882a593Smuzhiyun 79*4882a593SmuzhiyunOptional child cs node properties: 80*4882a593Smuzhiyun 81*4882a593Smuzhiyun- ti,cs-bus-width: width of the asynchronous device's data bus 82*4882a593Smuzhiyun 8 or 16 if not preset 8 83*4882a593Smuzhiyun 84*4882a593Smuzhiyun- ti,cs-select-strobe-mode: enable/disable select strobe mode 85*4882a593Smuzhiyun In select strobe mode chip select behaves as 86*4882a593Smuzhiyun the strobe and is active only during the strobe 87*4882a593Smuzhiyun period. If present then enable. 88*4882a593Smuzhiyun 89*4882a593Smuzhiyun- ti,cs-extended-wait-mode: enable/disable extended wait mode 90*4882a593Smuzhiyun if set, the controller monitors the EMIFWAIT pin 91*4882a593Smuzhiyun mapped to that chip select to determine if the 92*4882a593Smuzhiyun device wants to extend the strobe period. If 93*4882a593Smuzhiyun present then enable. 94*4882a593Smuzhiyun 95*4882a593Smuzhiyun- ti,cs-min-turnaround-ns: minimum turn around time, ns 96*4882a593Smuzhiyun Time between the end of one asynchronous memory 97*4882a593Smuzhiyun access and the start of another asynchronous 98*4882a593Smuzhiyun memory access. This delay is not incurred 99*4882a593Smuzhiyun between a read followed by read or a write 100*4882a593Smuzhiyun followed by a write to same chip select. 101*4882a593Smuzhiyun 102*4882a593Smuzhiyun- ti,cs-read-setup-ns: read setup width, ns 103*4882a593Smuzhiyun Time between the beginning of a memory cycle 104*4882a593Smuzhiyun and the activation of read strobe. 105*4882a593Smuzhiyun Minimum value is 1 (0 treated as 1). 106*4882a593Smuzhiyun 107*4882a593Smuzhiyun- ti,cs-read-strobe-ns: read strobe width, ns 108*4882a593Smuzhiyun Time between the activation and deactivation of 109*4882a593Smuzhiyun the read strobe. 110*4882a593Smuzhiyun Minimum value is 1 (0 treated as 1). 111*4882a593Smuzhiyun 112*4882a593Smuzhiyun- ti,cs-read-hold-ns: read hold width, ns 113*4882a593Smuzhiyun Time between the deactivation of the read 114*4882a593Smuzhiyun strobe and the end of the cycle (which may be 115*4882a593Smuzhiyun either an address change or the deactivation of 116*4882a593Smuzhiyun the chip select signal. 117*4882a593Smuzhiyun Minimum value is 1 (0 treated as 1). 118*4882a593Smuzhiyun 119*4882a593Smuzhiyun- ti,cs-write-setup-ns: write setup width, ns 120*4882a593Smuzhiyun Time between the beginning of a memory cycle 121*4882a593Smuzhiyun and the activation of write strobe. 122*4882a593Smuzhiyun Minimum value is 1 (0 treated as 1). 123*4882a593Smuzhiyun 124*4882a593Smuzhiyun- ti,cs-write-strobe-ns: write strobe width, ns 125*4882a593Smuzhiyun Time between the activation and deactivation of 126*4882a593Smuzhiyun the write strobe. 127*4882a593Smuzhiyun Minimum value is 1 (0 treated as 1). 128*4882a593Smuzhiyun 129*4882a593Smuzhiyun- ti,cs-write-hold-ns: write hold width, ns 130*4882a593Smuzhiyun Time between the deactivation of the write 131*4882a593Smuzhiyun strobe and the end of the cycle (which may be 132*4882a593Smuzhiyun either an address change or the deactivation of 133*4882a593Smuzhiyun the chip select signal. 134*4882a593Smuzhiyun Minimum value is 1 (0 treated as 1). 135*4882a593Smuzhiyun 136*4882a593SmuzhiyunIf any of the above parameters are absent, current parameter value will be taken 137*4882a593Smuzhiyunfrom the corresponding HW reg. 138*4882a593Smuzhiyun 139*4882a593SmuzhiyunExample for aemif, davinci nand and nor flash chip select shown below. 140*4882a593Smuzhiyun 141*4882a593Smuzhiyunmemory-controller@21000a00 { 142*4882a593Smuzhiyun compatible = "ti,davinci-aemif"; 143*4882a593Smuzhiyun #address-cells = <2>; 144*4882a593Smuzhiyun #size-cells = <1>; 145*4882a593Smuzhiyun clocks = <&clkaemif 0>; 146*4882a593Smuzhiyun clock-names = "aemif"; 147*4882a593Smuzhiyun clock-ranges; 148*4882a593Smuzhiyun reg = <0x21000A00 0x00000100>; 149*4882a593Smuzhiyun ranges = <0 0 0x70000000 0x10000000 150*4882a593Smuzhiyun 1 0 0x21000A00 0x00000100>; 151*4882a593Smuzhiyun /* 152*4882a593Smuzhiyun * Partition0: CS-specific memory range which is 153*4882a593Smuzhiyun * implemented as continuous physical memory region 154*4882a593Smuzhiyun * Partition1: control memory range 155*4882a593Smuzhiyun */ 156*4882a593Smuzhiyun 157*4882a593Smuzhiyun nand:cs2 { 158*4882a593Smuzhiyun #address-cells = <2>; 159*4882a593Smuzhiyun #size-cells = <1>; 160*4882a593Smuzhiyun clock-ranges; 161*4882a593Smuzhiyun ranges; 162*4882a593Smuzhiyun 163*4882a593Smuzhiyun ti,cs-chipselect = <2>; 164*4882a593Smuzhiyun /* all timings in nanoseconds */ 165*4882a593Smuzhiyun ti,cs-min-turnaround-ns = <0>; 166*4882a593Smuzhiyun ti,cs-read-hold-ns = <7>; 167*4882a593Smuzhiyun ti,cs-read-strobe-ns = <42>; 168*4882a593Smuzhiyun ti,cs-read-setup-ns = <14>; 169*4882a593Smuzhiyun ti,cs-write-hold-ns = <7>; 170*4882a593Smuzhiyun ti,cs-write-strobe-ns = <42>; 171*4882a593Smuzhiyun ti,cs-write-setup-ns = <14>; 172*4882a593Smuzhiyun 173*4882a593Smuzhiyun nand@0,0x8000000 { 174*4882a593Smuzhiyun compatible = "ti,davinci-nand"; 175*4882a593Smuzhiyun reg = <0 0x8000000 0x4000000 176*4882a593Smuzhiyun 1 0x0000000 0x0000100>; 177*4882a593Smuzhiyun /* 178*4882a593Smuzhiyun * Partition0, offset 0x8000000, size 0x4000000 179*4882a593Smuzhiyun * Partition1, offset 0x0000000, size 0x0000100 180*4882a593Smuzhiyun */ 181*4882a593Smuzhiyun 182*4882a593Smuzhiyun .. see davinci-nand.txt 183*4882a593Smuzhiyun }; 184*4882a593Smuzhiyun }; 185*4882a593Smuzhiyun 186*4882a593Smuzhiyun nor:cs0 { 187*4882a593Smuzhiyun #address-cells = <2>; 188*4882a593Smuzhiyun #size-cells = <1>; 189*4882a593Smuzhiyun clock-ranges; 190*4882a593Smuzhiyun ranges; 191*4882a593Smuzhiyun 192*4882a593Smuzhiyun ti,cs-chipselect = <0>; 193*4882a593Smuzhiyun /* all timings in nanoseconds */ 194*4882a593Smuzhiyun ti,cs-min-turnaround-ns = <0>; 195*4882a593Smuzhiyun ti,cs-read-hold-ns = <8>; 196*4882a593Smuzhiyun ti,cs-read-strobe-ns = <40>; 197*4882a593Smuzhiyun ti,cs-read-setup-ns = <14>; 198*4882a593Smuzhiyun ti,cs-write-hold-ns = <7>; 199*4882a593Smuzhiyun ti,cs-write-strobe-ns = <40>; 200*4882a593Smuzhiyun ti,cs-write-setup-ns = <14>; 201*4882a593Smuzhiyun ti,cs-bus-width = <16>; 202*4882a593Smuzhiyun 203*4882a593Smuzhiyun flash@0,0x0000000 { 204*4882a593Smuzhiyun compatible = "cfi-flash"; 205*4882a593Smuzhiyun reg = <0 0x0000000 0x4000000>; 206*4882a593Smuzhiyun 207*4882a593Smuzhiyun ... 208*4882a593Smuzhiyun }; 209*4882a593Smuzhiyun }; 210*4882a593Smuzhiyun}; 211