diff options
author | Joachim Eastwood <manabian@gmail.com> | 2015-05-28 16:31:44 -0400 |
---|---|---|
committer | Michael Turquette <mturquette@baylibre.com> | 2015-06-18 18:44:47 -0400 |
commit | 668c45df36939fbf0a3578ad97f547c8db86a7a0 (patch) | |
tree | 8db3d3aa7675bf2e096acc652ccd70fde254c30b | |
parent | b04e0b8fd5443b61c04e6103f16c5d1e1821e295 (diff) |
doc: dt: add documentation for lpc1850-cgu clk driver
Add DT binding documentation for lpc1850-cgu driver.
Signed-off-by: Joachim Eastwood <manabian@gmail.com>
Signed-off-by: Michael Turquette <mturquette@baylibre.com>
-rw-r--r-- | Documentation/devicetree/bindings/clock/lpc1850-cgu.txt | 131 |
1 files changed, 131 insertions, 0 deletions
diff --git a/Documentation/devicetree/bindings/clock/lpc1850-cgu.txt b/Documentation/devicetree/bindings/clock/lpc1850-cgu.txt new file mode 100644 index 000000000000..2cc32a9a945a --- /dev/null +++ b/Documentation/devicetree/bindings/clock/lpc1850-cgu.txt | |||
@@ -0,0 +1,131 @@ | |||
1 | * NXP LPC1850 Clock Generation Unit (CGU) | ||
2 | |||
3 | The CGU generates multiple independent clocks for the core and the | ||
4 | peripheral blocks of the LPC18xx. Each independent clock is called | ||
5 | a base clock and itself is one of the inputs to the two Clock | ||
6 | Control Units (CCUs) which control the branch clocks to the | ||
7 | individual peripherals. | ||
8 | |||
9 | The CGU selects the inputs to the clock generators from multiple | ||
10 | clock sources, controls the clock generation, and routes the outputs | ||
11 | of the clock generators through the clock source bus to the output | ||
12 | stages. Each output stage provides an independent clock source and | ||
13 | corresponds to one of the base clocks for the LPC18xx. | ||
14 | |||
15 | - Above text taken from NXP LPC1850 User Manual. | ||
16 | |||
17 | |||
18 | This binding uses the common clock binding: | ||
19 | Documentation/devicetree/bindings/clock/clock-bindings.txt | ||
20 | |||
21 | Required properties: | ||
22 | - compatible: | ||
23 | Should be "nxp,lpc1850-cgu" | ||
24 | - reg: | ||
25 | Shall define the base and range of the address space | ||
26 | containing clock control registers | ||
27 | - #clock-cells: | ||
28 | Shall have value <1>. The permitted clock-specifier values | ||
29 | are the base clock numbers defined below. | ||
30 | - clocks: | ||
31 | Shall contain a list of phandles for the external input | ||
32 | sources to the CGU. The list shall be in the following | ||
33 | order: xtal, 32khz, enet_rx_clk, enet_tx_clk, gp_clkin. | ||
34 | - clock-indices: | ||
35 | Shall be an ordered list of numbers defining the base clock | ||
36 | number provided by the CGU. | ||
37 | - clock-output-names: | ||
38 | Shall be an ordered list of strings defining the names of | ||
39 | the clocks provided by the CGU. | ||
40 | |||
41 | Which base clocks that are available on the CGU depends on the | ||
42 | specific LPC part. Base clocks are numbered from 0 to 27. | ||
43 | |||
44 | Number: Name: Description: | ||
45 | 0 BASE_SAFE_CLK Base safe clock (always on) for WWDT | ||
46 | 1 BASE_USB0_CLK Base clock for USB0 | ||
47 | 2 BASE_PERIPH_CLK Base clock for Cortex-M0SUB subsystem, | ||
48 | SPI, and SGPIO | ||
49 | 3 BASE_USB1_CLK Base clock for USB1 | ||
50 | 4 BASE_CPU_CLK System base clock for ARM Cortex-M core | ||
51 | and APB peripheral blocks #0 and #2 | ||
52 | 5 BASE_SPIFI_CLK Base clock for SPIFI | ||
53 | 6 BASE_SPI_CLK Base clock for SPI | ||
54 | 7 BASE_PHY_RX_CLK Base clock for Ethernet PHY Receive clock | ||
55 | 8 BASE_PHY_TX_CLK Base clock for Ethernet PHY Transmit clock | ||
56 | 9 BASE_APB1_CLK Base clock for APB peripheral block # 1 | ||
57 | 10 BASE_APB3_CLK Base clock for APB peripheral block # 3 | ||
58 | 11 BASE_LCD_CLK Base clock for LCD | ||
59 | 12 BASE_ADCHS_CLK Base clock for ADCHS | ||
60 | 13 BASE_SDIO_CLK Base clock for SD/MMC | ||
61 | 14 BASE_SSP0_CLK Base clock for SSP0 | ||
62 | 15 BASE_SSP1_CLK Base clock for SSP1 | ||
63 | 16 BASE_UART0_CLK Base clock for UART0 | ||
64 | 17 BASE_UART1_CLK Base clock for UART1 | ||
65 | 18 BASE_UART2_CLK Base clock for UART2 | ||
66 | 19 BASE_UART3_CLK Base clock for UART3 | ||
67 | 20 BASE_OUT_CLK Base clock for CLKOUT pin | ||
68 | 24-21 - Reserved | ||
69 | 25 BASE_AUDIO_CLK Base clock for audio system (I2S) | ||
70 | 26 BASE_CGU_OUT0_CLK Base clock for CGU_OUT0 clock output | ||
71 | 27 BASE_CGU_OUT1_CLK Base clock for CGU_OUT1 clock output | ||
72 | |||
73 | BASE_PERIPH_CLK and BASE_SPI_CLK is only available on LPC43xx. | ||
74 | BASE_ADCHS_CLK is only available on LPC4370. | ||
75 | |||
76 | |||
77 | Example board file: | ||
78 | |||
79 | / { | ||
80 | clocks { | ||
81 | xtal: xtal { | ||
82 | compatible = "fixed-clock"; | ||
83 | #clock-cells = <0>; | ||
84 | clock-frequency = <12000000>; | ||
85 | }; | ||
86 | |||
87 | xtal32: xtal32 { | ||
88 | compatible = "fixed-clock"; | ||
89 | #clock-cells = <0>; | ||
90 | clock-frequency = <32768>; | ||
91 | }; | ||
92 | |||
93 | enet_rx_clk: enet_rx_clk { | ||
94 | compatible = "fixed-clock"; | ||
95 | #clock-cells = <0>; | ||
96 | clock-frequency = <0>; | ||
97 | clock-output-names = "enet_rx_clk"; | ||
98 | }; | ||
99 | |||
100 | enet_tx_clk: enet_tx_clk { | ||
101 | compatible = "fixed-clock"; | ||
102 | #clock-cells = <0>; | ||
103 | clock-frequency = <0>; | ||
104 | clock-output-names = "enet_tx_clk"; | ||
105 | }; | ||
106 | |||
107 | gp_clkin: gp_clkin { | ||
108 | compatible = "fixed-clock"; | ||
109 | #clock-cells = <0>; | ||
110 | clock-frequency = <0>; | ||
111 | clock-output-names = "gp_clkin"; | ||
112 | }; | ||
113 | }; | ||
114 | |||
115 | soc { | ||
116 | cgu: clock-controller@40050000 { | ||
117 | compatible = "nxp,lpc1850-cgu"; | ||
118 | reg = <0x40050000 0x1000>; | ||
119 | #clock-cells = <1>; | ||
120 | clocks = <&xtal>, <&creg_clk 1>, <&enet_rx_clk>, <&enet_tx_clk>, <&gp_clkin>; | ||
121 | }; | ||
122 | |||
123 | /* A CGU and CCU clock consumer */ | ||
124 | lcdc: lcdc@40008000 { | ||
125 | ... | ||
126 | clocks = <&cgu BASE_LCD_CLK>, <&ccu1 CLK_CPU_LCD>; | ||
127 | clock-names = "clcdclk", "apb_pclk"; | ||
128 | ... | ||
129 | }; | ||
130 | }; | ||
131 | }; | ||