xref: /linux/Documentation/devicetree/bindings/clock/st/st,flexgen.txt (revision be55492e01ab8a2d259b3404ba24465a0ad27130)
13414666dSGabriel FERNANDEZBinding for a type of flexgen structure found on certain
23414666dSGabriel FERNANDEZSTMicroelectronics consumer electronics SoC devices
33414666dSGabriel FERNANDEZ
43414666dSGabriel FERNANDEZThis structure includes:
53414666dSGabriel FERNANDEZ- a clock cross bar (represented by a mux element)
63414666dSGabriel FERNANDEZ- a pre and final dividers (represented by a divider and gate elements)
73414666dSGabriel FERNANDEZ
83414666dSGabriel FERNANDEZFlexgen structure is a part of Clockgen[1].
93414666dSGabriel FERNANDEZ
103414666dSGabriel FERNANDEZPlease find an example below:
113414666dSGabriel FERNANDEZ
123414666dSGabriel FERNANDEZ    Clockgen block diagram
133414666dSGabriel FERNANDEZ    -------------------------------------------------------------------
14994bef10SGeert Uytterhoeven   |                     Flexgen structure                             |
153414666dSGabriel FERNANDEZ   |                  ---------------------------------------------    |
163414666dSGabriel FERNANDEZ   |                 |    -------       --------       --------    |   |
173414666dSGabriel FERNANDEZclk_sysin            |   |       |     |        |     |        |   |   |
183414666dSGabriel FERNANDEZ---|-----------------|-->|       |     |        |     |        |   |   |
193414666dSGabriel FERNANDEZ   | |               |   |       |     |        |     |        |   |   |
203414666dSGabriel FERNANDEZ   | |   -------     |   |       |     |Pre     |     |Final   |   |   |
213414666dSGabriel FERNANDEZ   | |  |PLL0   |    |   |       |     |Dividers|     |Dividers|   |   |
223414666dSGabriel FERNANDEZ   | |->|       |    |   |       |     |  x32   |     |  x32   |   |   |
233414666dSGabriel FERNANDEZ   | |  |  odf_0|----|-->|       |     |        |     |        |   |   |
243414666dSGabriel FERNANDEZ   | |  |       |    |   |       |     |        |     |        |   |   |
253414666dSGabriel FERNANDEZ   | |  |       |    |   |       |     |        |     |        |   |   |
263414666dSGabriel FERNANDEZ   | |  |       |    |   |       |     |        |     |        |   |   |
273414666dSGabriel FERNANDEZ   | |  |       |    |   |       |     |        |     |        |   |   |
283414666dSGabriel FERNANDEZ   | |   -------     |   |       |     |        |     |        |   |   |
293414666dSGabriel FERNANDEZ   | |               |   |       |     |        |     |        |   |   |
303414666dSGabriel FERNANDEZ   | |   -------     |   | Clock |     |        |     |        |   |   |
313414666dSGabriel FERNANDEZ   | |  |PLL1   |    |   |       |     |        |     |        |   |   |
323414666dSGabriel FERNANDEZ   | |->|       |    |   | Cross |     |        |     |        |   |   |
333414666dSGabriel FERNANDEZ   | |  |  odf_0|----|-->|       |     |        |     |        | CLK_DIV[31:0]
343414666dSGabriel FERNANDEZ   | |  |       |    |   | Bar   |====>|        |====>|        |===|=========>
353414666dSGabriel FERNANDEZ   | |  |       |    |   |       |     |        |     |        |   |   |
363414666dSGabriel FERNANDEZ   | |  |       |    |   |       |     |        |     |        |   |   |
373414666dSGabriel FERNANDEZ   | |  |       |    |   |       |     |        |     |        |   |   |
383414666dSGabriel FERNANDEZ   | |   -------     |   |       |     |        |     |        |   |   |
393414666dSGabriel FERNANDEZ   | |               |   |       |     |        |     |        |   |   |
403414666dSGabriel FERNANDEZ   | |   -------     |   |       |     |        |     |        |   |   |
413414666dSGabriel FERNANDEZ   | |  |QUADFS |    |   |       |     |        |     |        |   |   |
423414666dSGabriel FERNANDEZ   | |->|    ch0|----|-->|       |     |        |     |        |   |   |
433414666dSGabriel FERNANDEZ   |    |       |    |   |       |     |        |     |        |   |   |
443414666dSGabriel FERNANDEZ   |    |    ch1|----|-->|       |     |        |     |        |   |   |
453414666dSGabriel FERNANDEZ   |    |       |    |   |       |     |        |     |        |   |   |
463414666dSGabriel FERNANDEZ   |    |    ch2|----|-->|       |     | DIV    |     | DIV    |   |   |
473414666dSGabriel FERNANDEZ   |    |       |    |   |       |     |  1 to  |     |  1 to  |   |   |
483414666dSGabriel FERNANDEZ   |    |    ch3|----|-->|       |     |   1024 |     |     64 |   |   |
493414666dSGabriel FERNANDEZ   |     -------     |   |       |     |        |     |        |   |   |
503414666dSGabriel FERNANDEZ   |                 |    -------       --------       --------    |   |
513414666dSGabriel FERNANDEZ   |                   --------------------------------------------    |
523414666dSGabriel FERNANDEZ   |                                                                   |
533414666dSGabriel FERNANDEZ    -------------------------------------------------------------------
543414666dSGabriel FERNANDEZ
553414666dSGabriel FERNANDEZThis binding uses the common clock binding[2].
563414666dSGabriel FERNANDEZ
573414666dSGabriel FERNANDEZ[1] Documentation/devicetree/bindings/clock/st/st,clkgen.txt
583414666dSGabriel FERNANDEZ[2] Documentation/devicetree/bindings/clock/clock-bindings.txt
593414666dSGabriel FERNANDEZ
603414666dSGabriel FERNANDEZRequired properties:
613414666dSGabriel FERNANDEZ- compatible : shall be:
623414666dSGabriel FERNANDEZ  "st,flexgen"
6326bd0a57SGabriel Fernandez  "st,flexgen-audio", "st,flexgen" (enable clock propagation on parent for
6426bd0a57SGabriel Fernandez  audio use case)
65cb80ec76SGabriel Fernandez  "st,flexgen-video", "st,flexgen" (enable clock propagation on parent
66cb80ec76SGabriel Fernandez					and activate synchronous mode)
67fa745c71SAlain Volmat  "st,flexgen-stih407-a0"
68fa745c71SAlain Volmat  "st,flexgen-stih410-a0"
69fa745c71SAlain Volmat  "st,flexgen-stih407-c0"
70fa745c71SAlain Volmat  "st,flexgen-stih410-c0"
71fa745c71SAlain Volmat  "st,flexgen-stih418-c0"
72fa745c71SAlain Volmat  "st,flexgen-stih407-d0"
73fa745c71SAlain Volmat  "st,flexgen-stih410-d0"
74fa745c71SAlain Volmat  "st,flexgen-stih407-d2"
75fa745c71SAlain Volmat  "st,flexgen-stih418-d2"
76fa745c71SAlain Volmat  "st,flexgen-stih407-d3"
773414666dSGabriel FERNANDEZ
783414666dSGabriel FERNANDEZ- #clock-cells : from common clock binding; shall be set to 1 (multiple clock
793414666dSGabriel FERNANDEZ  outputs).
803414666dSGabriel FERNANDEZ
81*be55492eSRandy Dunlap- clocks : must be set to the parent's phandle. it could be output clocks of
823414666dSGabriel FERNANDEZ  a quadsfs or/and a pll or/and clk_sysin (up to 7 clocks)
833414666dSGabriel FERNANDEZ
843414666dSGabriel FERNANDEZ- clock-output-names : List of strings used to name the clock outputs.
853414666dSGabriel FERNANDEZ
863414666dSGabriel FERNANDEZExample:
873414666dSGabriel FERNANDEZ
883414666dSGabriel FERNANDEZ	clk_s_c0_flexgen: clk-s-c0-flexgen {
893414666dSGabriel FERNANDEZ
903414666dSGabriel FERNANDEZ		#clock-cells = <1>;
913414666dSGabriel FERNANDEZ		compatible = "st,flexgen";
923414666dSGabriel FERNANDEZ
933414666dSGabriel FERNANDEZ		clocks = <&clk_s_c0_pll0 0>,
943414666dSGabriel FERNANDEZ			 <&clk_s_c0_pll1 0>,
953414666dSGabriel FERNANDEZ			 <&clk_s_c0_quadfs 0>,
963414666dSGabriel FERNANDEZ			 <&clk_s_c0_quadfs 1>,
973414666dSGabriel FERNANDEZ			 <&clk_s_c0_quadfs 2>,
983414666dSGabriel FERNANDEZ			 <&clk_s_c0_quadfs 3>,
993414666dSGabriel FERNANDEZ			 <&clk_sysin>;
1003414666dSGabriel FERNANDEZ
1013414666dSGabriel FERNANDEZ		clock-output-names = "clk-icn-gpu",
1023414666dSGabriel FERNANDEZ				     "clk-fdma",
1033414666dSGabriel FERNANDEZ				     "clk-nand",
1043414666dSGabriel FERNANDEZ				     "clk-hva",
1053414666dSGabriel FERNANDEZ				     "clk-proc-stfe",
1063414666dSGabriel FERNANDEZ				     "clk-proc-tp",
1073414666dSGabriel FERNANDEZ				     "clk-rx-icn-dmu",
1083414666dSGabriel FERNANDEZ				     "clk-rx-icn-hva",
1093414666dSGabriel FERNANDEZ				     "clk-icn-cpu",
1103414666dSGabriel FERNANDEZ				     "clk-tx-icn-dmu",
1113414666dSGabriel FERNANDEZ				     "clk-mmc-0",
1123414666dSGabriel FERNANDEZ				     "clk-mmc-1",
1133414666dSGabriel FERNANDEZ				     "clk-jpegdec",
1143414666dSGabriel FERNANDEZ				     "clk-ext2fa9",
1153414666dSGabriel FERNANDEZ				     "clk-ic-bdisp-0",
1163414666dSGabriel FERNANDEZ				     "clk-ic-bdisp-1",
1173414666dSGabriel FERNANDEZ				     "clk-pp-dmu",
1183414666dSGabriel FERNANDEZ				     "clk-vid-dmu",
1193414666dSGabriel FERNANDEZ				     "clk-dss-lpc",
1203414666dSGabriel FERNANDEZ				     "clk-st231-aud-0",
1213414666dSGabriel FERNANDEZ				     "clk-st231-gp-1",
1223414666dSGabriel FERNANDEZ				     "clk-st231-dmu",
1233414666dSGabriel FERNANDEZ				     "clk-icn-lmi",
1243414666dSGabriel FERNANDEZ				     "clk-tx-icn-disp-1",
1253414666dSGabriel FERNANDEZ				     "clk-icn-sbc",
1263414666dSGabriel FERNANDEZ				     "clk-stfe-frc2",
1273414666dSGabriel FERNANDEZ				     "clk-eth-phy",
1283414666dSGabriel FERNANDEZ				     "clk-eth-ref-phyclk",
1293414666dSGabriel FERNANDEZ				     "clk-flash-promip",
1303414666dSGabriel FERNANDEZ				     "clk-main-disp",
1313414666dSGabriel FERNANDEZ				     "clk-aux-disp",
1323414666dSGabriel FERNANDEZ				     "clk-compo-dvp";
1333414666dSGabriel FERNANDEZ	};
134