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

Linux 6.18.37 · Devicetree Bindings / SPI

Rockchip SPI controller

Rockchip SPI의 SoC fallback, clock·DMA 순서와 RX sample delay를 설명합니다.

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

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

1. 요약·해설

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

요약과 해설

spi-rockchip.yaml:1-120

Rockchip SPI의 SoC fallback, clock·DMA 순서와 RX sample delay를 설명합니다. 접을 수 있는 영어 원문 전체와 줄 좌표를 보존하고, 한국어 전문 번역에서는 compatible·property·symbol·source path·URL·수치·예제 코드를 원형대로 유지합니다.

2. 영어 원문 전체

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

원문 전체 펼치기
1 # SPDX-License-Identifier: GPL-2.0
2 %YAML 1.2
3 ---
4 $id: http://devicetree.org/schemas/spi/spi-rockchip.yaml#
5 $schema: http://devicetree.org/meta-schemas/core.yaml#
6
7 title: Rockchip SPI Controller
8
9 description:
10 The Rockchip SPI controller is used to interface with various devices such
11 as flash and display controllers using the SPI communication interface.
12
13 allOf:
14 - $ref: spi-controller.yaml#
15
16 maintainers:
17 - Heiko Stuebner <heiko@sntech.de>
18
19 # Everything else is described in the common file
20 properties:
21 compatible:
22 oneOf:
23 - const: rockchip,rk3036-spi
24 - const: rockchip,rk3066-spi
25 - const: rockchip,rk3228-spi
26 - const: rockchip,rv1108-spi
27 - items:
28 - enum:
29 - rockchip,px30-spi
30 - rockchip,rk3128-spi
31 - rockchip,rk3188-spi
32 - rockchip,rk3288-spi
33 - rockchip,rk3308-spi
34 - rockchip,rk3328-spi
35 - rockchip,rk3368-spi
36 - rockchip,rk3399-spi
37 - rockchip,rk3506-spi
38 - rockchip,rk3528-spi
39 - rockchip,rk3562-spi
40 - rockchip,rk3568-spi
41 - rockchip,rk3576-spi
42 - rockchip,rk3588-spi
43 - rockchip,rv1126-spi
44 - const: rockchip,rk3066-spi
45
46 reg:
47 maxItems: 1
48
49 interrupts:
50 maxItems: 1
51
52 clocks:
53 items:
54 - description: transfer-clock
55 - description: peripheral clock
56
57 clock-names:
58 items:
59 - const: spiclk
60 - const: apb_pclk
61
62 dmas:
63 items:
64 - description: TX DMA Channel
65 - description: RX DMA Channel
66
67 dma-names:
68 items:
69 - const: tx
70 - const: rx
71
72 rx-sample-delay-ns:
73 default: 0
74 description:
75 Nano seconds to delay after the SCLK edge before sampling Rx data
76 (may need to be fine tuned for high capacitance lines).
77 If not specified 0 will be used.
78
79 pinctrl-names:
80 minItems: 1
81 items:
82 - const: default
83 - const: sleep
84 description:
85 Names for the pin configuration(s); may be "default" or "sleep",
86 where the "sleep" configuration may describe the state
87 the pins should be in during system suspend.
88
89 power-domains:
90 maxItems: 1
91
92 required:
93 - compatible
94 - reg
95 - interrupts
96 - clocks
97 - clock-names
98
99 unevaluatedProperties: false
100
101 examples:
102 - |
103 #include <dt-bindings/clock/rk3188-cru-common.h>
104 #include <dt-bindings/interrupt-controller/arm-gic.h>
105 #include <dt-bindings/interrupt-controller/irq.h>
106 spi0: spi@ff110000 {
107 compatible = "rockchip,rk3066-spi";
108 reg = <0xff110000 0x1000>;
109 interrupts = <GIC_SPI 44 IRQ_TYPE_LEVEL_HIGH>;
110 clocks = <&cru SCLK_SPI0>, <&cru PCLK_SPI0>;
111 clock-names = "spiclk", "apb_pclk";
112 dmas = <&pdma1 11>, <&pdma1 12>;
113 dma-names = "tx", "rx";
114 pinctrl-0 = <&spi1_pins>;
115 pinctrl-1 = <&spi1_sleep>;
116 pinctrl-names = "default", "sleep";
117 rx-sample-delay-ns = <10>;
118 #address-cells = <1>;
119 #size-cells = <0>;
120 };
121

3. 한국어 전문 번역

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

Rockchip SPI controller 개요

1-18

이 GPL-2.0 YAML schema는 SPI communication interface를 사용해 flash와 display controller 등 여러 device에 연결하는 Rockchip SPI controller를 정의합니다. 공통 `spi-controller.yaml#`을 상속하며 maintainer는 Heiko Stuebner입니다.

SoC별 compatible과 fallback

19-45

독립 compatible은 `rockchip,rk3036-spi`, `rockchip,rk3066-spi`, `rockchip,rk3228-spi`, `rockchip,rv1108-spi`입니다.

Fallback pair의 첫 compatible은 `rockchip,px30-spi`, `rockchip,rk3128-spi`, `rockchip,rk3188-spi`, `rockchip,rk3288-spi`, `rockchip,rk3308-spi`, `rockchip,rk3328-spi`, `rockchip,rk3368-spi`, `rockchip,rk3399-spi`, `rockchip,rk3506-spi`, `rockchip,rk3528-spi`, `rockchip,rk3562-spi`, `rockchip,rk3568-spi`, `rockchip,rk3576-spi`, `rockchip,rk3588-spi`, `rockchip,rv1126-spi` 중 하나이며, 각 경우 `rockchip,rk3066-spi`를 둘째 fallback compatible로 함께 지정합니다.

Register, clock과 DMA 순서

46-71

`reg`와 `interrupts`는 각각 최대 한 항목입니다. `clocks`는 transfer clock과 peripheral clock 두 항목이며 `clock-names`는 같은 순서로 `spiclk`, `apb_pclk`입니다.

`dmas`는 TX, RX DMA channel 순서이고 `dma-names`도 `tx`, `rx` 순서입니다.

RX sample delay와 suspend pin state

72-91

`rx-sample-delay-ns`는 SCLK edge 뒤 RX data를 sample하기 전까지의 nanosecond 지연입니다. 고 capacitance line에서는 미세 조정이 필요할 수 있으며 생략하면 0을 사용합니다.

`pinctrl-names`는 최소 한 항목이며 첫 이름은 `default`, 선택적인 둘째 이름은 `sleep`입니다. `sleep` configuration은 system suspend 중 pin 상태를 설명할 수 있습니다. `power-domains`는 최대 한 항목입니다.

필수 속성과 추가 속성 제한

92-100

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

RK3066 SPI0 DMA와 pinctrl 예제

101-120

예제의 `spi0: spi@ff110000`은 `rockchip,rk3066-spi`, GIC SPI 44, `SCLK_SPI0`과 `PCLK_SPI0` clock을 사용합니다. PDMA1 channel 11·12를 TX·RX에 연결하고 `default`와 `sleep` pinctrl state, RX sample delay 10 ns를 지정합니다.

#include <dt-bindings/clock/rk3188-cru-common.h>
#include <dt-bindings/interrupt-controller/arm-gic.h>
#include <dt-bindings/interrupt-controller/irq.h>
spi0: spi@ff110000 {
  compatible = "rockchip,rk3066-spi";
  reg = <0xff110000 0x1000>;
  interrupts = <GIC_SPI 44 IRQ_TYPE_LEVEL_HIGH>;
  clocks = <&cru SCLK_SPI0>, <&cru PCLK_SPI0>;
  clock-names = "spiclk", "apb_pclk";
  dmas = <&pdma1 11>, <&pdma1 12>;
  dma-names = "tx", "rx";
  pinctrl-0 = <&spi1_pins>;
  pinctrl-1 = <&spi1_sleep>;
  pinctrl-names = "default", "sleep";
  rx-sample-delay-ns = <10>;
  #address-cells = <1>;
  #size-cells = <0>;
};