1*7ef62cebSEmmanuel Vadot# SPDX-License-Identifier: (GPL-2.0+ OR MIT) 2d5b0e70fSEmmanuel Vadot%YAML 1.2 3d5b0e70fSEmmanuel Vadot--- 4d5b0e70fSEmmanuel Vadot$id: http://devicetree.org/schemas/clock/rockchip,px30-cru.yaml# 5d5b0e70fSEmmanuel Vadot$schema: http://devicetree.org/meta-schemas/core.yaml# 6d5b0e70fSEmmanuel Vadot 7d5b0e70fSEmmanuel Vadottitle: Rockchip PX30 Clock and Reset Unit (CRU) 8d5b0e70fSEmmanuel Vadot 9d5b0e70fSEmmanuel Vadotmaintainers: 10d5b0e70fSEmmanuel Vadot - Elaine Zhang <zhangqing@rock-chips.com> 11d5b0e70fSEmmanuel Vadot - Heiko Stuebner <heiko@sntech.de> 12d5b0e70fSEmmanuel Vadot 13d5b0e70fSEmmanuel Vadotdescription: | 14d5b0e70fSEmmanuel Vadot The PX30 clock controller generates and supplies clocks to various 15d5b0e70fSEmmanuel Vadot controllers within the SoC and also implements a reset controller for SoC 16d5b0e70fSEmmanuel Vadot peripherals. 17d5b0e70fSEmmanuel Vadot Each clock is assigned an identifier and client nodes can use this identifier 18d5b0e70fSEmmanuel Vadot to specify the clock which they consume. All available clocks are defined as 19d5b0e70fSEmmanuel Vadot preprocessor macros in the dt-bindings/clock/px30-cru.h headers and can be 20d5b0e70fSEmmanuel Vadot used in device tree sources. Similar macros exist for the reset sources in 21d5b0e70fSEmmanuel Vadot these files. 22d5b0e70fSEmmanuel Vadot There are several clocks that are generated outside the SoC. It is expected 23d5b0e70fSEmmanuel Vadot that they are defined using standard clock bindings with following 24d5b0e70fSEmmanuel Vadot clock-output-names: 25d5b0e70fSEmmanuel Vadot - "xin24m" - crystal input - required 26d5b0e70fSEmmanuel Vadot - "xin32k" - rtc clock - optional 27d5b0e70fSEmmanuel Vadot - "i2sx_clkin" - external I2S clock - optional 28d5b0e70fSEmmanuel Vadot - "gmac_clkin" - external GMAC clock - optional 29d5b0e70fSEmmanuel Vadot 30d5b0e70fSEmmanuel Vadotproperties: 31d5b0e70fSEmmanuel Vadot compatible: 32d5b0e70fSEmmanuel Vadot enum: 33d5b0e70fSEmmanuel Vadot - rockchip,px30-cru 34d5b0e70fSEmmanuel Vadot - rockchip,px30-pmucru 35d5b0e70fSEmmanuel Vadot 36d5b0e70fSEmmanuel Vadot reg: 37d5b0e70fSEmmanuel Vadot maxItems: 1 38d5b0e70fSEmmanuel Vadot 39d5b0e70fSEmmanuel Vadot "#clock-cells": 40d5b0e70fSEmmanuel Vadot const: 1 41d5b0e70fSEmmanuel Vadot 42d5b0e70fSEmmanuel Vadot "#reset-cells": 43d5b0e70fSEmmanuel Vadot const: 1 44d5b0e70fSEmmanuel Vadot 45d5b0e70fSEmmanuel Vadot clocks: 46d5b0e70fSEmmanuel Vadot minItems: 1 47d5b0e70fSEmmanuel Vadot items: 48d5b0e70fSEmmanuel Vadot - description: Clock for both PMUCRU and CRU 49d5b0e70fSEmmanuel Vadot - description: Clock for CRU (sourced from PMUCRU) 50d5b0e70fSEmmanuel Vadot 51d5b0e70fSEmmanuel Vadot clock-names: 52d5b0e70fSEmmanuel Vadot minItems: 1 53d5b0e70fSEmmanuel Vadot items: 54d5b0e70fSEmmanuel Vadot - const: xin24m 55d5b0e70fSEmmanuel Vadot - const: gpll 56d5b0e70fSEmmanuel Vadot 57d5b0e70fSEmmanuel Vadot rockchip,grf: 58d5b0e70fSEmmanuel Vadot $ref: /schemas/types.yaml#/definitions/phandle 59d5b0e70fSEmmanuel Vadot description: 60d5b0e70fSEmmanuel Vadot Phandle to the syscon managing the "general register files" (GRF), 61d5b0e70fSEmmanuel Vadot if missing pll rates are not changeable, due to the missing pll 62d5b0e70fSEmmanuel Vadot lock status. 63d5b0e70fSEmmanuel Vadot 64d5b0e70fSEmmanuel Vadotrequired: 65d5b0e70fSEmmanuel Vadot - compatible 66d5b0e70fSEmmanuel Vadot - reg 67d5b0e70fSEmmanuel Vadot - clocks 68d5b0e70fSEmmanuel Vadot - clock-names 69d5b0e70fSEmmanuel Vadot - "#clock-cells" 70d5b0e70fSEmmanuel Vadot - "#reset-cells" 71d5b0e70fSEmmanuel Vadot 72d5b0e70fSEmmanuel VadotallOf: 73d5b0e70fSEmmanuel Vadot - if: 74d5b0e70fSEmmanuel Vadot properties: 75d5b0e70fSEmmanuel Vadot compatible: 76d5b0e70fSEmmanuel Vadot contains: 77d5b0e70fSEmmanuel Vadot const: rockchip,px30-cru 78d5b0e70fSEmmanuel Vadot 79d5b0e70fSEmmanuel Vadot then: 80d5b0e70fSEmmanuel Vadot properties: 81d5b0e70fSEmmanuel Vadot clocks: 82d5b0e70fSEmmanuel Vadot minItems: 2 83d5b0e70fSEmmanuel Vadot 84d5b0e70fSEmmanuel Vadot clock-names: 85d5b0e70fSEmmanuel Vadot minItems: 2 86d5b0e70fSEmmanuel Vadot 87d5b0e70fSEmmanuel Vadot else: 88d5b0e70fSEmmanuel Vadot properties: 89d5b0e70fSEmmanuel Vadot clocks: 90d5b0e70fSEmmanuel Vadot maxItems: 1 91d5b0e70fSEmmanuel Vadot 92d5b0e70fSEmmanuel Vadot clock-names: 93d5b0e70fSEmmanuel Vadot maxItems: 1 94d5b0e70fSEmmanuel Vadot 95d5b0e70fSEmmanuel VadotadditionalProperties: false 96d5b0e70fSEmmanuel Vadot 97d5b0e70fSEmmanuel Vadotexamples: 98d5b0e70fSEmmanuel Vadot - | 99d5b0e70fSEmmanuel Vadot #include <dt-bindings/clock/px30-cru.h> 100d5b0e70fSEmmanuel Vadot 101d5b0e70fSEmmanuel Vadot pmucru: clock-controller@ff2bc000 { 102d5b0e70fSEmmanuel Vadot compatible = "rockchip,px30-pmucru"; 103d5b0e70fSEmmanuel Vadot reg = <0xff2bc000 0x1000>; 104d5b0e70fSEmmanuel Vadot clocks = <&xin24m>; 105d5b0e70fSEmmanuel Vadot clock-names = "xin24m"; 106d5b0e70fSEmmanuel Vadot rockchip,grf = <&grf>; 107d5b0e70fSEmmanuel Vadot #clock-cells = <1>; 108d5b0e70fSEmmanuel Vadot #reset-cells = <1>; 109d5b0e70fSEmmanuel Vadot }; 110d5b0e70fSEmmanuel Vadot 111d5b0e70fSEmmanuel Vadot cru: clock-controller@ff2b0000 { 112d5b0e70fSEmmanuel Vadot compatible = "rockchip,px30-cru"; 113d5b0e70fSEmmanuel Vadot reg = <0xff2b0000 0x1000>; 114d5b0e70fSEmmanuel Vadot clocks = <&xin24m>, <&pmucru PLL_GPLL>; 115d5b0e70fSEmmanuel Vadot clock-names = "xin24m", "gpll"; 116d5b0e70fSEmmanuel Vadot rockchip,grf = <&grf>; 117d5b0e70fSEmmanuel Vadot #clock-cells = <1>; 118d5b0e70fSEmmanuel Vadot #reset-cells = <1>; 119d5b0e70fSEmmanuel Vadot }; 120