← Documents Documentation/devicetree/bindings/mtd/hisi504-nand.txt GitHub 원문 ↗

Linux 6.18.37 · Devicetree Bindings

HiSilicon Hip04 NAND

Hip04 NFC의 register·buffer와 16bit/1024byte hardware ECC 바인딩입니다.

Source pathDocumentation/devicetree/bindings/mtd/hisi504-nand.txt
Source versionLinux v6.18.37
TranslationDUJINLABS 전문 번역 + 해설

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

1. 요약·해설

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

요약과 해설

hisi504-nand.txt:1-47

두 MMIO 범위, ECC 조합과 nand_text partition 예제를 설명합니다.

2. 영어 원문 전체

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

원문 전체 펼치기
1 Hisilicon Hip04 Soc NAND controller DT binding
2
3 Required properties:
4
5 - compatible: Should be "hisilicon,504-nfc".
6 - reg: The first contains base physical address and size of
7 NAND controller's registers. The second contains base
8 physical address and size of NAND controller's buffer.
9 - interrupts: Interrupt number for nfc.
10 - nand-bus-width: See nand-controller.yaml.
11 - nand-ecc-mode: Support none and hw ecc mode.
12 - #address-cells: Partition address, should be set 1.
13 - #size-cells: Partition size, should be set 1.
14
15 Optional properties:
16
17 - nand-ecc-strength: Number of bits to correct per ECC step.
18 - nand-ecc-step-size: Number of data bytes covered by a single ECC step.
19
20 The following ECC strength and step size are currently supported:
21
22 - nand-ecc-strength = <16>, nand-ecc-step-size = <1024>
23
24 Flash chip may optionally contain additional sub-nodes describing partitions of
25 the address space. See mtd.yaml for more detail.
26
27 Example:
28
29 nand: nand@4020000 {
30 compatible = "hisilicon,504-nfc";
31 reg = <0x4020000 0x10000>, <0x5000000 0x1000>;
32 interrupts = <0 379 4>;
33 nand-bus-width = <8>;
34 nand-ecc-mode = "hw";
35 nand-ecc-strength = <16>;
36 nand-ecc-step-size = <1024>;
37 #address-cells = <1>;
38 #size-cells = <1>;
39
40 partition@0 {
41 label = "nand_text";
42 reg = <0x00000000 0x00400000>;
43 };
44
45 ...
46
47 };
48

3. 한국어 전문 번역

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

HiSilicon Hip04 NAND controller

1-2

이 문서는 HiSilicon Hip04 SoC의 NAND controller device-tree 바인딩입니다.

Controller·buffer와 기본 ECC

3-14

필수 `compatible`은 `hisilicon,504-nfc`입니다. `reg`의 첫 범위는 NAND controller register의 physical base와 크기이고, 두 번째 범위는 controller buffer의 physical base와 크기입니다.

`interrupts`는 NFC interrupt 번호입니다. `nand-bus-width`는 `nand-controller.yaml`을 따르고, `nand-ecc-mode`는 `none`과 hardware ECC인 `hw`를 지원합니다.

Partition 주소를 위한 `#address-cells`와 partition 크기를 위한 `#size-cells`는 모두 1로 설정해야 합니다.

Hip04 NFC resource
Controller register rangeHiSilicon 504 NFC
Controller buffer rangeHiSilicon 504 NFC
HiSilicon 504 NFCNFC interrupt

분리된 controller register와 data buffer가 하나의 NFC interrupt를 사용합니다.

ECC strength·step과 partition

15-26

선택 `nand-ecc-strength`는 ECC step마다 정정할 bit 수이고, `nand-ecc-step-size`는 하나의 ECC step이 보호하는 data byte 수입니다.

현재 지원하는 조합은 `nand-ecc-strength = <16>`과 `nand-ecc-step-size = <1024>`뿐입니다.

Flash chip에는 address space partition을 설명하는 subnode를 선택적으로 둘 수 있으며 자세한 형식은 `mtd.yaml`을 따릅니다.

Hip04 ECC 지원 조합
ECC strengthStep size
16 bits1024 bytes

현재 controller가 지원하는 hardware ECC 조합입니다.

Hip04 hardware ECC 예제

27-47

예제는 register `0x4020000`과 buffer `0x5000000`, interrupt 379, 8-bit NAND bus, hardware ECC 16bit/1024byte를 지정합니다. 첫 partition `nand_text`는 offset 0에서 4MB를 차지합니다.

nand: nand@4020000 {
        compatible = "hisilicon,504-nfc";
        reg = <0x4020000 0x10000>, <0x5000000 0x1000>;
        interrupts = <0 379 4>;
        nand-bus-width = <8>;
        nand-ecc-mode = "hw";
        nand-ecc-strength = <16>;
        nand-ecc-step-size = <1024>;
        #address-cells = <1>;
        #size-cells = <1>;

        partition@0 {
                label = "nand_text";
                reg = <0x00000000 0x00400000>;
        };

        ...

};