← Documents Documentation/devicetree/bindings/memory-controllers/atmel,ebi.txt GitHub 원문 ↗

Linux 6.18.37 · Devicetree Bindings

Atmel External Bus Interface

Atmel EBI의 chip-select 주소 공간과 SMC 모드·나노초 timing 바인딩입니다.

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

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

1. 요약·해설

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

요약과 해설

atmel,ebi.txt:1-137

비연속 메모리 범위, 조건부 필수 timing 11개와 SAMA5D3 NOR 예제를 설명합니다.

2. 영어 원문 전체

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

원문 전체 펼치기
1 * Device tree bindings for Atmel EBI
2
3 The External Bus Interface (EBI) controller is a bus where you can connect
4 asynchronous (NAND, NOR, SRAM, ....) and synchronous memories (SDR/DDR SDRAMs).
5 The EBI provides a glue-less interface to asynchronous memories through the SMC
6 (Static Memory Controller).
7
8 Required properties:
9
10 - compatible: "atmel,at91sam9260-ebi"
11 "atmel,at91sam9261-ebi"
12 "atmel,at91sam9263-ebi0"
13 "atmel,at91sam9263-ebi1"
14 "atmel,at91sam9rl-ebi"
15 "atmel,at91sam9g45-ebi"
16 "atmel,at91sam9x5-ebi"
17 "atmel,sama5d3-ebi"
18 "microchip,sam9x60-ebi"
19
20 - reg: Contains offset/length value for EBI memory mapping.
21 This property might contain several entries if the EBI
22 memory range is not contiguous
23
24 - #address-cells: Must be 2.
25 The first cell encodes the CS.
26 The second cell encode the offset into the CS memory
27 range.
28
29 - #size-cells: Must be set to 1.
30
31 - ranges: Encodes CS to memory region association.
32
33 - clocks: Clock feeding the EBI controller.
34 See clock-bindings.txt
35
36 Children device nodes are representing device connected to the EBI bus.
37
38 Required device node properties:
39
40 - reg: Contains the chip-select id, the offset and the length
41 of the memory region requested by the device.
42
43 EBI bus configuration will be defined directly in the device subnode.
44
45 Optional EBI/SMC properties:
46
47 - atmel,smc-bus-width: width of the asynchronous device's data bus
48 8, 16 or 32.
49 Default to 8 when undefined.
50
51 - atmel,smc-byte-access-type "write" or "select" (see Atmel datasheet).
52 Default to "select" when undefined.
53
54 - atmel,smc-read-mode "nrd" or "ncs".
55 Default to "ncs" when undefined.
56
57 - atmel,smc-write-mode "nwe" or "ncs".
58 Default to "ncs" when undefined.
59
60 - atmel,smc-exnw-mode "disabled", "frozen" or "ready".
61 Default to "disabled" when undefined.
62
63 - atmel,smc-page-mode enable page mode if present. The provided value
64 defines the page size (supported values: 4, 8,
65 16 and 32).
66
67 - atmel,smc-tdf-mode: "normal" or "optimized". When set to
68 "optimized" the data float time is optimized
69 depending on the next device being accessed
70 (next device setup time is subtracted to the
71 current device data float time).
72 Default to "normal" when undefined.
73
74 If at least one atmel,smc- property is defined the following SMC timing
75 properties become mandatory. In the other hand, if none of the atmel,smc-
76 properties are specified, we assume that the EBI bus configuration will be
77 handled by the sub-device driver, and none of those properties should be
78 defined.
79
80 All the timings are expressed in nanoseconds (see Atmel datasheet for a full
81 description).
82
83 - atmel,smc-ncs-rd-setup-ns
84 - atmel,smc-nrd-setup-ns
85 - atmel,smc-ncs-wr-setup-ns
86 - atmel,smc-nwe-setup-ns
87 - atmel,smc-ncs-rd-pulse-ns
88 - atmel,smc-nrd-pulse-ns
89 - atmel,smc-ncs-wr-pulse-ns
90 - atmel,smc-nwe-pulse-ns
91 - atmel,smc-nwe-cycle-ns
92 - atmel,smc-nrd-cycle-ns
93 - atmel,smc-tdf-ns
94
95 Example:
96
97 ebi: ebi@10000000 {
98 compatible = "atmel,sama5d3-ebi";
99 #address-cells = <2>;
100 #size-cells = <1>;
101 atmel,smc = <&hsmc>;
102 atmel,matrix = <&matrix>;
103 reg = <0x10000000 0x10000000
104 0x40000000 0x30000000>;
105 ranges = <0x0 0x0 0x10000000 0x10000000
106 0x1 0x0 0x40000000 0x10000000
107 0x2 0x0 0x50000000 0x10000000
108 0x3 0x0 0x60000000 0x10000000>;
109 clocks = <&mck>;
110
111 pinctrl-names = "default";
112 pinctrl-0 = <&pinctrl_ebi_addr>;
113
114 nor: flash@0,0 {
115 compatible = "cfi-flash";
116 #address-cells = <1>;
117 #size-cells = <1>;
118 reg = <0x0 0x0 0x1000000>;
119 bank-width = <2>;
120
121 atmel,smc-read-mode = "nrd";
122 atmel,smc-write-mode = "nwe";
123 atmel,smc-bus-width = <16>;
124 atmel,smc-ncs-rd-setup-ns = <0>;
125 atmel,smc-ncs-wr-setup-ns = <0>;
126 atmel,smc-nwe-setup-ns = <8>;
127 atmel,smc-nrd-setup-ns = <16>;
128 atmel,smc-ncs-rd-pulse-ns = <84>;
129 atmel,smc-ncs-wr-pulse-ns = <84>;
130 atmel,smc-nrd-pulse-ns = <76>;
131 atmel,smc-nwe-pulse-ns = <76>;
132 atmel,smc-nrd-cycle-ns = <107>;
133 atmel,smc-nwe-cycle-ns = <84>;
134 atmel,smc-tdf-ns = <16>;
135 };
136 };
137
138

3. 한국어 전문 번역

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

Atmel External Bus Interface

1-7

External Bus Interface(EBI)는 NAND, NOR, SRAM 같은 비동기 메모리와 SDR/DDR SDRAM 같은 동기 메모리를 연결하는 버스 컨트롤러입니다. EBI는 Static Memory Controller(SMC)를 통해 비동기 메모리에 별도 glue logic이 필요 없는 인터페이스를 제공합니다.

Atmel EBI 메모리 연결
CPU address spaceEBI ranges
Chip select and offsetEBI child device
SMC timingNAND / NOR / SRAM
Synchronous interfaceSDR / DDR SDRAM

EBI 주소 공간의 chip-select 창마다 자식 장치를 두고 비동기 장치는 SMC timing으로 구동합니다.

컨트롤러 필수 속성

8-37

`compatible`은 SoC에 따라 `atmel,at91sam9260-ebi`, `atmel,at91sam9261-ebi`, `atmel,at91sam9263-ebi0`, `atmel,at91sam9263-ebi1`, `atmel,at91sam9rl-ebi`, `atmel,at91sam9g45-ebi`, `atmel,at91sam9x5-ebi`, `atmel,sama5d3-ebi`, `microchip,sam9x60-ebi` 중 하나입니다.

`reg`는 EBI 메모리 매핑의 offset과 length를 담습니다. EBI 메모리 범위가 연속되지 않으면 여러 항목을 가질 수 있습니다. `#address-cells`는 2여야 하며 첫 cell은 chip select(CS), 둘째 cell은 해당 CS 메모리 범위 안의 offset을 인코딩합니다. `#size-cells`는 1이어야 합니다.

`ranges`는 CS와 메모리 영역의 대응 관계를 인코딩합니다. `clocks`는 EBI 컨트롤러에 공급되는 클록이며 형식은 `clock-bindings.txt`를 봅니다. EBI 버스에 연결된 실제 장치는 자식 노드로 나타냅니다.

자식 장치의 필수 영역

38-44

자식 장치의 `reg`에는 장치가 요구하는 메모리 영역의 chip-select ID, offset, length를 넣습니다. EBI 버스 구성은 장치 자식 노드 안에 직접 정의합니다.

선택 EBI/SMC 동작 모드

45-73

`atmel,smc-bus-width`는 비동기 장치 데이터 버스 폭으로 8, 16, 32 중 하나이며 생략 시 8입니다. `atmel,smc-byte-access-type`은 Atmel 데이터시트의 `write` 또는 `select`이고 기본값은 `select`입니다.

`atmel,smc-read-mode`는 `nrd` 또는 `ncs`, `atmel,smc-write-mode`는 `nwe` 또는 `ncs`이며 둘 다 기본값은 `ncs`입니다. `atmel,smc-exnw-mode`는 `disabled`, `frozen`, `ready` 중 하나이고 기본값은 `disabled`입니다.

`atmel,smc-page-mode`가 있으면 page mode를 활성화하며 값은 page 크기 4, 8, 16, 32 중 하나입니다. `atmel,smc-tdf-mode`는 `normal` 또는 `optimized`입니다. `optimized`에서는 다음에 접근할 장치의 setup time을 현재 장치의 data float time에서 빼서 float time을 최적화합니다. 생략 시 `normal`입니다.

나노초 단위 SMC timing

74-94

`atmel,smc-` 속성을 하나라도 정의하면 아래 SMC timing 속성이 모두 필수가 됩니다. 반대로 하나도 지정하지 않으면 자식 장치 드라이버가 EBI 버스를 구성한다고 간주하며 이 timing 속성도 어느 것도 정의하면 안 됩니다. 모든 timing 값의 단위는 나노초이며 전체 의미는 Atmel 데이터시트를 참조합니다.

Atmel SMC timing 속성
구분읽기쓰기 또는 공통
CS setupatmel,smc-ncs-rd-setup-nsatmel,smc-ncs-wr-setup-ns
Strobe setupatmel,smc-nrd-setup-nsatmel,smc-nwe-setup-ns
CS pulseatmel,smc-ncs-rd-pulse-nsatmel,smc-ncs-wr-pulse-ns
Strobe pulseatmel,smc-nrd-pulse-nsatmel,smc-nwe-pulse-ns
Cycleatmel,smc-nrd-cycle-nsatmel,smc-nwe-cycle-ns
Data float-atmel,smc-tdf-ns

원문에 나열된 setup, pulse, cycle, data-float timing 이름을 기능별로 정리했습니다.

필수 목록은 `atmel,smc-ncs-rd-setup-ns`, `atmel,smc-nrd-setup-ns`, `atmel,smc-ncs-wr-setup-ns`, `atmel,smc-nwe-setup-ns`, `atmel,smc-ncs-rd-pulse-ns`, `atmel,smc-nrd-pulse-ns`, `atmel,smc-ncs-wr-pulse-ns`, `atmel,smc-nwe-pulse-ns`, `atmel,smc-nwe-cycle-ns`, `atmel,smc-nrd-cycle-ns`, `atmel,smc-tdf-ns`입니다.

SAMA5D3 NOR flash 예제

95-137

예제 EBI는 서로 떨어진 `0x10000000`과 `0x40000000` 물리 범위를 매핑하고 CS0부터 CS3까지 각각 256MiB 창을 구성합니다. HSMC, matrix, MCK와 기본 핀 제어 상태를 연결합니다.

CS0의 CFI NOR flash는 16MiB 영역과 16비트 bank 폭을 사용합니다. 읽기는 NRD, 쓰기는 NWE 모드이며 setup, pulse, cycle, data-float 값을 나노초로 지정합니다.

ebi: ebi@10000000 {
        compatible = "atmel,sama5d3-ebi";
        #address-cells = <2>;
        #size-cells = <1>;
        atmel,smc = <&hsmc>;
        atmel,matrix = <&matrix>;
        reg = <0x10000000 0x10000000
               0x40000000 0x30000000>;
        ranges = <0x0 0x0 0x10000000 0x10000000
                  0x1 0x0 0x40000000 0x10000000
                  0x2 0x0 0x50000000 0x10000000
                  0x3 0x0 0x60000000 0x10000000>;
        clocks = <&mck>;

        pinctrl-names = "default";
        pinctrl-0 = <&pinctrl_ebi_addr>;

        nor: flash@0,0 {
                compatible = "cfi-flash";
                #address-cells = <1>;
                #size-cells = <1>;
                reg = <0x0 0x0 0x1000000>;
                bank-width = <2>;

                atmel,smc-read-mode = "nrd";
                atmel,smc-write-mode = "nwe";
                atmel,smc-bus-width = <16>;
                atmel,smc-ncs-rd-setup-ns = <0>;
                atmel,smc-ncs-wr-setup-ns = <0>;
                atmel,smc-nwe-setup-ns = <8>;
                atmel,smc-nrd-setup-ns = <16>;
                atmel,smc-ncs-rd-pulse-ns = <84>;
                atmel,smc-ncs-wr-pulse-ns = <84>;
                atmel,smc-nrd-pulse-ns = <76>;
                atmel,smc-nwe-pulse-ns = <76>;
                atmel,smc-nrd-cycle-ns = <107>;
                atmel,smc-nwe-cycle-ns = <84>;
                atmel,smc-tdf-ns = <16>;
        };
};