xref: /linux/Documentation/devicetree/bindings/soc/loongson/loongson,ls2k-pmc.yaml (revision 0ea5c948cb64bab5bc7a5516774eb8536f05aa0d)
16054a676SYinbo Zhu# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
26054a676SYinbo Zhu%YAML 1.2
36054a676SYinbo Zhu---
46054a676SYinbo Zhu$id: http://devicetree.org/schemas/soc/loongson/loongson,ls2k-pmc.yaml#
56054a676SYinbo Zhu$schema: http://devicetree.org/meta-schemas/core.yaml#
66054a676SYinbo Zhu
76054a676SYinbo Zhutitle: Loongson-2 Power Manager controller
86054a676SYinbo Zhu
96054a676SYinbo Zhumaintainers:
106054a676SYinbo Zhu  - Yinbo Zhu <zhuyinbo@loongson.cn>
116054a676SYinbo Zhu
126054a676SYinbo Zhuproperties:
136054a676SYinbo Zhu  compatible:
14380054cbSBinbin Zhou    oneOf:
15380054cbSBinbin Zhou      - items:
16380054cbSBinbin Zhou          - const: loongson,ls2k0500-pmc
17380054cbSBinbin Zhou          - const: syscon
18380054cbSBinbin Zhou      - items:
196054a676SYinbo Zhu          - enum:
206054a676SYinbo Zhu              - loongson,ls2k1000-pmc
21380054cbSBinbin Zhou              - loongson,ls2k2000-pmc
22380054cbSBinbin Zhou          - const: loongson,ls2k0500-pmc
236054a676SYinbo Zhu          - const: syscon
246054a676SYinbo Zhu
256054a676SYinbo Zhu  reg:
266054a676SYinbo Zhu    maxItems: 1
276054a676SYinbo Zhu
286054a676SYinbo Zhu  interrupts:
296054a676SYinbo Zhu    maxItems: 1
306054a676SYinbo Zhu
316054a676SYinbo Zhu  loongson,suspend-address:
326054a676SYinbo Zhu    $ref: /schemas/types.yaml#/definitions/uint64
336054a676SYinbo Zhu    description:
346054a676SYinbo Zhu      The "loongson,suspend-address" is a deep sleep state (Suspend To
356054a676SYinbo Zhu      RAM) firmware entry address which was jumped from kernel and it's
366054a676SYinbo Zhu      value was dependent on specific platform firmware code. In
376054a676SYinbo Zhu      addition, the PM need according to it to indicate that current
386054a676SYinbo Zhu      SoC whether support Suspend To RAM.
396054a676SYinbo Zhu
40*8c4102f2SBinbin Zhou  syscon-poweroff:
41*8c4102f2SBinbin Zhou    $ref: /schemas/power/reset/syscon-poweroff.yaml#
42*8c4102f2SBinbin Zhou    type: object
43*8c4102f2SBinbin Zhou    description:
44*8c4102f2SBinbin Zhou      Node for power off method
45*8c4102f2SBinbin Zhou
46*8c4102f2SBinbin Zhou  syscon-reboot:
47*8c4102f2SBinbin Zhou    $ref: /schemas/power/reset/syscon-reboot.yaml#
48*8c4102f2SBinbin Zhou    type: object
49*8c4102f2SBinbin Zhou    description:
50*8c4102f2SBinbin Zhou      Node for reboot method
51*8c4102f2SBinbin Zhou
526054a676SYinbo Zhurequired:
536054a676SYinbo Zhu  - compatible
546054a676SYinbo Zhu  - reg
556054a676SYinbo Zhu  - interrupts
566054a676SYinbo Zhu
576054a676SYinbo ZhuadditionalProperties: false
586054a676SYinbo Zhu
596054a676SYinbo Zhuexamples:
606054a676SYinbo Zhu  - |
616054a676SYinbo Zhu    #include <dt-bindings/interrupt-controller/irq.h>
626054a676SYinbo Zhu
636054a676SYinbo Zhu    power-management@1fe27000 {
64380054cbSBinbin Zhou        compatible = "loongson,ls2k1000-pmc", "loongson,ls2k0500-pmc", "syscon";
656054a676SYinbo Zhu        reg = <0x1fe27000 0x58>;
666054a676SYinbo Zhu        interrupt-parent = <&liointc1>;
676054a676SYinbo Zhu        interrupts = <11 IRQ_TYPE_LEVEL_LOW>;
686054a676SYinbo Zhu        loongson,suspend-address = <0x0 0x1c000500>;
69*8c4102f2SBinbin Zhou
70*8c4102f2SBinbin Zhou        syscon-reboot {
71*8c4102f2SBinbin Zhou            compatible = "syscon-reboot";
72*8c4102f2SBinbin Zhou            offset = <0x30>;
73*8c4102f2SBinbin Zhou            mask = <0x1>;
74*8c4102f2SBinbin Zhou        };
75*8c4102f2SBinbin Zhou
76*8c4102f2SBinbin Zhou        syscon-poweroff {
77*8c4102f2SBinbin Zhou            compatible = "syscon-poweroff";
78*8c4102f2SBinbin Zhou            regmap = <&pmc>;
79*8c4102f2SBinbin Zhou            offset = <0x14>;
80*8c4102f2SBinbin Zhou            mask = <0x3c00>;
81*8c4102f2SBinbin Zhou            value = <0x3c00>;
82*8c4102f2SBinbin Zhou        };
836054a676SYinbo Zhu    };
84