Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp2272238rwd; Fri, 16 Jun 2023 01:25:38 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ6BzNxvMh4bKgVMd67Mof/Edr5Idx6wFv8Fm6KLiYBPEeoOXFyixqTdt/G67htecTDAAMsr X-Received: by 2002:a17:902:f688:b0:1ac:6b92:70c8 with SMTP id l8-20020a170902f68800b001ac6b9270c8mr1266019plg.48.1686903937742; Fri, 16 Jun 2023 01:25:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1686903937; cv=none; d=google.com; s=arc-20160816; b=c0hV/Z7RM4ApykDN9XiMIzGtkTgt1lxJ4I186ZFUctAM48unjQ7xTeFHIFdM7cAxsS bkun0no9X7M3SZnzUmFLpzxxmLapVgAmFW0cIltd2ExRtwa9gzEPaIEnVJF38lpKsiTK wHvLafTpYhqMTsXbSvfLdp/EcCY84lx6yT2ngMPbisKVnVXtT5bT4FJPgjfy8+7Nx1xo svihEA+tgv72y/rXV++wxAckzkRJYx1k4/LNZ0ewj8gc9loDHU6G/Xtb5XK3ZqWRBwhb bpKg/bvC+mf6s5MyrOKegi81TSq6UEvhe2RIdPmB6amjOjE84oPsg0bq1OHVTqkdw2pP Gl0A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:from:references :cc:to:subject; bh=xB8iA2Ty4MBUCj0ElblR21xD08bBwP0IYlDXM8OKyL0=; b=Ej7hr2JB7Ms/fX8rd3Pb1QAnj7hQybA5Jk0L9HzOgga3CblMLmcMWQ2+gO4qgQOxKM jSYk1X5QSSY1DaWX0UqriK8gU/mkZ597lPRed144sYSbwB+Q9GJNtLHm89r/ug1sa2Yx +YgvoJfZcCGQe9zYBaMTRz7Gh0n9S7EbW4uZ/CzgfjIlYs4EmUAxMgUWwhoMQaF3CZf7 BTDaCkQgGS2h3D9eeeUjfERywWYRdOoxj9QhcenFIc/K+Qxs5Ar5g/t8mDImf90zR3UT RQhercU5e4E8gkXwJevihS9lDnd+J6UgJx4M5q4pBPAm//VZjpZNty6gX3rI6p3sClJP TE+g== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id l2-20020a170902f68200b001b3be6856dasi915668plg.628.2023.06.16.01.25.25; Fri, 16 Jun 2023 01:25:37 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S241799AbjFPHxt (ORCPT + 99 others); Fri, 16 Jun 2023 03:53:49 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45558 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S241423AbjFPHxq (ORCPT ); Fri, 16 Jun 2023 03:53:46 -0400 Received: from mail.loongson.cn (mail.loongson.cn [114.242.206.163]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id AB17A2945; Fri, 16 Jun 2023 00:53:43 -0700 (PDT) Received: from loongson.cn (unknown [10.20.42.35]) by gateway (Coremail) with SMTP id _____8Dxh+kFFYxkC+QFAA--.10690S3; Fri, 16 Jun 2023 15:53:41 +0800 (CST) Received: from [10.20.42.35] (unknown [10.20.42.35]) by localhost.localdomain (Coremail) with SMTP id AQAAf8AxKeUCFYxkjAgdAA--.16252S3; Fri, 16 Jun 2023 15:53:38 +0800 (CST) Subject: Re: [PATCH v3 2/3] soc: dt-bindings: add loongson-2 pm To: Conor Dooley Cc: Rob Herring , Krzysztof Kozlowski , Conor Dooley , Huacai Chen , WANG Xuerui , "Rafael J . Wysocki" , Pavel Machek , Marc Zyngier , Arnd Bergmann , linux-pm@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, loongarch@lists.linux.dev, Jianmin Lv , wanghongliang@loongson.cn, Liu Peibao , loongson-kernel@lists.loongnix.cn, zhuyinbo@loongson.cn References: <20230615091757.24686-1-zhuyinbo@loongson.cn> <20230615091757.24686-3-zhuyinbo@loongson.cn> <20230616-entangled-cauterize-1cbde7401b91@wendy> From: zhuyinbo Message-ID: <9a53089a-3c87-13e1-0bc4-29058ac0ec54@loongson.cn> Date: Fri, 16 Jun 2023 15:53:38 +0800 User-Agent: Mozilla/5.0 (X11; Linux loongarch64; rv:68.0) Gecko/20100101 Thunderbird/68.7.0 MIME-Version: 1.0 In-Reply-To: <20230616-entangled-cauterize-1cbde7401b91@wendy> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 8bit X-CM-TRANSID: AQAAf8AxKeUCFYxkjAgdAA--.16252S3 X-CM-SenderInfo: 52kx5xhqerqz5rrqw2lrqou0/ X-Coremail-Antispam: 1Uk129KBjDUn29KB7ZKAUJUUUUU529EdanIXcx71UUUUU7KY7 ZEXasCq-sGcSsGvfJ3UbIjqfuFe4nvWSU5nxnvy29KBjDU0xBIdaVrnUUvcSsGvfC2Kfnx nUUI43ZEXa7xR_UUUUUUUUU== X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,NICE_REPLY_A, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 在 2023/6/16 下午2:58, Conor Dooley 写道: > Hey, > > 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 >> --- >> .../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 >> + >> +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. > >> + - 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 >> + >> + 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. Thanks, Yinbo