xref: /freebsd/sys/contrib/device-tree/Bindings/clock/lpc1850-ccu.txt (revision aa1a8ff2d6dbc51ef058f46f3db5a8bb77967145)
1c66ec88fSEmmanuel Vadot* NXP LPC1850 Clock Control Unit (CCU)
2c66ec88fSEmmanuel Vadot
3c66ec88fSEmmanuel VadotEach CGU base clock has several clock branches which can be turned on
4c66ec88fSEmmanuel Vadotor off independently by the Clock Control Units CCU1 or CCU2. The
5c66ec88fSEmmanuel Vadotbranch clocks are distributed between CCU1 and CCU2.
6c66ec88fSEmmanuel Vadot
7c66ec88fSEmmanuel Vadot - Above text taken from NXP LPC1850 User Manual.
8c66ec88fSEmmanuel Vadot
9c66ec88fSEmmanuel VadotThis binding uses the common clock binding:
10c66ec88fSEmmanuel Vadot    Documentation/devicetree/bindings/clock/clock-bindings.txt
11c66ec88fSEmmanuel Vadot
12c66ec88fSEmmanuel VadotRequired properties:
13c66ec88fSEmmanuel Vadot- compatible:
14c66ec88fSEmmanuel Vadot	Should be "nxp,lpc1850-ccu"
15c66ec88fSEmmanuel Vadot- reg:
16c66ec88fSEmmanuel Vadot	Shall define the base and range of the address space
17c66ec88fSEmmanuel Vadot	containing clock control registers
18c66ec88fSEmmanuel Vadot- #clock-cells:
19c66ec88fSEmmanuel Vadot	Shall have value <1>.  The permitted clock-specifier values
20c66ec88fSEmmanuel Vadot	are the branch clock names defined in table below.
21c66ec88fSEmmanuel Vadot- clocks:
22c66ec88fSEmmanuel Vadot	Shall contain a list of phandles for the base clocks routed
23c66ec88fSEmmanuel Vadot	from the CGU to the specific CCU. See mapping of base clocks
24c66ec88fSEmmanuel Vadot	and CCU in table below.
25c66ec88fSEmmanuel Vadot- clock-names:
26c66ec88fSEmmanuel Vadot	Shall contain a list of names for the base clock routed
27c66ec88fSEmmanuel Vadot	from the CGU to the specific CCU. Valid CCU clock names:
28c66ec88fSEmmanuel Vadot	"base_usb0_clk",  "base_periph_clk", "base_usb1_clk",
29c66ec88fSEmmanuel Vadot	"base_cpu_clk",   "base_spifi_clk",  "base_spi_clk",
30c66ec88fSEmmanuel Vadot	"base_apb1_clk",  "base_apb3_clk",   "base_adchs_clk",
31c66ec88fSEmmanuel Vadot	"base_sdio_clk",  "base_ssp0_clk",   "base_ssp1_clk",
32c66ec88fSEmmanuel Vadot	"base_uart0_clk", "base_uart1_clk",  "base_uart2_clk",
33c66ec88fSEmmanuel Vadot	"base_uart3_clk", "base_audio_clk"
34c66ec88fSEmmanuel Vadot
35c66ec88fSEmmanuel VadotWhich branch clocks that are available on the CCU depends on the
36c66ec88fSEmmanuel Vadotspecific LPC part. Check the user manual for your specific part.
37c66ec88fSEmmanuel Vadot
38c66ec88fSEmmanuel VadotA list of CCU clocks can be found in dt-bindings/clock/lpc18xx-ccu.h.
39c66ec88fSEmmanuel Vadot
40c66ec88fSEmmanuel VadotExample board file:
41c66ec88fSEmmanuel Vadot
42c66ec88fSEmmanuel Vadotsoc {
43c66ec88fSEmmanuel Vadot	ccu1: clock-controller@40051000 {
44c66ec88fSEmmanuel Vadot		compatible = "nxp,lpc1850-ccu";
45c66ec88fSEmmanuel Vadot		reg = <0x40051000 0x1000>;
46c66ec88fSEmmanuel Vadot		#clock-cells = <1>;
47c66ec88fSEmmanuel Vadot		clocks = <&cgu BASE_APB3_CLK>,   <&cgu BASE_APB1_CLK>,
48c66ec88fSEmmanuel Vadot			 <&cgu BASE_SPIFI_CLK>,  <&cgu BASE_CPU_CLK>,
49c66ec88fSEmmanuel Vadot			 <&cgu BASE_PERIPH_CLK>, <&cgu BASE_USB0_CLK>,
50c66ec88fSEmmanuel Vadot			 <&cgu BASE_USB1_CLK>,   <&cgu BASE_SPI_CLK>;
51c66ec88fSEmmanuel Vadot		clock-names = "base_apb3_clk",   "base_apb1_clk",
52c66ec88fSEmmanuel Vadot			      "base_spifi_clk",  "base_cpu_clk",
53c66ec88fSEmmanuel Vadot			      "base_periph_clk", "base_usb0_clk",
54c66ec88fSEmmanuel Vadot			      "base_usb1_clk",   "base_spi_clk";
55c66ec88fSEmmanuel Vadot	};
56c66ec88fSEmmanuel Vadot
57c66ec88fSEmmanuel Vadot	ccu2: clock-controller@40052000 {
58c66ec88fSEmmanuel Vadot		compatible = "nxp,lpc1850-ccu";
59c66ec88fSEmmanuel Vadot		reg = <0x40052000 0x1000>;
60c66ec88fSEmmanuel Vadot		#clock-cells = <1>;
61c66ec88fSEmmanuel Vadot		clocks = <&cgu BASE_AUDIO_CLK>, <&cgu BASE_UART3_CLK>,
62c66ec88fSEmmanuel Vadot			 <&cgu BASE_UART2_CLK>, <&cgu BASE_UART1_CLK>,
63c66ec88fSEmmanuel Vadot			 <&cgu BASE_UART0_CLK>, <&cgu BASE_SSP1_CLK>,
64c66ec88fSEmmanuel Vadot			 <&cgu BASE_SSP0_CLK>,  <&cgu BASE_SDIO_CLK>;
65c66ec88fSEmmanuel Vadot		clock-names = "base_audio_clk", "base_uart3_clk",
66c66ec88fSEmmanuel Vadot			      "base_uart2_clk", "base_uart1_clk",
67c66ec88fSEmmanuel Vadot			      "base_uart0_clk", "base_ssp1_clk",
68c66ec88fSEmmanuel Vadot			      "base_ssp0_clk",  "base_sdio_clk";
69c66ec88fSEmmanuel Vadot	};
70c66ec88fSEmmanuel Vadot
71*aa1a8ff2SEmmanuel Vadot	/* A user of CCU branch clocks */
72c66ec88fSEmmanuel Vadot	uart1: serial@40082000 {
73c66ec88fSEmmanuel Vadot		...
74c66ec88fSEmmanuel Vadot		clocks = <&ccu2 CLK_APB0_UART1>, <&ccu1 CLK_CPU_UART1>;
75c66ec88fSEmmanuel Vadot		...
76c66ec88fSEmmanuel Vadot	};
77c66ec88fSEmmanuel Vadot};
78