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