18c2ecf20Sopenharmony_ci* NXP LPC1850 Clock Control Unit (CCU)
28c2ecf20Sopenharmony_ci
38c2ecf20Sopenharmony_ciEach CGU base clock has several clock branches which can be turned on
48c2ecf20Sopenharmony_cior off independently by the Clock Control Units CCU1 or CCU2. The
58c2ecf20Sopenharmony_cibranch clocks are distributed between CCU1 and CCU2.
68c2ecf20Sopenharmony_ci
78c2ecf20Sopenharmony_ci - Above text taken from NXP LPC1850 User Manual.
88c2ecf20Sopenharmony_ci
98c2ecf20Sopenharmony_ciThis binding uses the common clock binding:
108c2ecf20Sopenharmony_ci    Documentation/devicetree/bindings/clock/clock-bindings.txt
118c2ecf20Sopenharmony_ci
128c2ecf20Sopenharmony_ciRequired properties:
138c2ecf20Sopenharmony_ci- compatible:
148c2ecf20Sopenharmony_ci	Should be "nxp,lpc1850-ccu"
158c2ecf20Sopenharmony_ci- reg:
168c2ecf20Sopenharmony_ci	Shall define the base and range of the address space
178c2ecf20Sopenharmony_ci	containing clock control registers
188c2ecf20Sopenharmony_ci- #clock-cells:
198c2ecf20Sopenharmony_ci	Shall have value <1>.  The permitted clock-specifier values
208c2ecf20Sopenharmony_ci	are the branch clock names defined in table below.
218c2ecf20Sopenharmony_ci- clocks:
228c2ecf20Sopenharmony_ci	Shall contain a list of phandles for the base clocks routed
238c2ecf20Sopenharmony_ci	from the CGU to the specific CCU. See mapping of base clocks
248c2ecf20Sopenharmony_ci	and CCU in table below.
258c2ecf20Sopenharmony_ci- clock-names:
268c2ecf20Sopenharmony_ci	Shall contain a list of names for the base clock routed
278c2ecf20Sopenharmony_ci	from the CGU to the specific CCU. Valid CCU clock names:
288c2ecf20Sopenharmony_ci	"base_usb0_clk",  "base_periph_clk", "base_usb1_clk",
298c2ecf20Sopenharmony_ci	"base_cpu_clk",   "base_spifi_clk",  "base_spi_clk",
308c2ecf20Sopenharmony_ci	"base_apb1_clk",  "base_apb3_clk",   "base_adchs_clk",
318c2ecf20Sopenharmony_ci	"base_sdio_clk",  "base_ssp0_clk",   "base_ssp1_clk",
328c2ecf20Sopenharmony_ci	"base_uart0_clk", "base_uart1_clk",  "base_uart2_clk",
338c2ecf20Sopenharmony_ci	"base_uart3_clk", "base_audio_clk"
348c2ecf20Sopenharmony_ci
358c2ecf20Sopenharmony_ciWhich branch clocks that are available on the CCU depends on the
368c2ecf20Sopenharmony_cispecific LPC part. Check the user manual for your specific part.
378c2ecf20Sopenharmony_ci
388c2ecf20Sopenharmony_ciA list of CCU clocks can be found in dt-bindings/clock/lpc18xx-ccu.h.
398c2ecf20Sopenharmony_ci
408c2ecf20Sopenharmony_ciExample board file:
418c2ecf20Sopenharmony_ci
428c2ecf20Sopenharmony_cisoc {
438c2ecf20Sopenharmony_ci	ccu1: clock-controller@40051000 {
448c2ecf20Sopenharmony_ci		compatible = "nxp,lpc1850-ccu";
458c2ecf20Sopenharmony_ci		reg = <0x40051000 0x1000>;
468c2ecf20Sopenharmony_ci		#clock-cells = <1>;
478c2ecf20Sopenharmony_ci		clocks = <&cgu BASE_APB3_CLK>,   <&cgu BASE_APB1_CLK>,
488c2ecf20Sopenharmony_ci			 <&cgu BASE_SPIFI_CLK>,  <&cgu BASE_CPU_CLK>,
498c2ecf20Sopenharmony_ci			 <&cgu BASE_PERIPH_CLK>, <&cgu BASE_USB0_CLK>,
508c2ecf20Sopenharmony_ci			 <&cgu BASE_USB1_CLK>,   <&cgu BASE_SPI_CLK>;
518c2ecf20Sopenharmony_ci		clock-names = "base_apb3_clk",   "base_apb1_clk",
528c2ecf20Sopenharmony_ci			      "base_spifi_clk",  "base_cpu_clk",
538c2ecf20Sopenharmony_ci			      "base_periph_clk", "base_usb0_clk",
548c2ecf20Sopenharmony_ci			      "base_usb1_clk",   "base_spi_clk";
558c2ecf20Sopenharmony_ci	};
568c2ecf20Sopenharmony_ci
578c2ecf20Sopenharmony_ci	ccu2: clock-controller@40052000 {
588c2ecf20Sopenharmony_ci		compatible = "nxp,lpc1850-ccu";
598c2ecf20Sopenharmony_ci		reg = <0x40052000 0x1000>;
608c2ecf20Sopenharmony_ci		#clock-cells = <1>;
618c2ecf20Sopenharmony_ci		clocks = <&cgu BASE_AUDIO_CLK>, <&cgu BASE_UART3_CLK>,
628c2ecf20Sopenharmony_ci			 <&cgu BASE_UART2_CLK>, <&cgu BASE_UART1_CLK>,
638c2ecf20Sopenharmony_ci			 <&cgu BASE_UART0_CLK>, <&cgu BASE_SSP1_CLK>,
648c2ecf20Sopenharmony_ci			 <&cgu BASE_SSP0_CLK>,  <&cgu BASE_SDIO_CLK>;
658c2ecf20Sopenharmony_ci		clock-names = "base_audio_clk", "base_uart3_clk",
668c2ecf20Sopenharmony_ci			      "base_uart2_clk", "base_uart1_clk",
678c2ecf20Sopenharmony_ci			      "base_uart0_clk", "base_ssp1_clk",
688c2ecf20Sopenharmony_ci			      "base_ssp0_clk",  "base_sdio_clk";
698c2ecf20Sopenharmony_ci	};
708c2ecf20Sopenharmony_ci
718c2ecf20Sopenharmony_ci	/* A user of CCU brach clocks */
728c2ecf20Sopenharmony_ci	uart1: serial@40082000 {
738c2ecf20Sopenharmony_ci		...
748c2ecf20Sopenharmony_ci		clocks = <&ccu2 CLK_APB0_UART1>, <&ccu1 CLK_CPU_UART1>;
758c2ecf20Sopenharmony_ci		...
768c2ecf20Sopenharmony_ci	};
778c2ecf20Sopenharmony_ci};
78