xref: /linux/Documentation/devicetree/bindings/soc/loongson/loongson,ls2k-pmc.yaml (revision e7d759f31ca295d589f7420719c311870bb3166f)
1# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
2%YAML 1.2
3---
4$id: http://devicetree.org/schemas/soc/loongson/loongson,ls2k-pmc.yaml#
5$schema: http://devicetree.org/meta-schemas/core.yaml#
6
7title: Loongson-2 Power Manager controller
8
9maintainers:
10  - Yinbo Zhu <zhuyinbo@loongson.cn>
11
12properties:
13  compatible:
14    oneOf:
15      - items:
16          - const: loongson,ls2k0500-pmc
17          - const: syscon
18      - items:
19          - enum:
20              - loongson,ls2k1000-pmc
21              - loongson,ls2k2000-pmc
22          - const: loongson,ls2k0500-pmc
23          - const: syscon
24
25  reg:
26    maxItems: 1
27
28  interrupts:
29    maxItems: 1
30
31  loongson,suspend-address:
32    $ref: /schemas/types.yaml#/definitions/uint64
33    description:
34      The "loongson,suspend-address" is a deep sleep state (Suspend To
35      RAM) firmware entry address which was jumped from kernel and it's
36      value was dependent on specific platform firmware code. In
37      addition, the PM need according to it to indicate that current
38      SoC whether support Suspend To RAM.
39
40  syscon-poweroff:
41    $ref: /schemas/power/reset/syscon-poweroff.yaml#
42    type: object
43    description:
44      Node for power off method
45
46  syscon-reboot:
47    $ref: /schemas/power/reset/syscon-reboot.yaml#
48    type: object
49    description:
50      Node for reboot method
51
52required:
53  - compatible
54  - reg
55  - interrupts
56
57additionalProperties: false
58
59examples:
60  - |
61    #include <dt-bindings/interrupt-controller/irq.h>
62
63    power-management@1fe27000 {
64        compatible = "loongson,ls2k1000-pmc", "loongson,ls2k0500-pmc", "syscon";
65        reg = <0x1fe27000 0x58>;
66        interrupt-parent = <&liointc1>;
67        interrupts = <11 IRQ_TYPE_LEVEL_LOW>;
68        loongson,suspend-address = <0x0 0x1c000500>;
69
70        syscon-reboot {
71            compatible = "syscon-reboot";
72            offset = <0x30>;
73            mask = <0x1>;
74        };
75
76        syscon-poweroff {
77            compatible = "syscon-poweroff";
78            regmap = <&pmc>;
79            offset = <0x14>;
80            mask = <0x3c00>;
81            value = <0x3c00>;
82        };
83    };
84