← Documents Documentation/devicetree/bindings/media/cdns,csi2tx.txt GitHub 원문 ↗

Linux 6.18.37 · Devicetree Bindings

Cadence MIPI-CSI2 TX Controller

최대 4-lane output과 4개 pixel-stream input을 갖는 CSI-2 bridge입니다.

Source pathDocumentation/devicetree/bindings/media/cdns,csi2tx.txt
Source versionLinux v6.18.37
TranslationDUJINLABS 전문 번역 + 해설

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

1. 요약·해설

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

요약과 해설

cdns,csi2tx.txt:1-99

Clock, 선택적 D-PHY, port 0~4와 endpoint 연결을 설명합니다.

2. 영어 원문 전체

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

원문 전체 펼치기
1 Cadence MIPI-CSI2 TX controller
2 ===============================
3
4 The Cadence MIPI-CSI2 TX controller is a CSI-2 bridge supporting up to
5 4 CSI lanes in output, and up to 4 different pixel streams in input.
6
7 Required properties:
8 - compatible: must be set to "cdns,csi2tx" or "cdns,csi2tx-1.3"
9 for version 1.3 of the controller, "cdns,csi2tx-2.1" for v2.1
10 - reg: base address and size of the memory mapped region
11 - clocks: phandles to the clocks driving the controller
12 - clock-names: must contain:
13 * esc_clk: escape mode clock
14 * p_clk: register bank clock
15 * pixel_if[0-3]_clk: pixel stream output clock, one for each stream
16 implemented in hardware, between 0 and 3
17
18 Optional properties
19 - phys: phandle to the D-PHY. If it is set, phy-names need to be set
20 - phy-names: must contain "dphy"
21
22 Required subnodes:
23 - ports: A ports node with one port child node per device input and output
24 port, in accordance with the video interface bindings defined in
25 Documentation/devicetree/bindings/media/video-interfaces.txt. The
26 port nodes are numbered as follows.
27
28 Port Description
29 -----------------------------
30 0 CSI-2 output
31 1 Stream 0 input
32 2 Stream 1 input
33 3 Stream 2 input
34 4 Stream 3 input
35
36 The stream input port nodes are optional if they are not
37 connected to anything at the hardware level or implemented
38 in the design. Since there is only one endpoint per port,
39 the endpoints are not numbered.
40
41 Example:
42
43 csi2tx: csi-bridge@0d0e1000 {
44 compatible = "cdns,csi2tx";
45 reg = <0x0d0e1000 0x1000>;
46 clocks = <&byteclock>, <&byteclock>,
47 <&coreclock>, <&coreclock>,
48 <&coreclock>, <&coreclock>;
49 clock-names = "p_clk", "esc_clk",
50 "pixel_if0_clk", "pixel_if1_clk",
51 "pixel_if2_clk", "pixel_if3_clk";
52
53 ports {
54 #address-cells = <1>;
55 #size-cells = <0>;
56
57 port@0 {
58 reg = <0>;
59
60 csi2tx_out: endpoint {
61 remote-endpoint = <&remote_in>;
62 clock-lanes = <0>;
63 data-lanes = <1 2>;
64 };
65 };
66
67 port@1 {
68 reg = <1>;
69
70 csi2tx_in_stream0: endpoint {
71 remote-endpoint = <&stream0_out>;
72 };
73 };
74
75 port@2 {
76 reg = <2>;
77
78 csi2tx_in_stream1: endpoint {
79 remote-endpoint = <&stream1_out>;
80 };
81 };
82
83 port@3 {
84 reg = <3>;
85
86 csi2tx_in_stream2: endpoint {
87 remote-endpoint = <&stream2_out>;
88 };
89 };
90
91 port@4 {
92 reg = <4>;
93
94 csi2tx_in_stream3: endpoint {
95 remote-endpoint = <&stream3_out>;
96 };
97 };
98 };
99 };
100

3. 한국어 전문 번역

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

Cadence CSI-2 TX controller

1-21

Cadence MIPI-CSI2 TX controller는 output에서 최대 4개 CSI lane, input에서 최대 4개 pixel stream을 지원하는 CSI-2 bridge입니다. `compatible`은 일반 `cdns,csi2tx`, controller v1.3의 `cdns,csi2tx-1.3`, 또는 v2.1의 `cdns,csi2tx-2.1`입니다.

필수 `reg`는 MMIO region의 base와 크기입니다. `clocks`는 controller를 구동하는 clock phandle 목록이며 `clock-names`에는 escape mode용 `esc_clk`, register bank용 `p_clk`, hardware에 구현된 각 stream의 `pixel_if[0-3]_clk`가 들어갑니다.

선택적인 `phys`는 D-PHY phandle입니다. 이를 지정하면 `phy-names`도 필요하며 값은 `dphy`여야 합니다.

Output과 네 input port 번호

22-40

필수 `ports` node는 `Documentation/devicetree/bindings/media/video-interfaces.txt`에 따라 장치 input과 output마다 port child 하나를 둡니다. Port 0은 CSI-2 output이고 port 1~4는 각각 stream 0~3 input입니다.

Hardware에 연결되지 않았거나 design에 구현되지 않은 stream input port는 생략할 수 있습니다. 각 port에는 endpoint가 하나뿐이므로 endpoint 번호는 붙이지 않습니다.

CSI2-TX port 번호
Port방향설명
0OutputCSI-2 output
1InputPixel stream 0
2InputPixel stream 1
3InputPixel stream 2
4InputPixel stream 3

하나의 CSI-2 output과 최대 네 pixel stream input을 고정 번호로 연결합니다.

2-lane output과 4-stream 예제

41-99

예제 controller는 `0x0d0e1000`의 0x1000-byte MMIO region과 `p_clk`, `esc_clk`, 네 pixel interface clock을 사용합니다. Output endpoint는 clock lane 0과 data lane 1·2를 지정합니다.

Port 1~4는 각각 stream 0~3의 remote output endpoint를 참조합니다. Output과 각 input port는 `reg` 번호로 역할을 확정하며 모든 endpoint는 video graph의 반대편 endpoint와 연결됩니다.

csi2tx: csi-bridge@0d0e1000 {
        compatible = "cdns,csi2tx";
        reg = <0x0d0e1000 0x1000>;
        clocks = <&byteclock>, <&byteclock>,
                 <&coreclock>, <&coreclock>,
                 <&coreclock>, <&coreclock>;
        clock-names = "p_clk", "esc_clk",
                      "pixel_if0_clk", "pixel_if1_clk",
                      "pixel_if2_clk", "pixel_if3_clk";

        ports {
                #address-cells = <1>;
                #size-cells = <0>;

                port@0 {
                        reg = <0>;

                        csi2tx_out: endpoint {
                                remote-endpoint = <&remote_in>;
                                clock-lanes = <0>;
                                data-lanes = <1 2>;
                        };
                };

                port@1 {
                        reg = <1>;

                        csi2tx_in_stream0: endpoint {
                                remote-endpoint = <&stream0_out>;
                        };
                };

                port@2 {
                        reg = <2>;

                        csi2tx_in_stream1: endpoint {
                                remote-endpoint = <&stream1_out>;
                        };
                };

                port@3 {
                        reg = <3>;

                        csi2tx_in_stream2: endpoint {
                                remote-endpoint = <&stream2_out>;
                        };
                };

                port@4 {
                        reg = <4>;

                        csi2tx_in_stream3: endpoint {
                                remote-endpoint = <&stream3_out>;
                        };
                };
        };
};