요약·해설과 원문, 전문 번역을 서로 분리했습니다. API 이름, symbol, source path는 원문 표기를 사용합니다.
1. 요약·해설
원문의 핵심 논리와 kernel programming 관점의 보충 설명입니다. 아래의 전문 번역과는 별도로 작성했습니다.
2. 영어 원문 전체
번역 기준이 된 Linux v6.18.37 원문입니다. 줄 번호는 이 버전의 파일 좌표입니다.
원문 전체 펼치기
* Device tree bindings for Atmel EBI
The External Bus Interface (EBI) controller is a bus where you can connect
asynchronous (NAND, NOR, SRAM, ....) and synchronous memories (SDR/DDR SDRAMs).
The EBI provides a glue-less interface to asynchronous memories through the SMC
(Static Memory Controller).
Required properties:
- compatible: "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: Contains offset/length value for EBI memory mapping.
This property might contain several entries if the EBI
memory range is not contiguous
- #address-cells: Must be 2.
The first cell encodes the CS.
The second cell encode the offset into the CS memory
range.
- #size-cells: Must be set to 1.
- ranges: Encodes CS to memory region association.
- clocks: Clock feeding the EBI controller.
See clock-bindings.txt
Children device nodes are representing device connected to the EBI bus.
Required device node properties:
- reg: Contains the chip-select id, the offset and the length
of the memory region requested by the device.
EBI bus configuration will be defined directly in the device subnode.
Optional EBI/SMC properties:
- atmel,smc-bus-width: width of the asynchronous device's data bus
8, 16 or 32.
Default to 8 when undefined.
- atmel,smc-byte-access-type "write" or "select" (see Atmel datasheet).
Default to "select" when undefined.
- atmel,smc-read-mode "nrd" or "ncs".
Default to "ncs" when undefined.
- atmel,smc-write-mode "nwe" or "ncs".
Default to "ncs" when undefined.
- atmel,smc-exnw-mode "disabled", "frozen" or "ready".
Default to "disabled" when undefined.
- atmel,smc-page-mode enable page mode if present. The provided value
defines the page size (supported values: 4, 8,
16 and 32).
- atmel,smc-tdf-mode: "normal" or "optimized". When set to
"optimized" the data float time is optimized
depending on the next device being accessed
(next device setup time is subtracted to the
current device data float time).
Default to "normal" when undefined.
If at least one atmel,smc- property is defined the following SMC timing
properties become mandatory. In the other hand, if none of the atmel,smc-
properties are specified, we assume that the EBI bus configuration will be
handled by the sub-device driver, and none of those properties should be
defined.
All the timings are expressed in nanoseconds (see Atmel datasheet for a full
description).
- 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
Example:
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>;
};
};
3. 한국어 전문 번역
영어 원문의 문단 순서와 의미를 유지한 전체 번역입니다. 코드, 함수명, symbol과 URL은 원문 표기를 유지합니다.
Atmel External Bus Interface
1-7External Bus Interface(EBI)는 NAND, NOR, SRAM 같은 비동기 메모리와 SDR/DDR SDRAM 같은 동기 메모리를 연결하는 버스 컨트롤러입니다. EBI는 Static Memory Controller(SMC)를 통해 비동기 메모리에 별도 glue logic이 필요 없는 인터페이스를 제공합니다.
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 데이터시트를 참조합니다.
원문에 나열된 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>;
};
};
요약과 해설
atmel,ebi.txt:1-137비연속 메모리 범위, 조건부 필수 timing 11개와 SAMA5D3 NOR 예제를 설명합니다.