xref: /linux/Documentation/devicetree/bindings/soc/spacemit/spacemit,k1-syscon.yaml (revision 115e74a29b530d121891238e9551c4bcdf7b04b5)
1# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
2%YAML 1.2
3---
4$id: http://devicetree.org/schemas/soc/spacemit/spacemit,k1-syscon.yaml#
5$schema: http://devicetree.org/meta-schemas/core.yaml#
6
7title: SpacemiT K1 SoC System Controller
8
9maintainers:
10  - Haylen Chu <heylenay@4d2.org>
11
12description:
13  System controllers found on SpacemiT K1 SoC, which are capable of
14  clock, reset and power-management functions.
15
16properties:
17  compatible:
18    enum:
19      - spacemit,k1-syscon-apbc
20      - spacemit,k1-syscon-apmu
21      - spacemit,k1-syscon-mpmu
22      - spacemit,k1-syscon-rcpu
23      - spacemit,k1-syscon-rcpu2
24      - spacemit,k1-syscon-apbc2
25
26  reg:
27    maxItems: 1
28
29  clocks:
30    maxItems: 4
31
32  clock-names:
33    items:
34      - const: osc
35      - const: vctcxo_1m
36      - const: vctcxo_3m
37      - const: vctcxo_24m
38
39  "#clock-cells":
40    const: 1
41    description:
42      See <dt-bindings/clock/spacemit,k1-syscon.h> for valid indices.
43
44  "#power-domain-cells":
45    const: 1
46
47  "#reset-cells":
48    const: 1
49
50required:
51  - compatible
52  - reg
53  - "#reset-cells"
54
55allOf:
56  - if:
57      properties:
58        compatible:
59          contains:
60            enum:
61              - spacemit,k1-syscon-apmu
62              - spacemit,k1-syscon-mpmu
63    then:
64      required:
65        - "#power-domain-cells"
66    else:
67      properties:
68        "#power-domain-cells": false
69  - if:
70      properties:
71        compatible:
72          contains:
73            enum:
74              - spacemit,k1-syscon-apbc
75              - spacemit,k1-syscon-apmu
76              - spacemit,k1-syscon-mpmu
77    then:
78      required:
79        - clocks
80        - clock-names
81        - "#clock-cells"
82
83additionalProperties: false
84
85examples:
86  - |
87    system-controller@d4050000 {
88        compatible = "spacemit,k1-syscon-mpmu";
89        reg = <0xd4050000 0x209c>;
90        clocks = <&osc>, <&vctcxo_1m>, <&vctcxo_3m>, <&vctcxo_24m>;
91        clock-names = "osc", "vctcxo_1m", "vctcxo_3m", "vctcxo_24m";
92        #clock-cells = <1>;
93        #power-domain-cells = <1>;
94        #reset-cells = <1>;
95    };
96