11590Srgrimes# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
21590Srgrimes%YAML 1.2
31590Srgrimes---
41590Srgrimes$id: http://devicetree.org/schemas/soc/loongson/loongson,ls2k-pmc.yaml#
51590Srgrimes$schema: http://devicetree.org/meta-schemas/core.yaml#
61590Srgrimes
71590Srgrimestitle: Loongson-2 Power Manager controller
81590Srgrimes
91590Srgrimesmaintainers:
101590Srgrimes  - Yinbo Zhu <zhuyinbo@loongson.cn>
111590Srgrimes
121590Srgrimesproperties:
131590Srgrimes  compatible:
141590Srgrimes    oneOf:
151590Srgrimes      - items:
161590Srgrimes          - const: loongson,ls2k0500-pmc
171590Srgrimes          - const: syscon
181590Srgrimes      - items:
191590Srgrimes          - enum:
201590Srgrimes              - loongson,ls2k1000-pmc
211590Srgrimes              - loongson,ls2k2000-pmc
221590Srgrimes          - const: loongson,ls2k0500-pmc
231590Srgrimes          - const: syscon
241590Srgrimes
251590Srgrimes  reg:
261590Srgrimes    maxItems: 1
271590Srgrimes
281590Srgrimes  interrupts:
291590Srgrimes    maxItems: 1
301590Srgrimes
311590Srgrimes  loongson,suspend-address:
321590Srgrimes    $ref: /schemas/types.yaml#/definitions/uint64
331590Srgrimes    description:
3487697Smarkm      The "loongson,suspend-address" is a deep sleep state (Suspend To
3587697Smarkm      RAM) firmware entry address which was jumped from kernel and it's
3687697Smarkm      value was dependent on specific platform firmware code. In
3787697Smarkm      addition, the PM need according to it to indicate that current
381590Srgrimes      SoC whether support Suspend To RAM.
3928456Scharnier
401590Srgrimes  syscon-poweroff:
411590Srgrimes    $ref: /schemas/power/reset/syscon-poweroff.yaml#
4287697Smarkm    type: object
431590Srgrimes    description:
441590Srgrimes      Node for power off method
4587697Smarkm
4628456Scharnier  syscon-reboot:
471590Srgrimes    $ref: /schemas/power/reset/syscon-reboot.yaml#
481590Srgrimes    type: object
491590Srgrimes    description:
501590Srgrimes      Node for reboot method
5198251Stjr
5228456Scharnierrequired:
5395304Stjr  - compatible
5498251Stjr  - reg
551590Srgrimes  - interrupts
5678717Sdd
57200462SdelphijadditionalProperties: false
5895304Stjr
59131054Stjrexamples:
60200462Sdelphij  - |
611590Srgrimes    #include <dt-bindings/interrupt-controller/irq.h>
621590Srgrimes
6395304Stjr    power-management@1fe27000 {
6495304Stjr        compatible = "loongson,ls2k1000-pmc", "loongson,ls2k0500-pmc", "syscon";
651590Srgrimes        reg = <0x1fe27000 0x58>;
6695304Stjr        interrupt-parent = <&liointc1>;
6792922Simp        interrupts = <11 IRQ_TYPE_LEVEL_LOW>;
68131054Stjr        loongson,suspend-address = <0x0 0x1c000500>;
6928456Scharnier
7028789Scharnier        syscon-reboot {
71102944Sdwmalone            compatible = "syscon-reboot";
721590Srgrimes            offset = <0x30>;
7395474Stjr            mask = <0x1>;
7495474Stjr        };
751590Srgrimes
7698251Stjr        syscon-poweroff {
7798251Stjr            compatible = "syscon-poweroff";
7895304Stjr            regmap = <&pmc>;
7995304Stjr            offset = <0x14>;
8095304Stjr            mask = <0x3c00>;
8195304Stjr            value = <0x3c00>;
8295304Stjr        };
8395304Stjr    };
8495304Stjr