← Documents Documentation/devicetree/bindings/spi/loongson,ls2k-spi.yaml GitHub 원문 ↗

Linux 6.18.37 · Devicetree Bindings / SPI

Loongson LS2K SPI controller

LS2K1000과 LS2K0500 SPI compatible 및 clock binding을 설명합니다.

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

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

1. 요약·해설

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

요약과 해설

loongson,ls2k-spi.yaml:1-46

LS2K1000과 LS2K0500 SPI compatible 및 clock binding을 설명합니다. 접을 수 있는 영어 원문 전체와 줄 좌표를 보존하고, 한국어 전문 번역에서는 compatible·property·phandle·수치·예제 코드를 원형대로 유지합니다.

2. 영어 원문 전체

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

원문 전체 펼치기
1 # SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
2 %YAML 1.2
3 ---
4 $id: http://devicetree.org/schemas/spi/loongson,ls2k-spi.yaml#
5 $schema: http://devicetree.org/meta-schemas/core.yaml#
6
7 title: Loongson SPI controller
8
9 maintainers:
10 - Yinbo Zhu <zhuyinbo@loongson.cn>
11
12 allOf:
13 - $ref: /schemas/spi/spi-controller.yaml#
14
15 properties:
16 compatible:
17 oneOf:
18 - enum:
19 - loongson,ls2k1000-spi
20 - items:
21 - enum:
22 - loongson,ls2k0500-spi
23 - const: loongson,ls2k1000-spi
24
25 reg:
26 maxItems: 1
27
28 clocks:
29 maxItems: 1
30
31 required:
32 - compatible
33 - reg
34 - clocks
35
36 unevaluatedProperties: false
37
38 examples:
39 - |
40 spi0: spi@1fff0220{
41 compatible = "loongson,ls2k1000-spi";
42 reg = <0x1fff0220 0x10>;
43 clocks = <&clk 17>;
44 #address-cells = <1>;
45 #size-cells = <0>;
46 };
47

3. 한국어 전문 번역

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

Loongson LS2K SPI schema

1-14

이 GPL-2.0 또는 BSD-2-Clause YAML schema는 Loongson SPI controller를 정의합니다. Schema ID는 `http://devicetree.org/schemas/spi/loongson,ls2k-spi.yaml#`, maintainer는 Yinbo Zhu입니다.

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

Compatible과 필수 resource

15-36

LS2K1000은 단일 `loongson,ls2k1000-spi` compatible을 사용합니다. LS2K0500은 첫 문자열 `loongson,ls2k0500-spi` 다음에 fallback `loongson,ls2k1000-spi`를 둡니다.

`reg`와 `clocks`는 각각 항목 하나만 허용합니다. `compatible`, `reg`, `clocks`가 필수이며 `unevaluatedProperties: false`로 평가되지 않은 추가 속성을 금지합니다.

LS2K1000 SPI0 예제

37-46

예제는 address `0x1fff0220`, 길이 `0x10`, clock specifier 17을 사용하는 LS2K1000 SPI0 controller를 선언합니다.

spi0: spi@1fff0220{
    compatible = "loongson,ls2k1000-spi";
    reg = <0x1fff0220 0x10>;
    clocks = <&clk 17>;
    #address-cells = <1>;
    #size-cells = <0>;
};