Message ID | 2bec39b1001732de60c1521d78e44a45ff94d6b6.1693218539.git.zhoubinbin@loongson.cn |
---|---|
State | New |
Headers | show |
Series | soc: loongson: Fix some issues about loongson_pm2 | expand |
Hi Krzysztof: Thanks for your reply. On Tue, Aug 29, 2023 at 1:17 AM Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> wrote: > > On 28/08/2023 14:38, Binbin Zhou wrote: > > The reboot and poweroff features are actually part of the Power > > Management Unit system controller, thus allow them as its children, > > instead of specifying as separate device nodes with syscon phandle. > > > > > required: > > - compatible > > - reg > > @@ -44,10 +56,25 @@ examples: > > - | > > #include <dt-bindings/interrupt-controller/irq.h> > > > > - power-management@1fe27000 { > > + pmc: power-management@1fe27000 { > > Drop the label. OK... > > > compatible = "loongson,ls2k1000-pmc", "syscon"; > > reg = <0x1fe27000 0x58>; > > interrupt-parent = <&liointc1>; > > interrupts = <11 IRQ_TYPE_LEVEL_LOW>; > > loongson,suspend-address = <0x0 0x1c000500>; > > + > > + syscon-reboot { > > + compatible ="syscon-reboot"; > > + regmap = <&pmc>; > > No, why? It does not make much sense and is deprecated. Oh, sorry, I should have been more careful, I'll delete it. > > > + offset = <0x30>; > > + mask = <0x1>; > > + }; > > + > > + syscon-poweroff { > > + compatible ="syscon-poweroff"; > > Missing space. I will fix it. Thanks. Binbin > > Best regards, > Krzysztof >
diff --git a/Documentation/devicetree/bindings/soc/loongson/loongson,ls2k-pmc.yaml b/Documentation/devicetree/bindings/soc/loongson/loongson,ls2k-pmc.yaml index 7473c5659929..f9e72b43d10c 100644 --- a/Documentation/devicetree/bindings/soc/loongson/loongson,ls2k-pmc.yaml +++ b/Documentation/devicetree/bindings/soc/loongson/loongson,ls2k-pmc.yaml @@ -33,6 +33,18 @@ properties: addition, the PM need according to it to indicate that current SoC whether support Suspend To RAM. + syscon-poweroff: + $ref: /schemas/power/reset/syscon-poweroff.yaml# + type: object + description: + Node for power off method + + syscon-reboot: + $ref: /schemas/power/reset/syscon-reboot.yaml# + type: object + description: + Node for reboot method + required: - compatible - reg @@ -44,10 +56,25 @@ examples: - | #include <dt-bindings/interrupt-controller/irq.h> - power-management@1fe27000 { + pmc: power-management@1fe27000 { compatible = "loongson,ls2k1000-pmc", "syscon"; reg = <0x1fe27000 0x58>; interrupt-parent = <&liointc1>; interrupts = <11 IRQ_TYPE_LEVEL_LOW>; loongson,suspend-address = <0x0 0x1c000500>; + + syscon-reboot { + compatible ="syscon-reboot"; + regmap = <&pmc>; + offset = <0x30>; + mask = <0x1>; + }; + + syscon-poweroff { + compatible ="syscon-poweroff"; + regmap = <&pmc>; + offset = <0x14>; + mask = <0x3c00>; + value = <0x3c00>; + }; };
The reboot and poweroff features are actually part of the Power Management Unit system controller, thus allow them as its children, instead of specifying as separate device nodes with syscon phandle. Without it, the reboot/poweroff feature becomes unavailable. Signed-off-by: Binbin Zhou <zhoubinbin@loongson.cn> --- .../soc/loongson/loongson,ls2k-pmc.yaml | 29 ++++++++++++++++++- 1 file changed, 28 insertions(+), 1 deletion(-)