Message ID | 38e811816c37a2d52374fa04864654ff1e9b4dc8.1693474728.git.zhoubinbin@loongson.cn |
---|---|
State | Accepted |
Commit | 8c4102f20a968ef466ed6b63930a546f57966ca1 |
Headers | show |
Series | soc: loongson: Fix some issues about loongson_pm2 | expand |
On 01/09/2023 11:27, Binbin Zhou wrote: > Hi Krzysztof: > > > On Fri, Sep 1, 2023 at 5:06 PM Krzysztof Kozlowski > <krzysztof.kozlowski@linaro.org> wrote: >> >> On 31/08/2023 13:43, Binbin Zhou wrote: >>> required: >>> - compatible >>> - reg >>> @@ -54,4 +66,18 @@ examples: >>> interrupt-parent = <&liointc1>; >>> interrupts = <11 IRQ_TYPE_LEVEL_LOW>; >>> loongson,suspend-address = <0x0 0x1c000500>; >>> + >>> + syscon-reboot { >>> + compatible = "syscon-reboot"; >>> + offset = <0x30>; >>> + mask = <0x1>; >>> + }; >>> + >>> + syscon-poweroff { >>> + compatible = "syscon-poweroff"; >>> + regmap = <&pmc>; >> >> ??? > > I did notice that commit [1] changed "regmap" to "unrequired" for > "syscon-reboot", but "syscon-poweroff" did not do the same. > So, at least under the current "syscon-poweroff" rule, "regmap" is "required". > > https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/Documentation/devicetree/bindings/power/reset/syscon-poweroff.yaml?h=v6.5#n41 > > I had my doubts before, but seeing that some dts do have > "syscon-poweroff" as a separate node, I assumed there was a > difference. > > commit[1]: 2140d68d69d4 dt-bindings: power: reset: Unrequired regmap > property in syscon-reboot node > You are right. I wonder why Serge did not change others. Looks good, thanks for clarification. Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> 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 c45f5e7fc0e6..510f6cb0f084 100644 --- a/Documentation/devicetree/bindings/soc/loongson/loongson,ls2k-pmc.yaml +++ b/Documentation/devicetree/bindings/soc/loongson/loongson,ls2k-pmc.yaml @@ -37,6 +37,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 @@ -54,4 +66,18 @@ examples: interrupt-parent = <&liointc1>; interrupts = <11 IRQ_TYPE_LEVEL_LOW>; loongson,suspend-address = <0x0 0x1c000500>; + + syscon-reboot { + compatible = "syscon-reboot"; + 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 | 26 +++++++++++++++++++ 1 file changed, 26 insertions(+)