요약·해설과 원문, 전문 번역을 서로 분리했습니다. API 이름, symbol, source path는 원문 표기를 사용합니다.
1. 요약·해설
원문의 핵심 논리와 kernel programming 관점의 보충 설명입니다. 아래의 전문 번역과는 별도로 작성했습니다.
2. 영어 원문 전체
번역 기준이 된 Linux v6.18.37 원문입니다. 줄 번호는 이 버전의 파일 좌표입니다.
원문 전체 펼치기
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/spi/rockchip-sfc.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: Rockchip Serial Flash Controller (SFC)
maintainers:
- Heiko Stuebner <heiko@sntech.de>
- Chris Morgan <macromorgan@hotmail.com>
allOf:
- $ref: spi-controller.yaml#
properties:
compatible:
const: rockchip,sfc
description:
The rockchip sfc controller is a standalone IP with version register,
and the driver can handle all the feature difference inside the IP
depending on the version register.
reg:
maxItems: 1
interrupts:
maxItems: 1
clocks:
items:
- description: Bus Clock
- description: Module Clock
clock-names:
items:
- const: clk_sfc
- const: hclk_sfc
power-domains:
maxItems: 1
rockchip,sfc-no-dma:
description: Disable DMA and utilize FIFO mode only
type: boolean
patternProperties:
"^flash@[0-3]$":
type: object
additionalProperties: true
properties:
reg:
minimum: 0
maximum: 3
required:
- compatible
- reg
- interrupts
- clocks
- clock-names
unevaluatedProperties: false
examples:
- |
#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>;
};
};
...
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>;
};
};
요약과 해설
rockchip-sfc.yaml:1-93Rockchip SFC의 version register, clock·FIFO mode와 flash child 범위를 설명합니다. 접을 수 있는 영어 원문 전체와 줄 좌표를 보존하고, 한국어 전문 번역에서는 compatible·property·phandle·interrupt·clock/DMA·chip-select 순서·수치·조건부 제약·예제 코드를 원형대로 유지합니다.