Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp2273639rwd; Fri, 16 Jun 2023 01:27:17 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ5fMahcvFTJSI8Opj6eNsJ686/5VRBIBrugm0oX1fygqIdUiUWMJrlGlnF3GD2mVd19aT6o X-Received: by 2002:a05:6a20:7f99:b0:10e:d4fb:b031 with SMTP id d25-20020a056a207f9900b0010ed4fbb031mr1489229pzj.61.1686904037001; Fri, 16 Jun 2023 01:27:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1686904036; cv=none; d=google.com; s=arc-20160816; b=m2AQaJp/jz3BUofTVEFO9TTIrCKpRZ4p/yMNpBIG9Zb6WrctI6zN3gsYeQp15so7qe DxR7TkmHNll0sXrTVD1DFcLZxh1oozQtf0kJbq9oxO61pWL2xUfUrYrd3rC930hRu5Iv mnqQcKAwE/LB/MECjbX7jmeXZRO0YTG4AFY8EIuPTfx6fdVnsmSF9vKAJIFkVPUw2aR1 eZnndgrZpGhZ5ecrH/Tf5RdHjHtEPBHRMsNuPZG9Sf9fIqlFKYHYzn/3KRy+5WhZrz0q d7mANynhvE7pPABsUmRSwOsp8PU0SOHVAzntbAfe00q3Dmuf6wmGTOYRI6khuDcWCkio UDJg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=g/klgmTPa3gQYenltW3QtgKAMjMuWS2MVkPjedmMz1g=; b=mFpuNQsNeXz4s0TAYOgqVpKhDVqVHwEhtpO6IptU7QS7DBP91+0THuYVSgD+HmYzVI atTCRr4ZFpyf2hk4f0n7kB/21MYXZ7GLlD4q0tnqApMQTXhxrdDpdZaS58Ic8r7PV9V2 qOZSPL1KJtcScbLVX+3wmnfcA0+ahnovnpS6iXCixZcN1gBHusR7eZ2kB8A4J78fPfaJ bUYJ/0vn/jdJh7p6TexNC6nUGx3R9K4Ly8NMR0ONaVd8fC3b+FE/aGnE60EDiYkO+rCw Gwi7mCzV9wRfGvVWfwzrmDdCytUCs012t46uSXTYSnf6CLP44SCIsbo4cL/cIRFbjsrG 7yig== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@microchip.com header.s=mchp header.b=vRB0VwWf; 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; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=microchip.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id c9-20020a170903234900b001a64b603189si7952229plh.100.2023.06.16.01.27.04; Fri, 16 Jun 2023 01:27:16 -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; dkim=pass header.i=@microchip.com header.s=mchp header.b=vRB0VwWf; 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; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=microchip.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S244839AbjFPID4 (ORCPT + 99 others); Fri, 16 Jun 2023 04:03:56 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48892 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S244639AbjFPIDv (ORCPT ); Fri, 16 Jun 2023 04:03:51 -0400 Received: from esa.microchip.iphmx.com (esa.microchip.iphmx.com [68.232.154.123]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2FE132D68; Fri, 16 Jun 2023 01:03:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=microchip.com; i=@microchip.com; q=dns/txt; s=mchp; t=1686902627; x=1718438627; h=date:from:to:cc:subject:message-id:references: mime-version:in-reply-to; bh=eTVc3XGM10yYGWejxI4OFNYMqxF1WUL6v6oHQydkLQ0=; b=vRB0VwWfycZiz9HD5aiHXiSQZHY4NT46r8jvUEB4bfkoYkKbcTSy2wp7 J+hWOOILHue6XVOXSNY86unrj9JjCMNottwWn5tTw1f12fZRV+fb5PEW2 wHy99pnLY+krAXL2jhpdGWO5uVU/vPJ+6+MklQocK+VGB8RfN0zNo8cAv 0e+kt0mnZx3tyjMn+In2tCJNDBPgCdTaBGYn0ljl1ob2P1WG0BYiabZJz WnIhI2CoqYiYxGYbqunU5Q7zri1WhBflj4nBvFKtBq+2vpOshYESni2A/ maQdvmeBLplBxsrWTngkan77XWtD0YkNUT4NkaCJdkq07au1MV/8OvUWY g==; X-IronPort-AV: E=Sophos;i="6.00,247,1681196400"; d="asc'?scan'208";a="220566949" X-Amp-Result: UNKNOWN X-Amp-Original-Verdict: FILE UNKNOWN Received: from unknown (HELO email.microchip.com) ([170.129.1.10]) by esa2.microchip.iphmx.com with ESMTP/TLS/AES256-SHA256; 16 Jun 2023 01:03:41 -0700 Received: from chn-vm-ex03.mchp-main.com (10.10.85.151) by chn-vm-ex03.mchp-main.com (10.10.85.151) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.21; Fri, 16 Jun 2023 01:03:41 -0700 Received: from wendy (10.10.115.15) by chn-vm-ex03.mchp-main.com (10.10.85.151) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.21 via Frontend Transport; Fri, 16 Jun 2023 01:03:38 -0700 Date: Fri, 16 Jun 2023 09:03:12 +0100 From: Conor Dooley To: zhuyinbo CC: Rob Herring , Krzysztof Kozlowski , Conor Dooley , Huacai Chen , WANG Xuerui , "Rafael J . Wysocki" , Pavel Machek , Marc Zyngier , Arnd Bergmann , , , , , Jianmin Lv , , Liu Peibao , Subject: Re: [PATCH v3 2/3] soc: dt-bindings: add loongson-2 pm Message-ID: <20230616-tablet-isotope-94749a2f8336@wendy> 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> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="7zoj86TvI4ME9JFK" Content-Disposition: inline In-Reply-To: <9a53089a-3c87-13e1-0bc4-29058ac0ec54@loongson.cn> X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED, SPF_HELO_PASS,SPF_NONE,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 --7zoj86TvI4ME9JFK Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Fri, Jun 16, 2023 at 03:53:38PM +0800, zhuyinbo wrote: > =E5=9C=A8 2023/6/16 =E4=B8=8B=E5=8D=882:58, Conor Dooley =E5=86=99=E9=81= =93: > >=20 > > 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. > >=20 > > 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/ > >=20 > > 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. > > >=20 > > > 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/l= oongson,ls2k-pmc.yaml > > >=20 > > > diff --git a/Documentation/devicetree/bindings/soc/loongson/loongson,= ls2k-pmc.yaml b/Documentation/devicetree/bindings/soc/loongson/loongson,ls2= k-pmc.yaml > > > new file mode 100644 > > > index 000000000000..32499bd10f8c > > > --- /dev/null > > > +++ b/Documentation/devicetree/bindings/soc/loongson/loongson,ls2k-pm= c.yaml > >=20 > > The filename should ideally match one of the compatibles. >=20 >=20 > 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. >=20 > >=20 > > > @@ -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.ya= ml# > > > +$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 > >=20 > > I notice the driver only supports one of these two. Is there a reason > > for that? >=20 >=20 > 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[] =3D { { .compatible =3D "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 > > > + > > > + pmc: pm@1fe27000 { > > ^^^ > >=20 > > nit: this label isn't used, so you can drop it. >=20 >=20 > 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. --7zoj86TvI4ME9JFK Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iHUEABYIAB0WIQRh246EGq/8RLhDjO14tDGHoIJi0gUCZIwXQAAKCRB4tDGHoIJi 0hnNAQDgnHCPOhtgmUu8ZJOMwWCm+4EnosPKCPUNqu5+XfCavgEA/3SbSK6yfJke g2TIjSEMSVzsRSZR2bsJPYuDAarvaAk= =kgbC -----END PGP SIGNATURE----- --7zoj86TvI4ME9JFK--