18c2ecf20Sopenharmony_ci* Samsung Exynos5260 Clock Controller
28c2ecf20Sopenharmony_ci
38c2ecf20Sopenharmony_ciExynos5260 has 13 clock controllers which are instantiated
48c2ecf20Sopenharmony_ciindependently from the device-tree. These clock controllers
58c2ecf20Sopenharmony_cigenerate and supply clocks to various hardware blocks within
68c2ecf20Sopenharmony_cithe SoC.
78c2ecf20Sopenharmony_ci
88c2ecf20Sopenharmony_ciEach clock is assigned an identifier and client nodes can use
98c2ecf20Sopenharmony_cithis identifier to specify the clock which they consume. All
108c2ecf20Sopenharmony_ciavailable clocks are defined as preprocessor macros in
118c2ecf20Sopenharmony_cidt-bindings/clock/exynos5260-clk.h header and can be used in
128c2ecf20Sopenharmony_cidevice tree sources.
138c2ecf20Sopenharmony_ci
148c2ecf20Sopenharmony_ciExternal clocks:
158c2ecf20Sopenharmony_ci
168c2ecf20Sopenharmony_ciThere are several clocks that are generated outside the SoC. It
178c2ecf20Sopenharmony_ciis expected that they are defined using standard clock bindings
188c2ecf20Sopenharmony_ciwith following clock-output-names:
198c2ecf20Sopenharmony_ci
208c2ecf20Sopenharmony_ci - "fin_pll" - PLL input clock from XXTI
218c2ecf20Sopenharmony_ci - "xrtcxti" - input clock from XRTCXTI
228c2ecf20Sopenharmony_ci - "ioclk_pcm_extclk" - pcm external operation clock
238c2ecf20Sopenharmony_ci - "ioclk_spdif_extclk" - spdif external operation clock
248c2ecf20Sopenharmony_ci - "ioclk_i2s_cdclk" - i2s0 codec clock
258c2ecf20Sopenharmony_ci
268c2ecf20Sopenharmony_ciPhy clocks:
278c2ecf20Sopenharmony_ci
288c2ecf20Sopenharmony_ciThere are several clocks which are generated by specific PHYs.
298c2ecf20Sopenharmony_ciThese clocks are fed into the clock controller and then routed to
308c2ecf20Sopenharmony_cithe hardware blocks. These clocks are defined as fixed clocks in the
318c2ecf20Sopenharmony_cidriver with following names:
328c2ecf20Sopenharmony_ci
338c2ecf20Sopenharmony_ci - "phyclk_dptx_phy_ch3_txd_clk" - dp phy clock for channel 3
348c2ecf20Sopenharmony_ci - "phyclk_dptx_phy_ch2_txd_clk" - dp phy clock for channel 2
358c2ecf20Sopenharmony_ci - "phyclk_dptx_phy_ch1_txd_clk" - dp phy clock for channel 1
368c2ecf20Sopenharmony_ci - "phyclk_dptx_phy_ch0_txd_clk" - dp phy clock for channel 0
378c2ecf20Sopenharmony_ci - "phyclk_hdmi_phy_tmds_clko" - hdmi phy tmds clock
388c2ecf20Sopenharmony_ci - "phyclk_hdmi_phy_pixel_clko" - hdmi phy pixel clock
398c2ecf20Sopenharmony_ci - "phyclk_hdmi_link_o_tmds_clkhi" - hdmi phy for hdmi link
408c2ecf20Sopenharmony_ci - "phyclk_dptx_phy_o_ref_clk_24m" - dp phy reference clock
418c2ecf20Sopenharmony_ci - "phyclk_dptx_phy_clk_div2"
428c2ecf20Sopenharmony_ci - "phyclk_mipi_dphy_4l_m_rxclkesc0"
438c2ecf20Sopenharmony_ci - "phyclk_usbhost20_phy_phyclock" - usb 2.0 phy clock
448c2ecf20Sopenharmony_ci - "phyclk_usbhost20_phy_freeclk"
458c2ecf20Sopenharmony_ci - "phyclk_usbhost20_phy_clk48mohci"
468c2ecf20Sopenharmony_ci - "phyclk_usbdrd30_udrd30_pipe_pclk"
478c2ecf20Sopenharmony_ci - "phyclk_usbdrd30_udrd30_phyclock" - usb 3.0 phy clock
488c2ecf20Sopenharmony_ci
498c2ecf20Sopenharmony_ciRequired Properties for Clock Controller:
508c2ecf20Sopenharmony_ci
518c2ecf20Sopenharmony_ci - compatible: should be one of the following.
528c2ecf20Sopenharmony_ci	1) "samsung,exynos5260-clock-top"
538c2ecf20Sopenharmony_ci	2) "samsung,exynos5260-clock-peri"
548c2ecf20Sopenharmony_ci	3) "samsung,exynos5260-clock-egl"
558c2ecf20Sopenharmony_ci	4) "samsung,exynos5260-clock-kfc"
568c2ecf20Sopenharmony_ci	5) "samsung,exynos5260-clock-g2d"
578c2ecf20Sopenharmony_ci	6) "samsung,exynos5260-clock-mif"
588c2ecf20Sopenharmony_ci	7) "samsung,exynos5260-clock-mfc"
598c2ecf20Sopenharmony_ci	8) "samsung,exynos5260-clock-g3d"
608c2ecf20Sopenharmony_ci	9) "samsung,exynos5260-clock-fsys"
618c2ecf20Sopenharmony_ci	10) "samsung,exynos5260-clock-aud"
628c2ecf20Sopenharmony_ci	11) "samsung,exynos5260-clock-isp"
638c2ecf20Sopenharmony_ci	12) "samsung,exynos5260-clock-gscl"
648c2ecf20Sopenharmony_ci	13) "samsung,exynos5260-clock-disp"
658c2ecf20Sopenharmony_ci
668c2ecf20Sopenharmony_ci - reg: physical base address of the controller and the length of
678c2ecf20Sopenharmony_ci	memory mapped region.
688c2ecf20Sopenharmony_ci
698c2ecf20Sopenharmony_ci - #clock-cells: should be 1.
708c2ecf20Sopenharmony_ci
718c2ecf20Sopenharmony_ci - clocks: list of clock identifiers which are fed as the input to
728c2ecf20Sopenharmony_ci	the given clock controller. Please refer the next section to find
738c2ecf20Sopenharmony_ci	the input clocks for a given controller.
748c2ecf20Sopenharmony_ci
758c2ecf20Sopenharmony_ci - clock-names: list of names of clocks which are fed as the input
768c2ecf20Sopenharmony_ci	to the given clock controller.
778c2ecf20Sopenharmony_ci
788c2ecf20Sopenharmony_ciInput clocks for top clock controller:
798c2ecf20Sopenharmony_ci	- fin_pll
808c2ecf20Sopenharmony_ci	- dout_mem_pll
818c2ecf20Sopenharmony_ci	- dout_bus_pll
828c2ecf20Sopenharmony_ci	- dout_media_pll
838c2ecf20Sopenharmony_ci
848c2ecf20Sopenharmony_ciInput clocks for peri clock controller:
858c2ecf20Sopenharmony_ci	- fin_pll
868c2ecf20Sopenharmony_ci	- ioclk_pcm_extclk
878c2ecf20Sopenharmony_ci	- ioclk_i2s_cdclk
888c2ecf20Sopenharmony_ci	- ioclk_spdif_extclk
898c2ecf20Sopenharmony_ci	- phyclk_hdmi_phy_ref_cko
908c2ecf20Sopenharmony_ci	- dout_aclk_peri_66
918c2ecf20Sopenharmony_ci	- dout_sclk_peri_uart0
928c2ecf20Sopenharmony_ci	- dout_sclk_peri_uart1
938c2ecf20Sopenharmony_ci	- dout_sclk_peri_uart2
948c2ecf20Sopenharmony_ci	- dout_sclk_peri_spi0_b
958c2ecf20Sopenharmony_ci	- dout_sclk_peri_spi1_b
968c2ecf20Sopenharmony_ci	- dout_sclk_peri_spi2_b
978c2ecf20Sopenharmony_ci	- dout_aclk_peri_aud
988c2ecf20Sopenharmony_ci	- dout_sclk_peri_spi0_b
998c2ecf20Sopenharmony_ci
1008c2ecf20Sopenharmony_ciInput clocks for egl clock controller:
1018c2ecf20Sopenharmony_ci	- fin_pll
1028c2ecf20Sopenharmony_ci	- dout_bus_pll
1038c2ecf20Sopenharmony_ci
1048c2ecf20Sopenharmony_ciInput clocks for kfc clock controller:
1058c2ecf20Sopenharmony_ci	- fin_pll
1068c2ecf20Sopenharmony_ci	- dout_media_pll
1078c2ecf20Sopenharmony_ci
1088c2ecf20Sopenharmony_ciInput clocks for g2d clock controller:
1098c2ecf20Sopenharmony_ci	- fin_pll
1108c2ecf20Sopenharmony_ci	- dout_aclk_g2d_333
1118c2ecf20Sopenharmony_ci
1128c2ecf20Sopenharmony_ciInput clocks for mif clock controller:
1138c2ecf20Sopenharmony_ci	- fin_pll
1148c2ecf20Sopenharmony_ci
1158c2ecf20Sopenharmony_ciInput clocks for mfc clock controller:
1168c2ecf20Sopenharmony_ci	- fin_pll
1178c2ecf20Sopenharmony_ci	- dout_aclk_mfc_333
1188c2ecf20Sopenharmony_ci
1198c2ecf20Sopenharmony_ciInput clocks for g3d clock controller:
1208c2ecf20Sopenharmony_ci	- fin_pll
1218c2ecf20Sopenharmony_ci
1228c2ecf20Sopenharmony_ciInput clocks for fsys clock controller:
1238c2ecf20Sopenharmony_ci	- fin_pll
1248c2ecf20Sopenharmony_ci	- phyclk_usbhost20_phy_phyclock
1258c2ecf20Sopenharmony_ci	- phyclk_usbhost20_phy_freeclk
1268c2ecf20Sopenharmony_ci	- phyclk_usbhost20_phy_clk48mohci
1278c2ecf20Sopenharmony_ci	- phyclk_usbdrd30_udrd30_pipe_pclk
1288c2ecf20Sopenharmony_ci	- phyclk_usbdrd30_udrd30_phyclock
1298c2ecf20Sopenharmony_ci	- dout_aclk_fsys_200
1308c2ecf20Sopenharmony_ci
1318c2ecf20Sopenharmony_ciInput clocks for aud clock controller:
1328c2ecf20Sopenharmony_ci	- fin_pll
1338c2ecf20Sopenharmony_ci	- fout_aud_pll
1348c2ecf20Sopenharmony_ci	- ioclk_i2s_cdclk
1358c2ecf20Sopenharmony_ci	- ioclk_pcm_extclk
1368c2ecf20Sopenharmony_ci
1378c2ecf20Sopenharmony_ciInput clocks for isp clock controller:
1388c2ecf20Sopenharmony_ci	- fin_pll
1398c2ecf20Sopenharmony_ci	- dout_aclk_isp1_266
1408c2ecf20Sopenharmony_ci	- dout_aclk_isp1_400
1418c2ecf20Sopenharmony_ci	- mout_aclk_isp1_266
1428c2ecf20Sopenharmony_ci
1438c2ecf20Sopenharmony_ciInput clocks for gscl clock controller:
1448c2ecf20Sopenharmony_ci	- fin_pll
1458c2ecf20Sopenharmony_ci	- dout_aclk_gscl_400
1468c2ecf20Sopenharmony_ci	- dout_aclk_gscl_333
1478c2ecf20Sopenharmony_ci
1488c2ecf20Sopenharmony_ciInput clocks for disp clock controller:
1498c2ecf20Sopenharmony_ci	- fin_pll
1508c2ecf20Sopenharmony_ci	- phyclk_dptx_phy_ch3_txd_clk
1518c2ecf20Sopenharmony_ci	- phyclk_dptx_phy_ch2_txd_clk
1528c2ecf20Sopenharmony_ci	- phyclk_dptx_phy_ch1_txd_clk
1538c2ecf20Sopenharmony_ci	- phyclk_dptx_phy_ch0_txd_clk
1548c2ecf20Sopenharmony_ci	- phyclk_hdmi_phy_tmds_clko
1558c2ecf20Sopenharmony_ci	- phyclk_hdmi_phy_ref_clko
1568c2ecf20Sopenharmony_ci	- phyclk_hdmi_phy_pixel_clko
1578c2ecf20Sopenharmony_ci	- phyclk_hdmi_link_o_tmds_clkhi
1588c2ecf20Sopenharmony_ci	- phyclk_mipi_dphy_4l_m_txbyte_clkhs
1598c2ecf20Sopenharmony_ci	- phyclk_dptx_phy_o_ref_clk_24m
1608c2ecf20Sopenharmony_ci	- phyclk_dptx_phy_clk_div2
1618c2ecf20Sopenharmony_ci	- phyclk_mipi_dphy_4l_m_rxclkesc0
1628c2ecf20Sopenharmony_ci	- phyclk_hdmi_phy_ref_cko
1638c2ecf20Sopenharmony_ci	- ioclk_spdif_extclk
1648c2ecf20Sopenharmony_ci	- dout_aclk_peri_aud
1658c2ecf20Sopenharmony_ci	- dout_aclk_disp_222
1668c2ecf20Sopenharmony_ci	- dout_sclk_disp_pixel
1678c2ecf20Sopenharmony_ci	- dout_aclk_disp_333
1688c2ecf20Sopenharmony_ci
1698c2ecf20Sopenharmony_ciExample 1: An example of a clock controller node is listed below.
1708c2ecf20Sopenharmony_ci
1718c2ecf20Sopenharmony_ci	clock_mfc: clock-controller@11090000 {
1728c2ecf20Sopenharmony_ci		compatible = "samsung,exynos5260-clock-mfc";
1738c2ecf20Sopenharmony_ci		clock = <&fin_pll>, <&clock_top TOP_DOUT_ACLK_MFC_333>;
1748c2ecf20Sopenharmony_ci		clock-names = "fin_pll", "dout_aclk_mfc_333";
1758c2ecf20Sopenharmony_ci		reg = <0x11090000 0x10000>;
1768c2ecf20Sopenharmony_ci		#clock-cells = <1>;
1778c2ecf20Sopenharmony_ci	};
1788c2ecf20Sopenharmony_ci
1798c2ecf20Sopenharmony_ciExample 2: UART controller node that consumes the clock generated by the
1808c2ecf20Sopenharmony_ci		peri clock controller. Refer to the standard clock bindings for
1818c2ecf20Sopenharmony_ci		information about 'clocks' and 'clock-names' property.
1828c2ecf20Sopenharmony_ci
1838c2ecf20Sopenharmony_ci	serial@12c00000 {
1848c2ecf20Sopenharmony_ci		compatible = "samsung,exynos4210-uart";
1858c2ecf20Sopenharmony_ci		reg = <0x12C00000 0x100>;
1868c2ecf20Sopenharmony_ci		interrupts = <0 146 0>;
1878c2ecf20Sopenharmony_ci		clocks = <&clock_peri PERI_PCLK_UART0>, <&clock_peri PERI_SCLK_UART0>;
1888c2ecf20Sopenharmony_ci		clock-names = "uart", "clk_uart_baud0";
1898c2ecf20Sopenharmony_ci	};
1908c2ecf20Sopenharmony_ci
191