← Documents Documentation/devicetree/bindings/spi/rockchip-sfc.yaml GitHub 원문 ↗

Linux 6.18.37 · Devicetree Bindings / SPI

Rockchip Serial Flash Controller

Rockchip SFC의 version register, clock·FIFO mode와 flash child 범위를 설명합니다.

Source pathDocumentation/devicetree/bindings/spi/rockchip-sfc.yaml
Source versionLinux v6.18.37
TranslationDUJINLABS 전문 번역 + 해설

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

1. 요약·해설

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

요약과 해설

rockchip-sfc.yaml:1-93

Rockchip SFC의 version register, clock·FIFO mode와 flash child 범위를 설명합니다. 접을 수 있는 영어 원문 전체와 줄 좌표를 보존하고, 한국어 전문 번역에서는 compatible·property·phandle·interrupt·clock/DMA·chip-select 순서·수치·조건부 제약·예제 코드를 원형대로 유지합니다.

2. 영어 원문 전체

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

원문 전체 펼치기
1 # SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
2 %YAML 1.2
3 ---
4 $id: http://devicetree.org/schemas/spi/rockchip-sfc.yaml#
5 $schema: http://devicetree.org/meta-schemas/core.yaml#
6
7 title: Rockchip Serial Flash Controller (SFC)
8
9 maintainers:
10 - Heiko Stuebner <[email protected]>
11 - Chris Morgan <[email protected]>
12
13 allOf:
14 - $ref: spi-controller.yaml#
15
16 properties:
17 compatible:
18 const: rockchip,sfc
19 description:
20 The rockchip sfc controller is a standalone IP with version register,
21 and the driver can handle all the feature difference inside the IP
22 depending on the version register.
23
24 reg:
25 maxItems: 1
26
27 interrupts:
28 maxItems: 1
29
30 clocks:
31 items:
32 - description: Bus Clock
33 - description: Module Clock
34
35 clock-names:
36 items:
37 - const: clk_sfc
38 - const: hclk_sfc
39
40 power-domains:
41 maxItems: 1
42
43 rockchip,sfc-no-dma:
44 description: Disable DMA and utilize FIFO mode only
45 type: boolean
46
47 patternProperties:
48 "^flash@[0-3]$":
49 type: object
50 additionalProperties: true
51
52 properties:
53 reg:
54 minimum: 0
55 maximum: 3
56
57 required:
58 - compatible
59 - reg
60 - interrupts
61 - clocks
62 - clock-names
63
64 unevaluatedProperties: false
65
66 examples:
67 - |
68 #include <dt-bindings/clock/px30-cru.h>
69 #include <dt-bindings/interrupt-controller/arm-gic.h>
70 #include <dt-bindings/power/px30-power.h>
71
72 sfc: spi@ff3a0000 {
73 compatible = "rockchip,sfc";
74 reg = <0xff3a0000 0x4000>;
75 interrupts = <GIC_SPI 56 IRQ_TYPE_LEVEL_HIGH>;
76 clocks = <&cru SCLK_SFC>, <&cru HCLK_SFC>;
77 clock-names = "clk_sfc", "hclk_sfc";
78 pinctrl-0 = <&sfc_clk &sfc_cs &sfc_bus2>;
79 pinctrl-names = "default";
80 power-domains = <&power PX30_PD_MMC_NAND>;
81 #address-cells = <1>;
82 #size-cells = <0>;
83
84 flash@0 {
85 compatible = "jedec,spi-nor";
86 reg = <0>;
87 spi-max-frequency = <108000000>;
88 spi-rx-bus-width = <2>;
89 spi-tx-bus-width = <2>;
90 };
91 };
92
93 ...
94

3. 한국어 전문 번역

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

Rockchip SFC schema

1-15

이 GPL-2.0-only 또는 BSD-2-Clause YAML schema는 Rockchip Serial Flash Controller(SFC)를 정의합니다. Schema ID는 `http://devicetree.org/schemas/spi/rockchip-sfc.yaml#`이며 maintainer는 Heiko Stuebner와 Chris Morgan입니다.

공통 `spi-controller.yaml#`의 SPI controller 속성을 상속합니다.

Version register, clock과 DMA mode

16-46

`compatible`은 `rockchip,sfc`로 고정됩니다. Rockchip SFC는 version register를 가진 독립형 IP이며 driver는 그 register 값에 따라 IP version별 feature 차이를 내부에서 처리합니다.

`reg`와 `interrupts`는 각각 최대 한 항목입니다. `clocks`는 bus clock과 module clock 두 항목이고 `clock-names`는 같은 순서로 `clk_sfc`, `hclk_sfc`입니다. `power-domains`는 최대 한 항목입니다.

Boolean `rockchip,sfc-no-dma`를 지정하면 DMA를 비활성화하고 FIFO mode만 사용합니다.

Flash child 주소 범위

47-56

정규식 `^flash@[0-3]$`에 맞는 child node는 object이며 추가 속성을 허용합니다. Child의 `reg` 값은 chip select 번호 0~3 범위여야 합니다.

필수 속성과 추가 속성 제한

57-65

필수 속성은 `compatible`, `reg`, `interrupts`, `clocks`, `clock-names`입니다. `unevaluatedProperties: false`로 평가되지 않은 controller 속성을 금지합니다.

PX30 SFC와 dual-I/O NOR 예제

66-93

예제는 PX30의 `sfc: spi@ff3a0000`에 register `0xff3a0000`, GIC SPI 56, `SCLK_SFC`와 `HCLK_SFC`, MMC/NAND power domain과 SFC pinctrl을 연결합니다.

Chip select 0의 JEDEC SPI NOR는 최대 `108000000`Hz와 RX/TX bus width 2를 사용합니다. 마지막 `...`는 YAML document 종료 표기입니다.

#include <dt-bindings/clock/px30-cru.h>
#include <dt-bindings/interrupt-controller/arm-gic.h>
#include <dt-bindings/power/px30-power.h>

sfc: spi@ff3a0000 {
    compatible = "rockchip,sfc";
    reg = <0xff3a0000 0x4000>;
    interrupts = <GIC_SPI 56 IRQ_TYPE_LEVEL_HIGH>;
    clocks = <&cru SCLK_SFC>, <&cru HCLK_SFC>;
    clock-names = "clk_sfc", "hclk_sfc";
    pinctrl-0 = <&sfc_clk &sfc_cs &sfc_bus2>;
    pinctrl-names = "default";
    power-domains = <&power PX30_PD_MMC_NAND>;
    #address-cells = <1>;
    #size-cells = <0>;

    flash@0 {
        compatible = "jedec,spi-nor";
        reg = <0>;
        spi-max-frequency = <108000000>;
        spi-rx-bus-width = <2>;
        spi-tx-bus-width = <2>;
    };
};