xref: /freebsd/sys/contrib/device-tree/Bindings/clock/rockchip,rk3399-cru.yaml (revision 7ef62cebc2f965b0f640263e179276928885e33d)
1*7ef62cebSEmmanuel Vadot# SPDX-License-Identifier: (GPL-2.0+ OR MIT)
2354d7675SEmmanuel Vadot%YAML 1.2
3354d7675SEmmanuel Vadot---
4354d7675SEmmanuel Vadot$id: http://devicetree.org/schemas/clock/rockchip,rk3399-cru.yaml#
5354d7675SEmmanuel Vadot$schema: http://devicetree.org/meta-schemas/core.yaml#
6354d7675SEmmanuel Vadot
7354d7675SEmmanuel Vadottitle: Rockchip RK3399 Clock and Reset Unit
8354d7675SEmmanuel Vadot
9354d7675SEmmanuel Vadotmaintainers:
10d5b0e70fSEmmanuel Vadot  - Elaine Zhang <zhangqing@rock-chips.com>
11354d7675SEmmanuel Vadot  - Heiko Stuebner <heiko@sntech.de>
12354d7675SEmmanuel Vadot
13354d7675SEmmanuel Vadotdescription: |
14354d7675SEmmanuel Vadot  The RK3399 clock controller generates and supplies clock to various
15354d7675SEmmanuel Vadot  controllers within the SoC and also implements a reset controller for SoC
16354d7675SEmmanuel Vadot  peripherals.
17354d7675SEmmanuel Vadot  Each clock is assigned an identifier and client nodes can use this identifier
18354d7675SEmmanuel Vadot  to specify the clock which they consume. All available clocks are defined as
19354d7675SEmmanuel Vadot  preprocessor macros in the dt-bindings/clock/rk3399-cru.h headers and can be
20354d7675SEmmanuel Vadot  used in device tree sources. Similar macros exist for the reset sources in
21354d7675SEmmanuel Vadot  these files.
22354d7675SEmmanuel Vadot  There are several clocks that are generated outside the SoC. It is expected
23354d7675SEmmanuel Vadot  that they are defined using standard clock bindings with following
24354d7675SEmmanuel Vadot  clock-output-names:
25354d7675SEmmanuel Vadot    - "xin24m"           - crystal input                          - required,
26354d7675SEmmanuel Vadot    - "xin32k"           - rtc clock                              - optional,
27354d7675SEmmanuel Vadot    - "clkin_gmac"       - external GMAC clock                    - optional,
28354d7675SEmmanuel Vadot    - "clkin_i2s"        - external I2S clock                     - optional,
29354d7675SEmmanuel Vadot    - "pclkin_cif"       - external ISP clock                     - optional,
30354d7675SEmmanuel Vadot    - "clk_usbphy0_480m" - output clock of the pll in the usbphy0
31354d7675SEmmanuel Vadot    - "clk_usbphy1_480m" - output clock of the pll in the usbphy1
32354d7675SEmmanuel Vadot
33354d7675SEmmanuel Vadotproperties:
34354d7675SEmmanuel Vadot  compatible:
35354d7675SEmmanuel Vadot    enum:
36354d7675SEmmanuel Vadot      - rockchip,rk3399-pmucru
37354d7675SEmmanuel Vadot      - rockchip,rk3399-cru
38354d7675SEmmanuel Vadot
39354d7675SEmmanuel Vadot  reg:
40354d7675SEmmanuel Vadot    maxItems: 1
41354d7675SEmmanuel Vadot
42354d7675SEmmanuel Vadot  "#clock-cells":
43354d7675SEmmanuel Vadot    const: 1
44354d7675SEmmanuel Vadot
45354d7675SEmmanuel Vadot  "#reset-cells":
46354d7675SEmmanuel Vadot    const: 1
47354d7675SEmmanuel Vadot
48354d7675SEmmanuel Vadot  clocks:
49d5b0e70fSEmmanuel Vadot    maxItems: 1
50354d7675SEmmanuel Vadot
51d5b0e70fSEmmanuel Vadot  clock-names:
52d5b0e70fSEmmanuel Vadot    const: xin24m
53354d7675SEmmanuel Vadot
54354d7675SEmmanuel Vadot  rockchip,grf:
55354d7675SEmmanuel Vadot    $ref: /schemas/types.yaml#/definitions/phandle
56d5b0e70fSEmmanuel Vadot    description:
57d5b0e70fSEmmanuel Vadot      Phandle to the syscon managing the "general register files". It is used
58354d7675SEmmanuel Vadot      for GRF muxes, if missing any muxes present in the GRF will not be
59354d7675SEmmanuel Vadot      available.
60354d7675SEmmanuel Vadot
61354d7675SEmmanuel Vadotrequired:
62354d7675SEmmanuel Vadot  - compatible
63354d7675SEmmanuel Vadot  - reg
64354d7675SEmmanuel Vadot  - "#clock-cells"
65354d7675SEmmanuel Vadot  - "#reset-cells"
66354d7675SEmmanuel Vadot
67354d7675SEmmanuel VadotadditionalProperties: false
68354d7675SEmmanuel Vadot
69354d7675SEmmanuel Vadotexamples:
70354d7675SEmmanuel Vadot  - |
71d5b0e70fSEmmanuel Vadot    pmucru: clock-controller@ff750000 {
72354d7675SEmmanuel Vadot      compatible = "rockchip,rk3399-pmucru";
73354d7675SEmmanuel Vadot      reg = <0xff750000 0x1000>;
74354d7675SEmmanuel Vadot      #clock-cells = <1>;
75354d7675SEmmanuel Vadot      #reset-cells = <1>;
76354d7675SEmmanuel Vadot    };
77354d7675SEmmanuel Vadot  - |
78354d7675SEmmanuel Vadot    cru: clock-controller@ff760000 {
79354d7675SEmmanuel Vadot      compatible = "rockchip,rk3399-cru";
80354d7675SEmmanuel Vadot      reg = <0xff760000 0x1000>;
81354d7675SEmmanuel Vadot      #clock-cells = <1>;
82354d7675SEmmanuel Vadot      #reset-cells = <1>;
83354d7675SEmmanuel Vadot    };
84