요약·해설과 원문, 전문 번역을 서로 분리했습니다. API 이름, symbol, source path는 원문 표기를 사용합니다.
1. 요약·해설
원문의 핵심 논리와 kernel programming 관점의 보충 설명입니다. 아래의 전문 번역과는 별도로 작성했습니다.
2. 영어 원문 전체
번역 기준이 된 Linux v6.18.37 원문입니다. 줄 번호는 이 버전의 파일 좌표입니다.
원문 전체 펼치기
GPIO assisted NAND flash
The GPIO assisted NAND flash uses a memory mapped interface to
read/write the NAND commands and data and GPIO pins for the control
signals.
Required properties:
- compatible : "gpio-control-nand"
- reg : should specify localbus chip select and size used for the chip. The
resource describes the data bus connected to the NAND flash and all accesses
are made in native endianness.
- #address-cells, #size-cells : Must be present if the device has sub-nodes
representing partitions.
- gpios : Specifies the GPIO pins to control the NAND device. The order of
GPIO references is: RDY, nCE, ALE, CLE, and nWP. nCE and nWP are optional.
Optional properties:
- bank-width : Width (in bytes) of the device. If not present, the width
defaults to 1 byte.
- chip-delay : chip dependent delay for transferring data from array to
read registers (tR). If not present then a default of 20us is used.
- gpio-control-nand,io-sync-reg : A 64-bit physical address for a read
location used to guard against bus reordering with regards to accesses to
the GPIO's and the NAND flash data bus. If present, then after changing
GPIO state and before and after command byte writes, this register will be
read to ensure that the GPIO accesses have completed.
The device tree may optionally contain sub-nodes describing partitions of the
address space. See mtd.yaml for more detail.
Examples:
gpio-nand@1,0 {
compatible = "gpio-control-nand";
reg = <1 0x0000 0x2>;
#address-cells = <1>;
#size-cells = <1>;
gpios = <&banka 1 0>, /* RDY */
<0>, /* nCE */
<&banka 3 0>, /* ALE */
<&banka 4 0>, /* CLE */
<0>; /* nWP */
partition@0 {
...
};
};
3. 한국어 전문 번역
영어 원문의 문단 순서와 의미를 유지한 전체 번역입니다. 코드, 함수명, symbol과 URL은 원문 표기를 유지합니다.
GPIO-assisted NAND
1-6GPIO-assisted NAND flash는 memory-mapped interface로 NAND command와 data를 읽고 쓰며, control signal에는 GPIO pin을 사용합니다.
Memory bus는 command/data를 전달하고 GPIO는 control signal을 담당합니다.
Native-endian bus와 GPIO 순서
7-16필수 `compatible`은 `gpio-control-nand`입니다. `reg`는 chip에 사용하는 localbus chip-select와 크기를 지정하며, 이 resource는 NAND data bus를 나타냅니다. 모든 access는 native endianness로 수행됩니다.
Partition subnode가 있으면 `#address-cells`와 `#size-cells`가 필수입니다. `gpios`의 참조 순서는 `RDY`, `nCE`, `ALE`, `CLE`, `nWP`이며 `nCE`와 `nWP`는 선택입니다.
`gpios` array의 위치와 선택 여부를 보존해야 합니다.
Width·tR delay·I/O synchronization
17-30선택 `bank-width`는 byte 단위 device width이며 기본값은 1 byte입니다. `chip-delay`는 array에서 read register로 data를 전송하는 chip별 tR delay이며 기본값은 20µs입니다.
`gpio-control-nand,io-sync-reg`는 GPIO와 NAND data bus access의 bus reordering을 막기 위해 읽는 위치의 64-bit physical address입니다. 이 속성이 있으면 GPIO state 변경 뒤와 command byte write 전후에 해당 register를 읽어 GPIO access 완료를 보장합니다.
Device tree에는 address space partition을 설명하는 subnode를 선택적으로 둘 수 있으며 자세한 형식은 `mtd.yaml`을 따릅니다.
GPIO NAND 예제
31-47예제는 localbus CS1의 2-byte data resource를 사용합니다. RDY는 banka pin 1, ALE는 pin 3, CLE는 pin 4이며 선택 `nCE`와 `nWP`는 0으로 비워 둡니다. Partition subnode도 포함합니다.
gpio-nand@1,0 {
compatible = "gpio-control-nand";
reg = <1 0x0000 0x2>;
#address-cells = <1>;
#size-cells = <1>;
gpios = <&banka 1 0>, /* RDY */
<0>, /* nCE */
<&banka 3 0>, /* ALE */
<&banka 4 0>, /* CLE */
<0>; /* nWP */
partition@0 {
...
};
};
요약과 해설
gpio-control-nand.txt:1-47GPIO 순서, tR delay와 bus reordering 방지 register를 설명합니다.