Linux Power Management development
 help / color / mirror / Atom feed
From: Conor Dooley <conor.dooley@microchip.com>
To: zhuyinbo <zhuyinbo@loongson.cn>
Cc: Rob Herring <robh+dt@kernel.org>,
	Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>,
	Conor Dooley <conor+dt@kernel.org>,
	Huacai Chen <chenhuacai@kernel.org>,
	WANG Xuerui <kernel@xen0n.name>,
	"Rafael J . Wysocki" <rafael@kernel.org>,
	Pavel Machek <pavel@ucw.cz>, Marc Zyngier <maz@kernel.org>,
	Arnd Bergmann <arnd@arndb.de>, <linux-pm@vger.kernel.org>,
	<devicetree@vger.kernel.org>, <linux-kernel@vger.kernel.org>,
	<loongarch@lists.linux.dev>, Jianmin Lv <lvjianmin@loongson.cn>,
	<wanghongliang@loongson.cn>, Liu Peibao <liupeibao@loongson.cn>,
	<loongson-kernel@lists.loongnix.cn>
Subject: Re: [PATCH v3 2/3] soc: dt-bindings: add loongson-2 pm
Date: Fri, 16 Jun 2023 09:03:12 +0100	[thread overview]
Message-ID: <20230616-tablet-isotope-94749a2f8336@wendy> (raw)
In-Reply-To: <9a53089a-3c87-13e1-0bc4-29058ac0ec54@loongson.cn>

[-- Attachment #1: Type: text/plain, Size: 4003 bytes --]

On Fri, Jun 16, 2023 at 03:53:38PM +0800, zhuyinbo wrote:
> 在 2023/6/16 下午2:58, Conor Dooley 写道:
> > 
> > Rob, could you take a look at this please? On v2 while you were away I
> > was kinda struggling w/ suspend-address & whether it made sense.
> > 
> > The v2 & v1 are here:
> > https://lore.kernel.org/all/20230522093156.7108-3-zhuyinbo@loongson.cn/
> > https://lore.kernel.org/all/20230517073149.31980-3-zhuyinbo@loongson.cn/
> > 
> > On Thu, Jun 15, 2023 at 05:17:56PM +0800, Yinbo Zhu wrote:
> > > 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       | 53 +++++++++++++++++++
> > >   MAINTAINERS                                   |  6 +++
> > >   2 files changed, 59 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..32499bd10f8c
> > > --- /dev/null
> > > +++ b/Documentation/devicetree/bindings/soc/loongson/loongson,ls2k-pmc.yaml
> > 
> > The filename should ideally match one of the compatibles.
> 
> 
> I learn about that yaml file name need match this compatible, but here
> using a specific compatible as the name of the yaml file seems a bit
> inappropriate . After all, this yaml file needs to cover lots of ls2k
> series SoC rather than a specific SoC, and the yaml file naming in
> kernel drivers is basically the same that use cover a series SoC's way.
> 
> > 
> > > @@ -0,0 +1,53 @@
> > > +# 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:
> > > +    oneOf:
> > > +      - items:
> > > +          - enum:
> > > +              - loongson,ls2k1000-pmc
> > > +              - loongson,ls2k0500-pmc
> > 
> > I notice the driver only supports one of these two. Is there a reason
> > for that?
> 
> 
> The driver can support both of the above, and I will add another.

The driver only contains
	static const struct of_device_id loongson2_pm_match[] = {
	       { .compatible = "loongson,ls2k1000-pmc", },
	       {},
	};
so it only supports the 2k1000 right now. Are the 2k1000 and 2k0500
compatible with eachother?

> > > +          - 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 {
> >         ^^^
> > 
> > nit: this label isn't used, so you can drop it.
> 
> 
> This lable need to be used by poweroff and reboot node but I don't add
> these node that reference pmc here.

Right, in the dts it might need those, but not in the example in the
binding.

Cheers,
Conor.


[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]

  reply	other threads:[~2023-06-16  8:03 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-06-15  9:17 [PATCH v3 0/3] soc: loongson2_pm: add power management support Yinbo Zhu
2023-06-15  9:17 ` [PATCH v3 1/3] loongarch: export some arch-specific pm interfaces Yinbo Zhu
2023-06-16  4:04   ` Huacai Chen
2023-06-16  6:06     ` zhuyinbo
2023-06-15  9:17 ` [PATCH v3 2/3] soc: dt-bindings: add loongson-2 pm Yinbo Zhu
2023-06-16  6:58   ` Conor Dooley
2023-06-16  7:53     ` zhuyinbo
2023-06-16  8:03       ` Conor Dooley [this message]
2023-06-16  8:47         ` zhuyinbo
2023-06-16  8:03   ` Krzysztof Kozlowski
2023-06-16  8:51     ` zhuyinbo
2023-06-16 15:17   ` Rob Herring
2023-06-17  1:57     ` zhuyinbo
2023-06-15  9:37 ` [PATCH v3 3/3] soc: loongson2_pm: add power management support zhuyinbo
2023-06-15 10:00   ` Huacai Chen
2023-06-15 11:15     ` zhuyinbo
2023-06-16  1:45       ` zhuyinbo
2023-06-16  1:54         ` Huacai Chen
2023-06-16  4:01           ` zhuyinbo
2023-06-16  6:52   ` Conor Dooley
2023-06-16  7:08     ` zhuyinbo

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20230616-tablet-isotope-94749a2f8336@wendy \
    --to=conor.dooley@microchip.com \
    --cc=arnd@arndb.de \
    --cc=chenhuacai@kernel.org \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=kernel@xen0n.name \
    --cc=krzysztof.kozlowski+dt@linaro.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=liupeibao@loongson.cn \
    --cc=loongarch@lists.linux.dev \
    --cc=loongson-kernel@lists.loongnix.cn \
    --cc=lvjianmin@loongson.cn \
    --cc=maz@kernel.org \
    --cc=pavel@ucw.cz \
    --cc=rafael@kernel.org \
    --cc=robh+dt@kernel.org \
    --cc=wanghongliang@loongson.cn \
    --cc=zhuyinbo@loongson.cn \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox