Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp2301764rwd; Fri, 16 Jun 2023 01:59:52 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ53+4i1LCBhSHKNgSwVNaZ0tVN1arR+d5nnKVun0gYRlRFrgd9mt+IxiedH3QvfMH1A0oz5 X-Received: by 2002:a05:6a00:2994:b0:662:9bf:7572 with SMTP id cj20-20020a056a00299400b0066209bf7572mr8404576pfb.0.1686905991994; Fri, 16 Jun 2023 01:59:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1686905991; cv=none; d=google.com; s=arc-20160816; b=B+gUnrD5tIPAKcYjG4t+DJ4xMn+nGld92mn/yRuxheB9VYZz45yOHcjk7GHkWZtX0L r13SaWTag+Ot23mtCBXIgWrigfgbPWHtHZr3uvnuQuaw7ueQpa03CU9vJYnfyI//1znF Jz/KDLnfBNIzIuZGsOARONmKrbzLfxMto3mhXx+a95YFA7DC/j2hOU83rYq6nK8JRAI0 yQ5wxRmX1SNUDIIG4FmUM2pgo2uxrVuQPuM56E/T681f/ha90PEtNto/rS+COXf1LxP/ xgp9xn8Inctr6B9p1ywBOgaGFolnY/2DEV/DhYHuta9MMqw6KbyZNKVRs2D8TR1fzhZl qh/A== 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=AQgPJmmPygnbabnd25qNPgUYzZ14sHJ/OGqW08emdyM=; b=FsUVj9bsAVv5TSBauGdwMfu5/pkmlKCIxgBc+WzqXZpLQ1cunyQyfJQx7fBxRYUAfB 2CjU9n90vmTFySPfF/8HdSUmGot+UCdZmkSS9+ySWgHjaV5u+p3e4yJlsk59iTBEXRDX vRb33cBGuucjwG9MR7wy4ELC+B/nZPJ2BnRtSDEJBboDA/GbLum8rf4nVa7KdIbaZV01 sTdOaMNv9jzEghJlsHBb0vky2CyMiDKtdBWVIXowitdK7W3jindJvBeGzD1MrLCDsXbs SndknJkaMc8zKw4B9GJ5goBFXa3RaI1i/OJyFatSb77L6QQ1r4RhAwPafnl7L+x10zs4 O4CQ== 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 c9-20020aa79529000000b00666ad4a7eabsi1972126pfp.213.2023.06.16.01.59.37; Fri, 16 Jun 2023 01:59:51 -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 S1343772AbjFPIro (ORCPT + 99 others); Fri, 16 Jun 2023 04:47:44 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44388 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1343764AbjFPIrk (ORCPT ); Fri, 16 Jun 2023 04:47:40 -0400 Received: from mail.loongson.cn (mail.loongson.cn [114.242.206.163]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 307ED30CF; Fri, 16 Jun 2023 01:47:33 -0700 (PDT) Received: from loongson.cn (unknown [10.20.42.35]) by gateway (Coremail) with SMTP id _____8DxSuqjIYxkOOgFAA--.12459S3; Fri, 16 Jun 2023 16:47:31 +0800 (CST) Received: from [10.20.42.35] (unknown [10.20.42.35]) by localhost.localdomain (Coremail) with SMTP id AQAAf8BxjcqgIYxk+REdAA--.8656S3; Fri, 16 Jun 2023 16:47:29 +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> <9a53089a-3c87-13e1-0bc4-29058ac0ec54@loongson.cn> <20230616-tablet-isotope-94749a2f8336@wendy> From: zhuyinbo Message-ID: <810c82f2-d7af-b7c4-ce35-ddd135ac1813@loongson.cn> Date: Fri, 16 Jun 2023 16:47:28 +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-tablet-isotope-94749a2f8336@wendy> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 8bit X-CM-TRANSID: AQAAf8BxjcqgIYxk+REdAA--.8656S3 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 下午4:03, Conor Dooley 写道: > 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 >>>> --- >>>> .../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. > > 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? They are not completely compatible, 2k500 may still require some work to be done, but I can confirm this driver was can compatible 2k0500 and 2k1000. for match yaml file, and I can add 2k0500 compatible in driver. > >>>> + - 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. > > Right, in the dts it might need those, but not in the example in the > binding. okay, I got it. Thanks, Yinbo