← Documents Documentation/devicetree/bindings/clock/st/st,flexgen.txt GitHub 원문 ↗

Linux 6.18.37 · Devicetree Bindings

ST Flexgen clocks

7-input crossbar, 32-channel pre/final divider와 output clock 바인딩입니다.

Source pathDocumentation/devicetree/bindings/clock/st/st,flexgen.txt
Source versionLinux v6.18.37
TranslationDUJINLABS 전문 번역 + 해설

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

1. 요약·해설

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

요약과 해설

st,flexgen.txt:1-130

Crossbar에서 32개 divided output까지의 datapath와 audio/video mode를 설명합니다.

2. 영어 원문 전체

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

원문 전체 펼치기
1 Binding for a type of flexgen structure found on certain
2 STMicroelectronics consumer electronics SoC devices
3
4 This structure includes:
5 - a clock cross bar (represented by a mux element)
6 - a pre and final dividers (represented by a divider and gate elements)
7
8 Flexgen structure is a part of Clockgen[1].
9
10 Please find an example below:
11
12 Clockgen block diagram
13 -------------------------------------------------------------------
14 | Flexgen structure |
15 | --------------------------------------------- |
16 | | ------- -------- -------- | |
17 clk_sysin | | | | | | | | |
18 ---|-----------------|-->| | | | | | | |
19 | | | | | | | | | | |
20 | | ------- | | | |Pre | |Final | | |
21 | | |PLL0 | | | | |Dividers| |Dividers| | |
22 | |->| | | | | | x32 | | x32 | | |
23 | | | odf_0|----|-->| | | | | | | |
24 | | | | | | | | | | | | |
25 | | | | | | | | | | | | |
26 | | | | | | | | | | | | |
27 | | | | | | | | | | | | |
28 | | ------- | | | | | | | | |
29 | | | | | | | | | | |
30 | | ------- | | Clock | | | | | | |
31 | | |PLL1 | | | | | | | | | |
32 | |->| | | | Cross | | | | | | |
33 | | | odf_0|----|-->| | | | | | CLK_DIV[31:0]
34 | | | | | | Bar |====>| |====>| |===|=========>
35 | | | | | | | | | | | | |
36 | | | | | | | | | | | | |
37 | | | | | | | | | | | | |
38 | | ------- | | | | | | | | |
39 | | | | | | | | | | |
40 | | ------- | | | | | | | | |
41 | | |QUADFS | | | | | | | | | |
42 | |->| ch0|----|-->| | | | | | | |
43 | | | | | | | | | | | |
44 | | ch1|----|-->| | | | | | | |
45 | | | | | | | | | | | |
46 | | ch2|----|-->| | | DIV | | DIV | | |
47 | | | | | | | 1 to | | 1 to | | |
48 | | ch3|----|-->| | | 1024 | | 64 | | |
49 | ------- | | | | | | | | |
50 | | ------- -------- -------- | |
51 | -------------------------------------------- |
52 | |
53 -------------------------------------------------------------------
54
55 This binding uses the common clock binding[2].
56
57 [1] Documentation/devicetree/bindings/clock/st/st,clkgen.txt
58 [2] Documentation/devicetree/bindings/clock/clock-bindings.txt
59
60 Required properties:
61 - compatible : shall be:
62 "st,flexgen"
63 "st,flexgen-audio", "st,flexgen" (enable clock propagation on parent for
64 audio use case)
65 "st,flexgen-video", "st,flexgen" (enable clock propagation on parent
66 and activate synchronous mode)
67 "st,flexgen-stih410-a0"
68 "st,flexgen-stih410-c0"
69 "st,flexgen-stih418-c0"
70 "st,flexgen-stih410-d0"
71 "st,flexgen-stih407-d2"
72 "st,flexgen-stih418-d2"
73 "st,flexgen-stih407-d3"
74
75 - #clock-cells : from common clock binding; shall be set to 1 (multiple clock
76 outputs).
77
78 - clocks : must be set to the parent's phandle. it could be output clocks of
79 a quadsfs or/and a pll or/and clk_sysin (up to 7 clocks)
80
81 - clock-output-names : List of strings used to name the clock outputs.
82
83 Example:
84
85 clk_s_c0_flexgen: clk-s-c0-flexgen {
86
87 #clock-cells = <1>;
88 compatible = "st,flexgen";
89
90 clocks = <&clk_s_c0_pll0 0>,
91 <&clk_s_c0_pll1 0>,
92 <&clk_s_c0_quadfs 0>,
93 <&clk_s_c0_quadfs 1>,
94 <&clk_s_c0_quadfs 2>,
95 <&clk_s_c0_quadfs 3>,
96 <&clk_sysin>;
97
98 clock-output-names = "clk-icn-gpu",
99 "clk-fdma",
100 "clk-nand",
101 "clk-hva",
102 "clk-proc-stfe",
103 "clk-proc-tp",
104 "clk-rx-icn-dmu",
105 "clk-rx-icn-hva",
106 "clk-icn-cpu",
107 "clk-tx-icn-dmu",
108 "clk-mmc-0",
109 "clk-mmc-1",
110 "clk-jpegdec",
111 "clk-ext2fa9",
112 "clk-ic-bdisp-0",
113 "clk-ic-bdisp-1",
114 "clk-pp-dmu",
115 "clk-vid-dmu",
116 "clk-dss-lpc",
117 "clk-st231-aud-0",
118 "clk-st231-gp-1",
119 "clk-st231-dmu",
120 "clk-icn-lmi",
121 "clk-tx-icn-disp-1",
122 "clk-icn-sbc",
123 "clk-stfe-frc2",
124 "clk-eth-phy",
125 "clk-eth-ref-phyclk",
126 "clk-flash-promip",
127 "clk-main-disp",
128 "clk-aux-disp",
129 "clk-compo-dvp";
130 };
131

3. 한국어 전문 번역

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

Flexgen crossbar와 divider 구조

1-59

STMicroelectronics consumer-electronics SoC의 Flexgen 구조 바인딩입니다. Flexgen은 mux로 표현되는 clock crossbar와 divider 및 gate element로 표현되는 pre-divider, final-divider를 포함하며 Clockgen의 일부입니다.

Input은 `clk_sysin`, PLL0/PLL1의 `odf_0`, QuadFS의 channel 0부터 3까지입니다. Crossbar가 source를 고른 뒤 32개 pre-divider가 1부터 1024까지, 32개 final-divider가 1부터 64까지 분주하여 `CLK_DIV[31:0]`을 만듭니다.

    Clockgen block diagram
    -------------------------------------------------------------------
   |                     Flexgen structure                             |
   |                  ---------------------------------------------    |
   |                 |    -------       --------       --------    |   |
clk_sysin            |   |       |     |        |     |        |   |   |
---|-----------------|-->|       |     |        |     |        |   |   |
   | |               |   |       |     |        |     |        |   |   |
   | |   -------     |   |       |     |Pre     |     |Final   |   |   |
   | |  |PLL0   |    |   |       |     |Dividers|     |Dividers|   |   |
   | |->|       |    |   |       |     |  x32   |     |  x32   |   |   |
   | |  |  odf_0|----|-->|       |     |        |     |        |   |   |
   | |  |       |    |   |       |     |        |     |        |   |   |
   | |  |       |    |   |       |     |        |     |        |   |   |
   | |  |       |    |   |       |     |        |     |        |   |   |
   | |  |       |    |   |       |     |        |     |        |   |   |
   | |   -------     |   |       |     |        |     |        |   |   |
   | |               |   |       |     |        |     |        |   |   |
   | |   -------     |   | Clock |     |        |     |        |   |   |
   | |  |PLL1   |    |   |       |     |        |     |        |   |   |
   | |->|       |    |   | Cross |     |        |     |        |   |   |
   | |  |  odf_0|----|-->|       |     |        |     |        | CLK_DIV[31:0]
   | |  |       |    |   | Bar   |====>|        |====>|        |===|=========>
   | |  |       |    |   |       |     |        |     |        |   |   |
   | |  |       |    |   |       |     |        |     |        |   |   |
   | |  |       |    |   |       |     |        |     |        |   |   |
   | |   -------     |   |       |     |        |     |        |   |   |
   | |               |   |       |     |        |     |        |   |   |
   | |   -------     |   |       |     |        |     |        |   |   |
   | |  |QUADFS |    |   |       |     |        |     |        |   |   |
   | |->|    ch0|----|-->|       |     |        |     |        |   |   |
   |    |       |    |   |       |     |        |     |        |   |   |
   |    |    ch1|----|-->|       |     |        |     |        |   |   |
   |    |       |    |   |       |     |        |     |        |   |   |
   |    |    ch2|----|-->|       |     | DIV    |     | DIV    |   |   |
   |    |       |    |   |       |     |  1 to  |     |  1 to  |   |   |
   |    |    ch3|----|-->|       |     |   1024 |     |     64 |   |   |
   |     -------     |   |       |     |        |     |        |   |   |
   |                 |    -------       --------       --------    |   |
   |                   --------------------------------------------    |
   |                                                                   |
    -------------------------------------------------------------------
Flexgen 32-channel datapath
clk_sysin / PLL0 / PLL1 / QuadFS ch0-3최대 7개 input
Clock crossbar32개 channel별 source 선택
Pre dividers x32DIV 1..1024
Final dividers x32DIV 1..64 + gate
CLK_DIV[31:0]32개 output clock

원문의 ASCII block diagram을 같은 신호 흐름으로 구조화했습니다.

Flexgen compatible과 output 속성

60-82

`compatible`은 기본 `st,flexgen`을 사용합니다. Audio 용도는 `st,flexgen-audio`, `st,flexgen` 조합으로 parent clock propagation을 활성화하고, video 용도는 `st,flexgen-video`, `st,flexgen` 조합으로 propagation과 synchronous mode를 활성화합니다.

SoC revision별 값은 `st,flexgen-stih410-a0`, `st,flexgen-stih410-c0`, `st,flexgen-stih418-c0`, `st,flexgen-stih410-d0`, `st,flexgen-stih407-d2`, `st,flexgen-stih418-d2`, `st,flexgen-stih407-d3`입니다.

여러 output을 제공하므로 `#clock-cells`는 1입니다. `clocks`에는 QuadFS output, PLL output, `clk_sysin`을 조합해 최대 7개 parent phandle을 지정할 수 있고 `clock-output-names`에는 output 이름 목록을 둡니다.

Flexgen operating variants
VariantParent propagationSynchronous mode
st,flexgen기본 동작기본 동작
st,flexgen-audio + st,flexgen활성기본 동작
st,flexgen-video + st,flexgen활성활성

기본, audio, video compatible이 parent propagation과 synchronous mode를 어떻게 바꾸는지 보여 줍니다.

32-output Flexgen 예제

83-130

예제 `clk_s_c0_flexgen`은 PLL0, PLL1, QuadFS channel 0부터 3, `clk_sysin`의 일곱 parent를 받습니다. `#clock-cells = <1>`이므로 consumer는 output index로 32개 output 중 하나를 선택합니다.

`clock-output-names`는 `clk-icn-gpu`부터 `clk-compo-dvp`까지 32개 이름을 index 순서대로 보존합니다. 이 목록에는 FDMA, NAND, HVA, STFE, TP, interconnect, MMC, JPEG, display, audio, Ethernet과 flash 관련 clock이 포함됩니다.

clk_s_c0_flexgen: clk-s-c0-flexgen {

        #clock-cells = <1>;
        compatible = "st,flexgen";

        clocks = <&clk_s_c0_pll0 0>,
                 <&clk_s_c0_pll1 0>,
                 <&clk_s_c0_quadfs 0>,
                 <&clk_s_c0_quadfs 1>,
                 <&clk_s_c0_quadfs 2>,
                 <&clk_s_c0_quadfs 3>,
                 <&clk_sysin>;

        clock-output-names = "clk-icn-gpu",
                             "clk-fdma",
                             "clk-nand",
                             "clk-hva",
                             "clk-proc-stfe",
                             "clk-proc-tp",
                             "clk-rx-icn-dmu",
                             "clk-rx-icn-hva",
                             "clk-icn-cpu",
                             "clk-tx-icn-dmu",
                             "clk-mmc-0",
                             "clk-mmc-1",
                             "clk-jpegdec",
                             "clk-ext2fa9",
                             "clk-ic-bdisp-0",
                             "clk-ic-bdisp-1",
                             "clk-pp-dmu",
                             "clk-vid-dmu",
                             "clk-dss-lpc",
                             "clk-st231-aud-0",
                             "clk-st231-gp-1",
                             "clk-st231-dmu",
                             "clk-icn-lmi",
                             "clk-tx-icn-disp-1",
                             "clk-icn-sbc",
                             "clk-stfe-frc2",
                             "clk-eth-phy",
                             "clk-eth-ref-phyclk",
                             "clk-flash-promip",
                             "clk-main-disp",
                             "clk-aux-disp",
                             "clk-compo-dvp";
};