xref: /freebsd/sys/contrib/device-tree/Bindings/clock/nxp,lpc1850-cgu.yaml (revision 833e5d42ab135b0238e61c5b3c19b8619677cbfa)
1*833e5d42SEmmanuel Vadot# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
2*833e5d42SEmmanuel Vadot%YAML 1.2
3*833e5d42SEmmanuel Vadot---
4*833e5d42SEmmanuel Vadot$id: http://devicetree.org/schemas/clock/nxp,lpc1850-cgu.yaml#
5*833e5d42SEmmanuel Vadot$schema: http://devicetree.org/meta-schemas/core.yaml#
6*833e5d42SEmmanuel Vadot
7*833e5d42SEmmanuel Vadottitle: NXP LPC1850 Clock Generation Unit (CGU)
8*833e5d42SEmmanuel Vadot
9*833e5d42SEmmanuel Vadotdescription: >
10*833e5d42SEmmanuel Vadot  The CGU generates multiple independent clocks for the core and the
11*833e5d42SEmmanuel Vadot  peripheral blocks of the LPC18xx. Each independent clock is called
12*833e5d42SEmmanuel Vadot  a base clock and itself is one of the inputs to the two Clock
13*833e5d42SEmmanuel Vadot  Control Units (CCUs) which control the branch clocks to the
14*833e5d42SEmmanuel Vadot  individual peripherals.
15*833e5d42SEmmanuel Vadot
16*833e5d42SEmmanuel Vadot  The CGU selects the inputs to the clock generators from multiple
17*833e5d42SEmmanuel Vadot  clock sources, controls the clock generation, and routes the outputs
18*833e5d42SEmmanuel Vadot  of the clock generators through the clock source bus to the output
19*833e5d42SEmmanuel Vadot  stages. Each output stage provides an independent clock source and
20*833e5d42SEmmanuel Vadot  corresponds to one of the base clocks for the LPC18xx.
21*833e5d42SEmmanuel Vadot
22*833e5d42SEmmanuel Vadot  Above text taken from NXP LPC1850 User Manual.
23*833e5d42SEmmanuel Vadot
24*833e5d42SEmmanuel Vadotmaintainers:
25*833e5d42SEmmanuel Vadot  - Frank Li <Frank.Li@nxp.com>
26*833e5d42SEmmanuel Vadot
27*833e5d42SEmmanuel Vadotproperties:
28*833e5d42SEmmanuel Vadot  compatible:
29*833e5d42SEmmanuel Vadot    const: nxp,lpc1850-cgu
30*833e5d42SEmmanuel Vadot
31*833e5d42SEmmanuel Vadot  reg:
32*833e5d42SEmmanuel Vadot    maxItems: 1
33*833e5d42SEmmanuel Vadot
34*833e5d42SEmmanuel Vadot  '#clock-cells':
35*833e5d42SEmmanuel Vadot    const: 1
36*833e5d42SEmmanuel Vadot    description: |
37*833e5d42SEmmanuel Vadot      Which base clocks that are available on the CGU depends on the
38*833e5d42SEmmanuel Vadot      specific LPC part. Base clocks are numbered from 0 to 27.
39*833e5d42SEmmanuel Vadot
40*833e5d42SEmmanuel Vadot      Number:         Name:                   Description:
41*833e5d42SEmmanuel Vadot       0              BASE_SAFE_CLK           Base safe clock (always on) for WWDT
42*833e5d42SEmmanuel Vadot       1              BASE_USB0_CLK           Base clock for USB0
43*833e5d42SEmmanuel Vadot       2              BASE_PERIPH_CLK         Base clock for Cortex-M0SUB subsystem,
44*833e5d42SEmmanuel Vadot                                        SPI, and SGPIO
45*833e5d42SEmmanuel Vadot       3              BASE_USB1_CLK           Base clock for USB1
46*833e5d42SEmmanuel Vadot       4              BASE_CPU_CLK            System base clock for ARM Cortex-M core
47*833e5d42SEmmanuel Vadot                                        and APB peripheral blocks #0 and #2
48*833e5d42SEmmanuel Vadot       5              BASE_SPIFI_CLK          Base clock for SPIFI
49*833e5d42SEmmanuel Vadot       6              BASE_SPI_CLK            Base clock for SPI
50*833e5d42SEmmanuel Vadot       7              BASE_PHY_RX_CLK         Base clock for Ethernet PHY Receive clock
51*833e5d42SEmmanuel Vadot       8              BASE_PHY_TX_CLK         Base clock for Ethernet PHY Transmit clock
52*833e5d42SEmmanuel Vadot       9              BASE_APB1_CLK           Base clock for APB peripheral block # 1
53*833e5d42SEmmanuel Vadot      10              BASE_APB3_CLK           Base clock for APB peripheral block # 3
54*833e5d42SEmmanuel Vadot      11              BASE_LCD_CLK            Base clock for LCD
55*833e5d42SEmmanuel Vadot      12              BASE_ADCHS_CLK          Base clock for ADCHS
56*833e5d42SEmmanuel Vadot      13              BASE_SDIO_CLK           Base clock for SD/MMC
57*833e5d42SEmmanuel Vadot      14              BASE_SSP0_CLK           Base clock for SSP0
58*833e5d42SEmmanuel Vadot      15              BASE_SSP1_CLK           Base clock for SSP1
59*833e5d42SEmmanuel Vadot      16              BASE_UART0_CLK          Base clock for UART0
60*833e5d42SEmmanuel Vadot      17              BASE_UART1_CLK          Base clock for UART1
61*833e5d42SEmmanuel Vadot      18              BASE_UART2_CLK          Base clock for UART2
62*833e5d42SEmmanuel Vadot      19              BASE_UART3_CLK          Base clock for UART3
63*833e5d42SEmmanuel Vadot      20              BASE_OUT_CLK            Base clock for CLKOUT pin
64*833e5d42SEmmanuel Vadot      24-21           -                       Reserved
65*833e5d42SEmmanuel Vadot      25              BASE_AUDIO_CLK          Base clock for audio system (I2S)
66*833e5d42SEmmanuel Vadot      26              BASE_CGU_OUT0_CLK       Base clock for CGU_OUT0 clock output
67*833e5d42SEmmanuel Vadot      27              BASE_CGU_OUT1_CLK       Base clock for CGU_OUT1 clock output
68*833e5d42SEmmanuel Vadot
69*833e5d42SEmmanuel Vadot      BASE_PERIPH_CLK and BASE_SPI_CLK is only available on LPC43xx.
70*833e5d42SEmmanuel Vadot      BASE_ADCHS_CLK is only available on LPC4370.
71*833e5d42SEmmanuel Vadot
72*833e5d42SEmmanuel Vadot  clocks:
73*833e5d42SEmmanuel Vadot    maxItems: 5
74*833e5d42SEmmanuel Vadot
75*833e5d42SEmmanuel Vadot  clock-indices:
76*833e5d42SEmmanuel Vadot    minItems: 1
77*833e5d42SEmmanuel Vadot    maxItems: 28
78*833e5d42SEmmanuel Vadot
79*833e5d42SEmmanuel Vadot  clock-output-names:
80*833e5d42SEmmanuel Vadot    minItems: 1
81*833e5d42SEmmanuel Vadot    maxItems: 28
82*833e5d42SEmmanuel Vadot
83*833e5d42SEmmanuel Vadotrequired:
84*833e5d42SEmmanuel Vadot  - compatible
85*833e5d42SEmmanuel Vadot  - reg
86*833e5d42SEmmanuel Vadot  - clocks
87*833e5d42SEmmanuel Vadot  - '#clock-cells'
88*833e5d42SEmmanuel Vadot
89*833e5d42SEmmanuel VadotadditionalProperties: false
90*833e5d42SEmmanuel Vadot
91*833e5d42SEmmanuel Vadotexamples:
92*833e5d42SEmmanuel Vadot  - |
93*833e5d42SEmmanuel Vadot    clock-controller@40050000 {
94*833e5d42SEmmanuel Vadot        compatible = "nxp,lpc1850-cgu";
95*833e5d42SEmmanuel Vadot        reg = <0x40050000 0x1000>;
96*833e5d42SEmmanuel Vadot        #clock-cells = <1>;
97*833e5d42SEmmanuel Vadot        clocks = <&xtal>, <&creg_clk 1>, <&enet_rx_clk>, <&enet_tx_clk>, <&gp_clkin>;
98*833e5d42SEmmanuel Vadot    };
99*833e5d42SEmmanuel Vadot
100