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

Linux 6.18.37 · Devicetree Bindings

NVIDIA Tegra20 NAND

Tegra20 NFC의 clock·reset, CS line과 RS·BCH hardware ECC입니다.

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

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

1. 요약·해설

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

요약과 해설

nvidia-tegra20-nand.txt:1-64

단일 NAND child와 boot ROM ECC 제한, write protect를 설명합니다.

2. 영어 원문 전체

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

원문 전체 펼치기
1 NVIDIA Tegra NAND Flash controller
2
3 Required properties:
4 - compatible: Must be one of:
5 - "nvidia,tegra20-nand"
6 - reg: MMIO address range
7 - interrupts: interrupt output of the NFC controller
8 - clocks: Must contain an entry for each entry in clock-names.
9 See ../clocks/clock-bindings.txt for details.
10 - clock-names: Must include the following entries:
11 - nand
12 - resets: Must contain an entry for each entry in reset-names.
13 See ../reset/reset.txt for details.
14 - reset-names: Must include the following entries:
15 - nand
16
17 Optional children nodes:
18 Individual NAND chips are children of the NAND controller node. Currently
19 only one NAND chip supported.
20
21 Required children node properties:
22 - reg: An integer ranging from 1 to 6 representing the CS line to use.
23
24 Optional children node properties:
25 - nand-ecc-mode: String, operation mode of the NAND ecc mode. Currently only
26 "hw" is supported.
27 - nand-ecc-algo: string, algorithm of NAND ECC.
28 Supported values with "hw" ECC mode are: "rs", "bch".
29 - nand-bus-width : See nand-controller.yaml
30 - nand-on-flash-bbt: See nand-controller.yaml
31 - nand-ecc-strength: integer representing the number of bits to correct
32 per ECC step (always 512). Supported strength using HW ECC
33 modes are:
34 - RS: 4, 6, 8
35 - BCH: 4, 8, 14, 16
36 - nand-ecc-maximize: See nand-controller.yaml
37 - nand-is-boot-medium: Makes sure only ECC strengths supported by the boot ROM
38 are chosen.
39 - wp-gpios: GPIO specifier for the write protect pin.
40
41 Optional child node of NAND chip nodes:
42 Partitions: see mtd.yaml
43
44 Example:
45 nand-controller@70008000 {
46 compatible = "nvidia,tegra20-nand";
47 reg = <0x70008000 0x100>;
48 interrupts = <GIC_SPI 24 IRQ_TYPE_LEVEL_HIGH>;
49 clocks = <&tegra_car TEGRA20_CLK_NDFLASH>;
50 clock-names = "nand";
51 resets = <&tegra_car 13>;
52 reset-names = "nand";
53
54 nand@0 {
55 reg = <0>;
56 #address-cells = <1>;
57 #size-cells = <1>;
58 nand-bus-width = <8>;
59 nand-on-flash-bbt;
60 nand-ecc-algo = "bch";
61 nand-ecc-strength = <8>;
62 wp-gpios = <&gpio TEGRA_GPIO(S, 0) GPIO_ACTIVE_LOW>;
63 };
64 };
65

3. 한국어 전문 번역

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

NVIDIA Tegra NAND controller

1-2

이 문서는 NVIDIA Tegra NAND Flash controller 바인딩입니다.

MMIO·interrupt·clock·reset

3-16

필수 `compatible`은 `nvidia,tegra20-nand`입니다. `reg`는 MMIO address 범위이고 `interrupts`는 NFC controller의 interrupt output입니다.

`clocks`에는 `clock-names`의 각 항목에 대응하는 entry가 있어야 하며 필수 이름은 `nand`입니다. `resets`도 `reset-names`의 각 항목에 대응하고 필수 이름은 `nand`입니다. Clock 형식은 `../clocks/clock-bindings.txt`, reset 형식은 `../reset/reset.txt`를 따릅니다.

NAND chip child와 CS line

17-23

개별 NAND chip은 controller node의 선택 child입니다. 현재는 NAND chip 하나만 지원합니다.

Child의 필수 `reg`는 사용할 CS line을 나타내는 1~6 범위의 정수입니다.

Tegra20 NAND 계층
Tegra20 NAND controllerOne NAND child
Child reg 1–6Chip-select line
Chip-select lineOne NAND child

Controller는 현재 하나의 NAND child만 지원하며 child의 reg가 CS line을 고릅니다.

Hardware RS·BCH ECC

24-43

선택 `nand-ecc-mode`는 ECC 동작 mode 문자열이며 현재 `hw`만 지원합니다. `nand-ecc-algo`의 hardware ECC algorithm은 `rs` 또는 `bch`입니다.

`nand-bus-width`와 `nand-on-flash-bbt`는 `nand-controller.yaml`을 따릅니다. `nand-ecc-strength`는 ECC step마다 정정할 bit 수이며 step은 항상 512입니다. RS는 4·6·8bit, BCH는 4·8·14·16bit strength를 지원합니다.

`nand-ecc-maximize`는 `nand-controller.yaml`을 따릅니다. `nand-is-boot-medium`은 boot ROM이 지원하는 ECC strength만 선택되도록 보장합니다. `wp-gpios`는 write-protect pin의 GPIO specifier입니다.

NAND chip 아래에는 선택적으로 partition child를 둘 수 있으며 `mtd.yaml`을 참조합니다.

Tegra20 hardware ECC strength
AlgorithmStrength
RS4, 6, 8
BCH4, 8, 14, 16

512-byte step에서 algorithm별 지원 correction bit 수입니다.

Tegra20 BCH 예제

44-64

예제는 `0x70008000`의 controller에 GIC SPI 24, `TEGRA20_CLK_NDFLASH` clock과 NAND reset을 연결합니다. CS0의 8-bit NAND는 on-flash BBT, BCH strength 8과 active-low `TEGRA_GPIO(S, 0)` write protect를 사용합니다.

nand-controller@70008000 {
        compatible = "nvidia,tegra20-nand";
        reg = <0x70008000 0x100>;
        interrupts = <GIC_SPI 24 IRQ_TYPE_LEVEL_HIGH>;
        clocks = <&tegra_car TEGRA20_CLK_NDFLASH>;
        clock-names = "nand";
        resets = <&tegra_car 13>;
        reset-names = "nand";

        nand@0 {
                reg = <0>;
                #address-cells = <1>;
                #size-cells = <1>;
                nand-bus-width = <8>;
                nand-on-flash-bbt;
                nand-ecc-algo = "bch";
                nand-ecc-strength = <8>;
                wp-gpios = <&gpio TEGRA_GPIO(S, 0) GPIO_ACTIVE_LOW>;
        };
};