1// SPDX-License-Identifier: GPL-2.0-only
2/*
3 * Copyright (C) 2014 STMicroelectronics R&D Limited
4 */
5#include <dt-bindings/clock/stih410-clks.h>
6/ {
7	/*
8	 * Fixed 30MHz oscillator inputs to SoC
9	 */
10	clk_sysin: clk-sysin {
11		#clock-cells = <0>;
12		compatible = "fixed-clock";
13		clock-frequency = <30000000>;
14		clock-output-names = "CLK_SYSIN";
15	};
16
17	clk_tmdsout_hdmi: clk-tmdsout-hdmi {
18		#clock-cells = <0>;
19		compatible = "fixed-clock";
20		clock-frequency = <0>;
21	};
22
23	clocks {
24		#address-cells = <1>;
25		#size-cells = <1>;
26		ranges;
27
28		compatible = "st,stih410-clk", "simple-bus";
29
30		/*
31		 * A9 PLL.
32		 */
33		clockgen-a9@92b0000 {
34			compatible = "st,clkgen-c32";
35			reg = <0x92b0000 0xffff>;
36
37			clockgen_a9_pll: clockgen-a9-pll {
38				#clock-cells = <1>;
39				compatible = "st,stih407-clkgen-plla9";
40
41				clocks = <&clk_sysin>;
42			};
43		};
44
45		/*
46		 * ARM CPU related clocks.
47		 */
48		clk_m_a9: clk-m-a9@92b0000 {
49			#clock-cells = <0>;
50			compatible = "st,stih407-clkgen-a9-mux", "st,clkgen-mux";
51			reg = <0x92b0000 0x10000>;
52
53			clocks = <&clockgen_a9_pll 0>,
54				 <&clockgen_a9_pll 0>,
55				 <&clk_s_c0_flexgen 13>,
56				 <&clk_m_a9_ext2f_div2>;
57			/*
58			 * ARM Peripheral clock for timers
59			 */
60			arm_periph_clk: clk-m-a9-periphs {
61				#clock-cells = <0>;
62				compatible = "fixed-factor-clock";
63				clocks = <&clk_m_a9>;
64				clock-div = <2>;
65				clock-mult = <1>;
66			};
67		};
68
69		clockgen-a@90ff000 {
70			compatible = "st,clkgen-c32";
71			reg = <0x90ff000 0x1000>;
72
73			clk_s_a0_pll: clk-s-a0-pll {
74				#clock-cells = <1>;
75				compatible = "st,clkgen-pll0-a0";
76
77				clocks = <&clk_sysin>;
78			};
79
80			clk_s_a0_flexgen: clk-s-a0-flexgen {
81				compatible = "st,flexgen", "st,flexgen-stih410-a0";
82
83				#clock-cells = <1>;
84
85				clocks = <&clk_s_a0_pll 0>,
86					 <&clk_sysin>;
87			};
88		};
89
90		clk_s_c0_quadfs: clk-s-c0-quadfs@9103000 {
91			#clock-cells = <1>;
92			compatible = "st,quadfs-pll";
93			reg = <0x9103000 0x1000>;
94
95			clocks = <&clk_sysin>;
96		};
97
98		clk_s_c0: clockgen-c@9103000 {
99			compatible = "st,clkgen-c32";
100			reg = <0x9103000 0x1000>;
101
102			clk_s_c0_pll0: clk-s-c0-pll0 {
103				#clock-cells = <1>;
104				compatible = "st,clkgen-pll0-c0";
105
106				clocks = <&clk_sysin>;
107			};
108
109			clk_s_c0_pll1: clk-s-c0-pll1 {
110				#clock-cells = <1>;
111				compatible = "st,clkgen-pll1-c0";
112
113				clocks = <&clk_sysin>;
114			};
115
116			clk_s_c0_flexgen: clk-s-c0-flexgen {
117				#clock-cells = <1>;
118				compatible = "st,flexgen", "st,flexgen-stih410-c0";
119
120				clocks = <&clk_s_c0_pll0 0>,
121					 <&clk_s_c0_pll1 0>,
122					 <&clk_s_c0_quadfs 0>,
123					 <&clk_s_c0_quadfs 1>,
124					 <&clk_s_c0_quadfs 2>,
125					 <&clk_s_c0_quadfs 3>,
126					 <&clk_sysin>;
127
128				/*
129				 * ARM Peripheral clock for timers
130				 */
131				clk_m_a9_ext2f_div2: clk-m-a9-ext2f-div2s {
132					#clock-cells = <0>;
133					compatible = "fixed-factor-clock";
134
135					clocks = <&clk_s_c0_flexgen 13>;
136
137					clock-output-names = "clk-m-a9-ext2f-div2";
138
139					clock-div = <2>;
140					clock-mult = <1>;
141				};
142			};
143		};
144
145		clk_s_d0_quadfs: clk-s-d0-quadfs@9104000 {
146			#clock-cells = <1>;
147			compatible = "st,quadfs-d0";
148			reg = <0x9104000 0x1000>;
149
150			clocks = <&clk_sysin>;
151		};
152
153		clockgen-d0@9104000 {
154			compatible = "st,clkgen-c32";
155			reg = <0x9104000 0x1000>;
156
157			clk_s_d0_flexgen: clk-s-d0-flexgen {
158				#clock-cells = <1>;
159				compatible = "st,flexgen", "st,flexgen-stih410-d0";
160
161				clocks = <&clk_s_d0_quadfs 0>,
162					 <&clk_s_d0_quadfs 1>,
163					 <&clk_s_d0_quadfs 2>,
164					 <&clk_s_d0_quadfs 3>,
165					 <&clk_sysin>;
166			};
167		};
168
169		clk_s_d2_quadfs: clk-s-d2-quadfs@9106000 {
170			#clock-cells = <1>;
171			compatible = "st,quadfs-d2";
172			reg = <0x9106000 0x1000>;
173
174			clocks = <&clk_sysin>;
175		};
176
177		clockgen-d2@9106000 {
178			compatible = "st,clkgen-c32";
179			reg = <0x9106000 0x1000>;
180
181			clk_s_d2_flexgen: clk-s-d2-flexgen {
182				#clock-cells = <1>;
183				compatible = "st,flexgen", "st,flexgen-stih407-d2";
184
185				clocks = <&clk_s_d2_quadfs 0>,
186					 <&clk_s_d2_quadfs 1>,
187					 <&clk_s_d2_quadfs 2>,
188					 <&clk_s_d2_quadfs 3>,
189					 <&clk_sysin>,
190					 <&clk_sysin>,
191					 <&clk_tmdsout_hdmi>;
192			};
193		};
194
195		clk_s_d3_quadfs: clk-s-d3-quadfs@9107000 {
196			#clock-cells = <1>;
197			compatible = "st,quadfs-d3";
198			reg = <0x9107000 0x1000>;
199
200			clocks = <&clk_sysin>;
201		};
202
203		clockgen-d3@9107000 {
204			compatible = "st,clkgen-c32";
205			reg = <0x9107000 0x1000>;
206
207			clk_s_d3_flexgen: clk-s-d3-flexgen {
208				#clock-cells = <1>;
209				compatible = "st,flexgen", "st,flexgen-stih407-d3";
210
211				clocks = <&clk_s_d3_quadfs 0>,
212					 <&clk_s_d3_quadfs 1>,
213					 <&clk_s_d3_quadfs 2>,
214					 <&clk_s_d3_quadfs 3>,
215					 <&clk_sysin>;
216			};
217		};
218	};
219};
220