17a962a4bSIvan Khoronzhuk* Device tree bindings for Texas instruments AEMIF controller 27a962a4bSIvan Khoronzhuk 37a962a4bSIvan KhoronzhukThe Async External Memory Interface (EMIF16/AEMIF) controller is intended to 47a962a4bSIvan Khoronzhukprovide a glue-less interface to a variety of asynchronous memory devices like 57a962a4bSIvan KhoronzhukASRA M, NOR and NAND memory. A total of 256M bytes of any of these memories 67a962a4bSIvan Khoronzhukcan be accessed at any given time via four chip selects with 64M byte access 77a962a4bSIvan Khoronzhukper chip select. Synchronous memories such as DDR1 SD RAM, SDR SDRAM 87a962a4bSIvan Khoronzhukand Mobile SDR are not supported. 97a962a4bSIvan Khoronzhuk 107a962a4bSIvan KhoronzhukDocumentation: 117a962a4bSIvan KhoronzhukDavinci DM646x - http://www.ti.com/lit/ug/sprueq7c/sprueq7c.pdf 127a962a4bSIvan KhoronzhukOMAP-L138 (DA850) - http://www.ti.com/lit/ug/spruh77a/spruh77a.pdf 137a962a4bSIvan KhoronzhukKestone - http://www.ti.com/lit/ug/sprugz3a/sprugz3a.pdf 147a962a4bSIvan Khoronzhuk 157a962a4bSIvan KhoronzhukRequired properties: 167a962a4bSIvan Khoronzhuk 177a962a4bSIvan Khoronzhuk- compatible: "ti,davinci-aemif" 187a962a4bSIvan Khoronzhuk "ti,keystone-aemif" 197a962a4bSIvan Khoronzhuk "ti,da850-aemif" 207a962a4bSIvan Khoronzhuk 217a962a4bSIvan Khoronzhuk- reg: contains offset/length value for AEMIF control registers 227a962a4bSIvan Khoronzhuk space. 237a962a4bSIvan Khoronzhuk 247a962a4bSIvan Khoronzhuk- #address-cells: Must be 2. The partition number has to be encoded in the 257a962a4bSIvan Khoronzhuk first address cell and it may accept values 0..N-1 267a962a4bSIvan Khoronzhuk (N - total number of partitions). It's recommended to 277a962a4bSIvan Khoronzhuk assign N-1 number for the control partition. The second 287a962a4bSIvan Khoronzhuk cell is the offset into the partition. 297a962a4bSIvan Khoronzhuk 307a962a4bSIvan Khoronzhuk- #size-cells: Must be set to 1. 317a962a4bSIvan Khoronzhuk 327a962a4bSIvan Khoronzhuk- ranges: Contains memory regions. There are two types of 337a962a4bSIvan Khoronzhuk ranges/partitions: 347a962a4bSIvan Khoronzhuk - CS-specific partition/range. If continuous, must be 357a962a4bSIvan Khoronzhuk set up to reflect the memory layout for 4 chipselects, 367a962a4bSIvan Khoronzhuk if not then additional range/partition can be added and 377a962a4bSIvan Khoronzhuk child device can select the proper one. 387a962a4bSIvan Khoronzhuk - control partition which is common for all CS 397a962a4bSIvan Khoronzhuk interfaces. 407a962a4bSIvan Khoronzhuk 417a962a4bSIvan Khoronzhuk- clocks: the clock feeding the controller clock. Required only 427a962a4bSIvan Khoronzhuk if clock tree data present in device tree. 437a962a4bSIvan Khoronzhuk See clock-bindings.txt 447a962a4bSIvan Khoronzhuk 457a962a4bSIvan Khoronzhuk- clock-names: clock name. It has to be "aemif". Required only if clock 467a962a4bSIvan Khoronzhuk tree data present in device tree, in another case don't 477a962a4bSIvan Khoronzhuk use it. 487a962a4bSIvan Khoronzhuk See clock-bindings.txt 497a962a4bSIvan Khoronzhuk 507a962a4bSIvan Khoronzhuk- clock-ranges: Empty property indicating that child nodes can inherit 517a962a4bSIvan Khoronzhuk named clocks. Required only if clock tree data present 527a962a4bSIvan Khoronzhuk in device tree. 537a962a4bSIvan Khoronzhuk See clock-bindings.txt 547a962a4bSIvan Khoronzhuk 557a962a4bSIvan Khoronzhuk 567a962a4bSIvan KhoronzhukChild chip-select (cs) nodes contain the memory devices nodes connected to 577a962a4bSIvan Khoronzhuksuch as NOR (e.g. cfi-flash) and NAND (ti,davinci-nand, see davinci-nand.txt). 587a962a4bSIvan KhoronzhukThere might be board specific devices like FPGAs. 597a962a4bSIvan Khoronzhuk 607a962a4bSIvan KhoronzhukRequired child cs node properties: 617a962a4bSIvan Khoronzhuk 627a962a4bSIvan Khoronzhuk- #address-cells: Must be 2. 637a962a4bSIvan Khoronzhuk 647a962a4bSIvan Khoronzhuk- #size-cells: Must be 1. 657a962a4bSIvan Khoronzhuk 667a962a4bSIvan Khoronzhuk- ranges: Empty property indicating that child nodes can inherit 677a962a4bSIvan Khoronzhuk memory layout. 687a962a4bSIvan Khoronzhuk 697a962a4bSIvan Khoronzhuk- clock-ranges: Empty property indicating that child nodes can inherit 707a962a4bSIvan Khoronzhuk named clocks. Required only if clock tree data present 717a962a4bSIvan Khoronzhuk in device tree. 727a962a4bSIvan Khoronzhuk 737a962a4bSIvan Khoronzhuk- ti,cs-chipselect: number of chipselect. Indicates on the aemif driver 747a962a4bSIvan Khoronzhuk which chipselect is used for accessing the memory. For 757a962a4bSIvan Khoronzhuk compatibles "ti,davinci-aemif" and "ti,keystone-aemif" 767a962a4bSIvan Khoronzhuk it can be in range [0-3]. For compatible 777a962a4bSIvan Khoronzhuk "ti,da850-aemif" range is [2-5]. 787a962a4bSIvan Khoronzhuk 797a962a4bSIvan KhoronzhukOptional child cs node properties: 807a962a4bSIvan Khoronzhuk 817a962a4bSIvan Khoronzhuk- ti,cs-bus-width: width of the asynchronous device's data bus 827a962a4bSIvan Khoronzhuk 8 or 16 if not preset 8 837a962a4bSIvan Khoronzhuk 847a962a4bSIvan Khoronzhuk- ti,cs-select-strobe-mode: enable/disable select strobe mode 857a962a4bSIvan Khoronzhuk In select strobe mode chip select behaves as 867a962a4bSIvan Khoronzhuk the strobe and is active only during the strobe 877a962a4bSIvan Khoronzhuk period. If present then enable. 887a962a4bSIvan Khoronzhuk 897a962a4bSIvan Khoronzhuk- ti,cs-extended-wait-mode: enable/disable extended wait mode 907a962a4bSIvan Khoronzhuk if set, the controller monitors the EMIFWAIT pin 917a962a4bSIvan Khoronzhuk mapped to that chip select to determine if the 927a962a4bSIvan Khoronzhuk device wants to extend the strobe period. If 937a962a4bSIvan Khoronzhuk present then enable. 947a962a4bSIvan Khoronzhuk 957a962a4bSIvan Khoronzhuk- ti,cs-min-turnaround-ns: minimum turn around time, ns 967a962a4bSIvan Khoronzhuk Time between the end of one asynchronous memory 977a962a4bSIvan Khoronzhuk access and the start of another asynchronous 987a962a4bSIvan Khoronzhuk memory access. This delay is not incurred 997a962a4bSIvan Khoronzhuk between a read followed by read or a write 1007a962a4bSIvan Khoronzhuk followed by a write to same chip select. 1017a962a4bSIvan Khoronzhuk 1027a962a4bSIvan Khoronzhuk- ti,cs-read-setup-ns: read setup width, ns 1037a962a4bSIvan Khoronzhuk Time between the beginning of a memory cycle 1047a962a4bSIvan Khoronzhuk and the activation of read strobe. 1057a962a4bSIvan Khoronzhuk Minimum value is 1 (0 treated as 1). 1067a962a4bSIvan Khoronzhuk 1077a962a4bSIvan Khoronzhuk- ti,cs-read-strobe-ns: read strobe width, ns 1087a962a4bSIvan Khoronzhuk Time between the activation and deactivation of 1097a962a4bSIvan Khoronzhuk the read strobe. 1107a962a4bSIvan Khoronzhuk Minimum value is 1 (0 treated as 1). 1117a962a4bSIvan Khoronzhuk 1127a962a4bSIvan Khoronzhuk- ti,cs-read-hold-ns: read hold width, ns 1137a962a4bSIvan Khoronzhuk Time between the deactivation of the read 1147a962a4bSIvan Khoronzhuk strobe and the end of the cycle (which may be 1157a962a4bSIvan Khoronzhuk either an address change or the deactivation of 1167a962a4bSIvan Khoronzhuk the chip select signal. 1177a962a4bSIvan Khoronzhuk Minimum value is 1 (0 treated as 1). 1187a962a4bSIvan Khoronzhuk 1197a962a4bSIvan Khoronzhuk- ti,cs-write-setup-ns: write setup width, ns 1207a962a4bSIvan Khoronzhuk Time between the beginning of a memory cycle 1217a962a4bSIvan Khoronzhuk and the activation of write strobe. 1227a962a4bSIvan Khoronzhuk Minimum value is 1 (0 treated as 1). 1237a962a4bSIvan Khoronzhuk 1247a962a4bSIvan Khoronzhuk- ti,cs-write-strobe-ns: write strobe width, ns 1257a962a4bSIvan Khoronzhuk Time between the activation and deactivation of 1267a962a4bSIvan Khoronzhuk the write strobe. 1277a962a4bSIvan Khoronzhuk Minimum value is 1 (0 treated as 1). 1287a962a4bSIvan Khoronzhuk 1297a962a4bSIvan Khoronzhuk- ti,cs-write-hold-ns: write hold width, ns 1307a962a4bSIvan Khoronzhuk Time between the deactivation of the write 1317a962a4bSIvan Khoronzhuk strobe and the end of the cycle (which may be 1327a962a4bSIvan Khoronzhuk either an address change or the deactivation of 1337a962a4bSIvan Khoronzhuk the chip select signal. 1347a962a4bSIvan Khoronzhuk Minimum value is 1 (0 treated as 1). 1357a962a4bSIvan Khoronzhuk 1367a962a4bSIvan KhoronzhukIf any of the above parameters are absent, current parameter value will be taken 1377a962a4bSIvan Khoronzhukfrom the corresponding HW reg. 1387a962a4bSIvan Khoronzhuk 1397a962a4bSIvan KhoronzhukExample for aemif, davinci nand and nor flash chip select shown below. 1407a962a4bSIvan Khoronzhuk 141*afc3bca4SRob Herringmemory-controller@21000a00 { 1427a962a4bSIvan Khoronzhuk compatible = "ti,davinci-aemif"; 1437a962a4bSIvan Khoronzhuk #address-cells = <2>; 1447a962a4bSIvan Khoronzhuk #size-cells = <1>; 1457a962a4bSIvan Khoronzhuk clocks = <&clkaemif 0>; 1467a962a4bSIvan Khoronzhuk clock-names = "aemif"; 1477a962a4bSIvan Khoronzhuk clock-ranges; 1487a962a4bSIvan Khoronzhuk reg = <0x21000A00 0x00000100>; 1497a962a4bSIvan Khoronzhuk ranges = <0 0 0x70000000 0x10000000 1507a962a4bSIvan Khoronzhuk 1 0 0x21000A00 0x00000100>; 1517a962a4bSIvan Khoronzhuk /* 1527a962a4bSIvan Khoronzhuk * Partition0: CS-specific memory range which is 1537a962a4bSIvan Khoronzhuk * implemented as continuous physical memory region 1547a962a4bSIvan Khoronzhuk * Partition1: control memory range 1557a962a4bSIvan Khoronzhuk */ 1567a962a4bSIvan Khoronzhuk 1577a962a4bSIvan Khoronzhuk nand:cs2 { 1587a962a4bSIvan Khoronzhuk #address-cells = <2>; 1597a962a4bSIvan Khoronzhuk #size-cells = <1>; 1607a962a4bSIvan Khoronzhuk clock-ranges; 1617a962a4bSIvan Khoronzhuk ranges; 1627a962a4bSIvan Khoronzhuk 1637a962a4bSIvan Khoronzhuk ti,cs-chipselect = <2>; 1647a962a4bSIvan Khoronzhuk /* all timings in nanoseconds */ 1657a962a4bSIvan Khoronzhuk ti,cs-min-turnaround-ns = <0>; 1667a962a4bSIvan Khoronzhuk ti,cs-read-hold-ns = <7>; 1677a962a4bSIvan Khoronzhuk ti,cs-read-strobe-ns = <42>; 1687a962a4bSIvan Khoronzhuk ti,cs-read-setup-ns = <14>; 1697a962a4bSIvan Khoronzhuk ti,cs-write-hold-ns = <7>; 1707a962a4bSIvan Khoronzhuk ti,cs-write-strobe-ns = <42>; 1717a962a4bSIvan Khoronzhuk ti,cs-write-setup-ns = <14>; 1727a962a4bSIvan Khoronzhuk 1737a962a4bSIvan Khoronzhuk nand@0,0x8000000 { 1747a962a4bSIvan Khoronzhuk compatible = "ti,davinci-nand"; 1757a962a4bSIvan Khoronzhuk reg = <0 0x8000000 0x4000000 1767a962a4bSIvan Khoronzhuk 1 0x0000000 0x0000100>; 1777a962a4bSIvan Khoronzhuk /* 1787a962a4bSIvan Khoronzhuk * Partition0, offset 0x8000000, size 0x4000000 1797a962a4bSIvan Khoronzhuk * Partition1, offset 0x0000000, size 0x0000100 1807a962a4bSIvan Khoronzhuk */ 1817a962a4bSIvan Khoronzhuk 1827a962a4bSIvan Khoronzhuk .. see davinci-nand.txt 1837a962a4bSIvan Khoronzhuk }; 1847a962a4bSIvan Khoronzhuk }; 1857a962a4bSIvan Khoronzhuk 1867a962a4bSIvan Khoronzhuk nor:cs0 { 1877a962a4bSIvan Khoronzhuk #address-cells = <2>; 1887a962a4bSIvan Khoronzhuk #size-cells = <1>; 1897a962a4bSIvan Khoronzhuk clock-ranges; 1907a962a4bSIvan Khoronzhuk ranges; 1917a962a4bSIvan Khoronzhuk 1927a962a4bSIvan Khoronzhuk ti,cs-chipselect = <0>; 1937a962a4bSIvan Khoronzhuk /* all timings in nanoseconds */ 1947a962a4bSIvan Khoronzhuk ti,cs-min-turnaround-ns = <0>; 1957a962a4bSIvan Khoronzhuk ti,cs-read-hold-ns = <8>; 1967a962a4bSIvan Khoronzhuk ti,cs-read-strobe-ns = <40>; 1977a962a4bSIvan Khoronzhuk ti,cs-read-setup-ns = <14>; 1987a962a4bSIvan Khoronzhuk ti,cs-write-hold-ns = <7>; 1997a962a4bSIvan Khoronzhuk ti,cs-write-strobe-ns = <40>; 2007a962a4bSIvan Khoronzhuk ti,cs-write-setup-ns = <14>; 2017a962a4bSIvan Khoronzhuk ti,cs-bus-width = <16>; 2027a962a4bSIvan Khoronzhuk 2037a962a4bSIvan Khoronzhuk flash@0,0x0000000 { 2047a962a4bSIvan Khoronzhuk compatible = "cfi-flash"; 2057a962a4bSIvan Khoronzhuk reg = <0 0x0000000 0x4000000>; 2067a962a4bSIvan Khoronzhuk 2077a962a4bSIvan Khoronzhuk ... 2087a962a4bSIvan Khoronzhuk }; 2097a962a4bSIvan Khoronzhuk }; 2107a962a4bSIvan Khoronzhuk}; 211