[v2,2/3] dt-bindings: soc: add loongson-2 pm
Commit Message
Add the Loongson-2 SoC Power Management Controller binding with DT
schema format using json-schema.
Signed-off-by: Yinbo Zhu <zhuyinbo@loongson.cn>
---
.../soc/loongson/loongson,ls2k-pmc.yaml | 51 +++++++++++++++++++
MAINTAINERS | 6 +++
2 files changed, 57 insertions(+)
create mode 100644 Documentation/devicetree/bindings/soc/loongson/loongson,ls2k-pmc.yaml
Comments
Hey!
On Mon, May 22, 2023 at 05:31:55PM +0800, Yinbo Zhu wrote:
> Add the Loongson-2 SoC Power Management Controller binding with DT
> schema format using json-schema.
Grabbing thread from lore.kernel.org/all/20230522093156.7108-3-zhuyinbo%40loongson.cn/t.mbox.gz
Checking for newer revisions
Grabbing search results from lore.kernel.org
Analyzing 3 messages in the thread
Checking attestation on all messages, may take a moment...
---
[PATCH v2 1/3] loongarch: export loongarch pm interface
+ Signed-off-by: Conor Dooley <conor.dooley@microchip.com>
[PATCH v2 2/3] dt-bindings: soc: add loongson-2 pm
+ Signed-off-by: Conor Dooley <conor.dooley@microchip.com>
ERROR: missing [3/3]!
---
Total patches: 2
---
WARNING: Thread incomplete!
Applying: loongarch: export loongarch pm interface
Applying: dt-bindings: soc: add loongson-2 pm
Looks like the user for these bindings got lost somewhere along the way?
Please make sure to keep a series threaded.
>
> Signed-off-by: Yinbo Zhu <zhuyinbo@loongson.cn>
> ---
> .../soc/loongson/loongson,ls2k-pmc.yaml | 51 +++++++++++++++++++
> MAINTAINERS | 6 +++
> 2 files changed, 57 insertions(+)
> create mode 100644 Documentation/devicetree/bindings/soc/loongson/loongson,ls2k-pmc.yaml
>
> diff --git a/Documentation/devicetree/bindings/soc/loongson/loongson,ls2k-pmc.yaml b/Documentation/devicetree/bindings/soc/loongson/loongson,ls2k-pmc.yaml
> new file mode 100644
> index 000000000000..ddad62889c60
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/soc/loongson/loongson,ls2k-pmc.yaml
> @@ -0,0 +1,51 @@
> +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/soc/loongson/loongson,ls2k-pmc.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: Loongson-2 Power Manager controller
> +
> +maintainers:
> + - Yinbo Zhu <zhuyinbo@loongson.cn>
> +
> +properties:
> + compatible:
> + items:
> + - enum:
> + - loongson,ls2k-pmc
> + - const: syscon
> +
> + reg:
> + maxItems: 1
> +
> + interrupts:
> + maxItems: 1
> +
> + suspend-address:
> + $ref: /schemas/types.yaml#/definitions/uint32
> + description:
> + The "suspend-address" is a deep sleep state (Suspend To RAM)
> + firmware entry address which was jumped from kernel and it's
> + value was dependent on specific platform firmware code. In
> + addition, the PM need according to it to indicate that current
> + SoC whether support Suspend To RAM.
I (still) think this property is rather odd, maybe I am just not really
understanding the property as it seems to be described partly in terms
of operating system behaviour rather than its actual function. "was
jumped from kernel" I don't get.
The whole setup here seems a bit odd, but that's for the loongson arch
folks reviewing the actual code to comment on!
Thanks,
Conor.
在 2023/5/22 下午8:47, Conor Dooley 写道:
> Hey!
>
> On Mon, May 22, 2023 at 05:31:55PM +0800, Yinbo Zhu wrote:
>> Add the Loongson-2 SoC Power Management Controller binding with DT
>> schema format using json-schema.
>
> Grabbing thread from lore.kernel.org/all/20230522093156.7108-3-zhuyinbo%40loongson.cn/t.mbox.gz
> Checking for newer revisions
> Grabbing search results from lore.kernel.org
> Analyzing 3 messages in the thread
> Checking attestation on all messages, may take a moment...
> ---
> [PATCH v2 1/3] loongarch: export loongarch pm interface
> + Signed-off-by: Conor Dooley <conor.dooley@microchip.com>
> [PATCH v2 2/3] dt-bindings: soc: add loongson-2 pm
> + Signed-off-by: Conor Dooley <conor.dooley@microchip.com>
> ERROR: missing [3/3]!
> ---
> Total patches: 2
> ---
> WARNING: Thread incomplete!
> Applying: loongarch: export loongarch pm interface
> Applying: dt-bindings: soc: add loongson-2 pm
>
> Looks like the user for these bindings got lost somewhere along the way?
> Please make sure to keep a series threaded.
okay, I got it. I will use a thread to send a series patch.
>
>>
>> Signed-off-by: Yinbo Zhu <zhuyinbo@loongson.cn>
>> ---
>> .../soc/loongson/loongson,ls2k-pmc.yaml | 51 +++++++++++++++++++
>> MAINTAINERS | 6 +++
>> 2 files changed, 57 insertions(+)
>> create mode 100644 Documentation/devicetree/bindings/soc/loongson/loongson,ls2k-pmc.yaml
>>
>> diff --git a/Documentation/devicetree/bindings/soc/loongson/loongson,ls2k-pmc.yaml b/Documentation/devicetree/bindings/soc/loongson/loongson,ls2k-pmc.yaml
>> new file mode 100644
>> index 000000000000..ddad62889c60
>> --- /dev/null
>> +++ b/Documentation/devicetree/bindings/soc/loongson/loongson,ls2k-pmc.yaml
>> @@ -0,0 +1,51 @@
>> +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
>> +%YAML 1.2
>> +---
>> +$id: http://devicetree.org/schemas/soc/loongson/loongson,ls2k-pmc.yaml#
>> +$schema: http://devicetree.org/meta-schemas/core.yaml#
>> +
>> +title: Loongson-2 Power Manager controller
>> +
>> +maintainers:
>> + - Yinbo Zhu <zhuyinbo@loongson.cn>
>> +
>> +properties:
>> + compatible:
>> + items:
>> + - enum:
>> + - loongson,ls2k-pmc
>> + - const: syscon
>> +
>> + reg:
>> + maxItems: 1
>> +
>> + interrupts:
>> + maxItems: 1
>> +
>> + suspend-address:
>> + $ref: /schemas/types.yaml#/definitions/uint32
>> + description:
>> + The "suspend-address" is a deep sleep state (Suspend To RAM)
>> + firmware entry address which was jumped from kernel and it's
>> + value was dependent on specific platform firmware code. In
>> + addition, the PM need according to it to indicate that current
>> + SoC whether support Suspend To RAM.
>
> I (still) think this property is rather odd, maybe I am just not really
> understanding the property as it seems to be described partly in terms
> of operating system behaviour rather than its actual function. "was
> jumped from kernel" I don't get.
The function Suspend-To-RAM include kernel logic and firmware logic and
if no define "suspend-address" that kernel will can't into firmware
after suspend to ram and the Suspend-To-RAM function will not be
finished in LoongArch.
>
> The whole setup here seems a bit odd, but that's for the loongson arch
> folks reviewing the actual code to comment on!
okay, I got it.
Thanks
Yinbo.
>
> Thanks,
> Conor.
>
new file mode 100644
@@ -0,0 +1,51 @@
+# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/soc/loongson/loongson,ls2k-pmc.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Loongson-2 Power Manager controller
+
+maintainers:
+ - Yinbo Zhu <zhuyinbo@loongson.cn>
+
+properties:
+ compatible:
+ items:
+ - enum:
+ - loongson,ls2k-pmc
+ - const: syscon
+
+ reg:
+ maxItems: 1
+
+ interrupts:
+ maxItems: 1
+
+ suspend-address:
+ $ref: /schemas/types.yaml#/definitions/uint32
+ description:
+ The "suspend-address" is a deep sleep state (Suspend To RAM)
+ firmware entry address which was jumped from kernel and it's
+ value was dependent on specific platform firmware code. In
+ addition, the PM need according to it to indicate that current
+ SoC whether support Suspend To RAM.
+
+required:
+ - compatible
+ - reg
+ - interrupts
+
+additionalProperties: false
+
+examples:
+ - |
+ #include <dt-bindings/interrupt-controller/irq.h>
+
+ pmc: pm@1fe27000 {
+ compatible = "loongson,ls2k-pmc", "syscon";
+ reg = <0x1fe27000 0x58>;
+ interrupt-parent = <&liointc1>;
+ interrupts = <11 IRQ_TYPE_LEVEL_LOW>;
+ suspend-address = <0x1c000500>;
+ };
@@ -12190,6 +12190,12 @@ S: Maintained
F: Documentation/devicetree/bindings/hwinfo/loongson,ls2k-chipid.yaml
F: drivers/soc/loongson/loongson2_guts.c
+LOONGSON-2 SOC SERIES PM DRIVER
+M: Yinbo Zhu <zhuyinbo@loongson.cn>
+L: linux-pm@vger.kernel.org
+S: Maintained
+F: Documentation/devicetree/bindings/soc/loongson/loongson,ls2k-pmc.yaml
+
LOONGSON-2 SOC SERIES PINCTRL DRIVER
M: zhanghongchen <zhanghongchen@loongson.cn>
M: Yinbo Zhu <zhuyinbo@loongson.cn>