← Documents Documentation/devicetree/bindings/memory-controllers/ti-aemif.txt GitHub 원문 ↗

Linux 6.18.37 · Devicetree Bindings

TI Async External Memory Interface

TI AEMIF의 네 비동기 메모리 chip-select, partition과 나노초 timing 바인딩입니다.

Source pathDocumentation/devicetree/bindings/memory-controllers/ti-aemif.txt
Source versionLinux v6.18.37
TranslationDUJINLABS 전문 번역 + 해설

요약·해설과 원문, 전문 번역을 서로 분리했습니다. API 이름, symbol, source path는 원문 표기를 사용합니다.

1. 요약·해설

원문의 핵심 논리와 kernel programming 관점의 보충 설명입니다. 아래의 전문 번역과는 별도로 작성했습니다.

요약과 해설

ti-aemif.txt:1-210

CS별 메모리와 공통 control partition, NAND·NOR 예제를 설명합니다.

2. 영어 원문 전체

번역 기준이 된 Linux v6.18.37 원문입니다. 줄 번호는 이 버전의 파일 좌표입니다.

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

3. 한국어 전문 번역

영어 원문의 문단 순서와 의미를 유지한 전체 번역입니다. 코드, 함수명, symbol과 URL은 원문 표기를 유지합니다.

TI Async External Memory Interface

1-9

Async External Memory Interface(EMIF16/AEMIF)는 비동기 SRAM, NOR, NAND 같은 여러 비동기 메모리에 별도 glue logic 없이 연결하는 컨트롤러입니다. chip select 네 개가 각각 64MiB를 제공하므로 한 시점에 총 256MiB를 접근할 수 있습니다.

DDR1 SDRAM, SDR SDRAM, Mobile SDR 같은 동기 메모리는 지원하지 않습니다.

AEMIF 주소 공간
Partition 0CS-specific 256MiB range
CS0..CS364MiB per chip select
Control partition N-1AEMIF registers
Child NOR / NAND / FPGASelected partition and offset

네 chip-select의 비동기 메모리 창과 모든 CS에 공통인 control partition을 별도 partition 번호로 표현합니다.

하드웨어 참고 문서

10-14

하드웨어 설명은 DaVinci DM646x의 `http://www.ti.com/lit/ug/sprueq7c/sprueq7c.pdf`, OMAP-L138(DA850)의 `http://www.ti.com/lit/ug/spruh77a/spruh77a.pdf`, Keystone의 `http://www.ti.com/lit/ug/sprugz3a/sprugz3a.pdf`를 참조합니다. 원문의 `Kestone` 표기는 Keystone을 가리킵니다.

컨트롤러 필수 속성

15-55

`compatible`은 `ti,davinci-aemif`, `ti,keystone-aemif`, `ti,da850-aemif` 중 하나입니다. `reg`는 AEMIF control register 공간의 offset과 length를 담습니다.

`#address-cells`는 2여야 합니다. 첫 address cell에는 0부터 N-1까지의 partition 번호를 인코딩하고 N은 전체 partition 수입니다. control partition에는 N-1을 배정하는 것이 권장됩니다. 둘째 cell은 partition 안의 offset입니다. `#size-cells`는 1입니다.

`ranges`에는 두 종류의 메모리 영역이 있습니다. CS별 partition/range가 연속이면 네 chip-select의 메모리 배치를 반영해야 합니다. 연속되지 않으면 range/partition을 더 추가하고 자식 장치가 알맞은 것을 선택할 수 있습니다. 다른 하나는 모든 CS 인터페이스가 공유하는 control partition입니다.

장치 트리에 clock tree 데이터가 있을 때만 `clocks`, `clock-names`, `clock-ranges`가 필요합니다. `clocks`는 컨트롤러 클록, `clock-names`는 반드시 `aemif`, 빈 `clock-ranges`는 자식 노드가 이름 있는 클록을 상속할 수 있음을 나타냅니다. clock tree 데이터가 없으면 `clock-names`를 사용하지 않습니다. 형식은 `clock-bindings.txt`를 따릅니다.

chip-select 자식 장치

56-59

chip-select(CS) 자식 노드에는 CFI flash 같은 NOR, `ti,davinci-nand` NAND 또는 보드별 FPGA 장치 노드를 둡니다. DaVinci NAND의 자세한 내용은 `davinci-nand.txt`를 봅니다.

CS 자식의 필수 속성

60-78

CS 자식의 `#address-cells`는 2, `#size-cells`는 1이어야 합니다. 빈 `ranges`는 자식이 메모리 배치를 상속함을 뜻합니다. clock tree 데이터가 있을 때는 빈 `clock-ranges`도 두어 이름 있는 클록을 상속하게 합니다.

`ti,cs-chipselect`는 메모리 접근에 사용할 chip-select 번호입니다. `ti,davinci-aemif`와 `ti,keystone-aemif`에서는 0~3, `ti,da850-aemif`에서는 2~5 범위입니다.

CS 버스와 strobe 선택 속성

79-94

`ti,cs-bus-width`는 비동기 장치 데이터 버스 폭으로 8 또는 16이며 생략하면 8입니다. `ti,cs-select-strobe-mode`가 있으면 select strobe mode를 활성화합니다. 이 모드에서 chip select는 strobe처럼 동작해 strobe 기간에만 active입니다.

`ti,cs-extended-wait-mode`가 있으면 extended wait mode를 활성화합니다. 컨트롤러는 해당 chip-select에 매핑된 EMIFWAIT 핀을 감시해 장치가 strobe 기간 연장을 요구하는지 판단합니다.

나노초 단위 CS timing

95-138

`ti,cs-min-turnaround-ns`는 한 비동기 메모리 접근 종료와 다음 접근 시작 사이의 최소 turnaround 시간입니다. 같은 chip-select에서 read 다음 read 또는 write 다음 write가 이어질 때는 이 지연을 적용하지 않습니다.

`ti,cs-read-setup-ns`는 memory cycle 시작부터 read strobe 활성화까지, `ti,cs-read-strobe-ns`는 read strobe 활성화부터 비활성화까지, `ti,cs-read-hold-ns`는 read strobe 비활성화부터 주소 변경 또는 chip-select 비활성화로 cycle이 끝날 때까지의 시간입니다.

`ti,cs-write-setup-ns`, `ti,cs-write-strobe-ns`, `ti,cs-write-hold-ns`는 각각 write cycle의 동일한 setup, active strobe, hold 구간입니다. read/write setup·strobe·hold 값의 최솟값은 1ns이며 0은 1로 처리됩니다.

AEMIF CS timing
구간ReadWrite
Setupti,cs-read-setup-nsti,cs-write-setup-ns
Strobe activeti,cs-read-strobe-nsti,cs-write-strobe-ns
Holdti,cs-read-hold-nsti,cs-write-hold-ns
Between accessesti,cs-min-turnaround-nsti,cs-min-turnaround-ns

메모리 cycle에서 read와 write strobe 전후의 나노초 구간을 대응시켰습니다.

위 매개변수 중 생략된 것이 있으면 해당 hardware register에 현재 들어 있는 값을 사용합니다.

DaVinci NAND와 NOR 예제

139-210

예제 컨트롤러는 `ti,davinci-aemif`이며 partition 0을 `0x70000000`의 연속 CS 메모리 영역에, partition 1을 `0x21000A00`의 control register 영역에 매핑합니다. AEMIF 클록과 클록 상속도 설정합니다.

NAND는 chip-select 2를 사용하고 partition 0의 offset `0x8000000`에서 64MiB, partition 1의 offset 0에서 256바이트를 요청합니다. NOR는 chip-select 0, 16비트 버스와 partition 0의 64MiB 영역을 사용합니다. 두 CS의 timing은 모두 나노초 단위이며 원문의 `.. see davinci-nand.txt`와 `...` 생략 표기를 그대로 보존합니다.

memory-controller@21000a00 {
        compatible = "ti,davinci-aemif";
        #address-cells = <2>;
        #size-cells = <1>;
        clocks = <&clkaemif 0>;
        clock-names = "aemif";
        clock-ranges;
        reg = <0x21000A00 0x00000100>;
        ranges = <0 0 0x70000000 0x10000000
                  1 0 0x21000A00 0x00000100>;
                  /*
                   * Partition0: CS-specific memory range which is
                   * implemented as continuous physical memory region
                   * Partition1: control memory range
                   */

        nand:cs2 {
                #address-cells = <2>;
                #size-cells = <1>;
                clock-ranges;
                ranges;

                ti,cs-chipselect = <2>;
                /* all timings in nanoseconds */
                ti,cs-min-turnaround-ns = <0>;
                ti,cs-read-hold-ns = <7>;
                ti,cs-read-strobe-ns = <42>;
                ti,cs-read-setup-ns = <14>;
                ti,cs-write-hold-ns = <7>;
                ti,cs-write-strobe-ns = <42>;
                ti,cs-write-setup-ns = <14>;

                nand@0,0x8000000 {
                        compatible = "ti,davinci-nand";
                        reg = <0 0x8000000 0x4000000
                               1 0x0000000 0x0000100>;
                        /*
                         * Partition0, offset 0x8000000, size 0x4000000
                         * Partition1, offset 0x0000000, size 0x0000100
                         */

                        .. see davinci-nand.txt
                };
        };

        nor:cs0 {
                #address-cells = <2>;
                #size-cells = <1>;
                clock-ranges;
                ranges;

                ti,cs-chipselect = <0>;
                /* all timings in nanoseconds */
                ti,cs-min-turnaround-ns = <0>;
                ti,cs-read-hold-ns = <8>;
                ti,cs-read-strobe-ns = <40>;
                ti,cs-read-setup-ns = <14>;
                ti,cs-write-hold-ns = <7>;
                ti,cs-write-strobe-ns = <40>;
                ti,cs-write-setup-ns = <14>;
                ti,cs-bus-width = <16>;

                flash@0,0x0000000 {
                        compatible = "cfi-flash";
                        reg = <0 0x0000000 0x4000000>;

                        ...
                };
        };
};