summaryrefslogtreecommitdiff
path: root/Documentation/devicetree/bindings/mfd/canaan,k210-sysctl.yaml
blob: e2046f07a40e58740ed65a80382f761478bad777 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/mfd/canaan,k210-sysctl.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#

title: Canaan Kendryte K210 System Controller

maintainers:
  - Damien Le Moal <damien.lemoal@wdc.com>

description:
  Canaan Inc. Kendryte K210 SoC system controller which provides a
  register map for controlling the clocks, reset signals and pin power
  domains of the SoC.

properties:
  compatible:
    items:
      - const: canaan,k210-sysctl
      - const: syscon
      - const: simple-mfd

  clocks:
    maxItems: 1
    description:
      System controller Advanced Power Bus (APB) interface clock source.

  clock-names:
    items:
      - const: pclk

  reg:
    maxItems: 1

  clock-controller:
    # Child node
    type: object
    $ref: "../clock/canaan,k210-clk.yaml"
    description:
      Clock controller for the SoC clocks. This child node definition
      should follow the bindings specified in
      Documentation/devicetree/bindings/clock/canaan,k210-clk.yaml.

  reset-controller:
    # Child node
    type: object
    $ref: "../reset/canaan,k210-rst.yaml"
    description:
      Reset controller for the SoC. This child node definition
      should follow the bindings specified in
      Documentation/devicetree/bindings/reset/canaan,k210-rst.yaml.

  syscon-reboot:
    # Child node
    type: object
    $ref: "../power/reset/syscon-reboot.yaml"
    description:
      Reboot method for the SoC. This child node definition
      should follow the bindings specified in
      Documentation/devicetree/bindings/power/reset/syscon-reboot.yaml.

required:
  - compatible
  - clocks
  - reg
  - clock-controller

additionalProperties: false

examples:
  - |
    #include <dt-bindings/clock/k210-clk.h>
    #include <dt-bindings/reset/k210-rst.h>

    clocks {
      in0: oscllator {
        compatible = "fixed-clock";
        #clock-cells = <0>;
        clock-frequency = <26000000>;
      };
    };

    sysctl: syscon@50440000 {
      compatible = "canaan,k210-sysctl",
                   "syscon", "simple-mfd";
      reg = <0x50440000 0x100>;
      clocks = <&sysclk K210_CLK_APB1>;
      clock-names = "pclk";

      sysclk: clock-controller {
        #clock-cells = <1>;
        compatible = "canaan,k210-clk";
        clocks = <&in0>;
      };

      sysrst: reset-controller {
        compatible = "canaan,k210-rst";
        #reset-cells = <1>;
      };

      reboot: syscon-reboot {
        compatible = "syscon-reboot";
        regmap = <&sysctl>;
        offset = <48>;
        mask = <1>;
        value = <1>;
      };
    };