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