Message ID | 20230411064743.273388-2-changhuang.liang@starfivetech.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp2371511vqo; Mon, 10 Apr 2023 23:50:07 -0700 (PDT) X-Google-Smtp-Source: AKy350Zvj0LdFHXzGY8NWQaMbKPp9w3epHpxDcbYwVDh97HBUXCPwE2RyIjwzrgDmPmFuMhPZJ7c X-Received: by 2002:a17:906:6a29:b0:90b:167e:304b with SMTP id qw41-20020a1709066a2900b0090b167e304bmr12099780ejc.45.1681195807087; Mon, 10 Apr 2023 23:50:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1681195807; cv=none; d=google.com; s=arc-20160816; b=YT3+PCsTR9jH77wqgGfkHyDjcr5Vxgl47AJNpfrfRzC0lMd2uvY3ZtJaDdJZg4kuq+ T0We4ZcHuTJ1C9+xBuJ9UDeIHcp5IuFBnO37AjLtziWO3PJx/G2LPXr8/CAW5i8s0WNL Ae+yc12nNad0lISsngD0FQ1PGPofDv6ImqlyZBmAmQMll/IcOt+gzC34Kyy7Zczr+uok bG9xdIEp0CbQfO6mkNmMcHfqVuOD512TCrZf2xdI5UJ3Gi65Lg7mV6aHHATrpZVY5UxB oy1ZAYKK1xnTAWLBICaKUZF4dWiod7VX3CKRxT1aPYZH7pXjR0Y8xS3yikR5j48jbd7x fkQg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=i50uyxEjSrAfncLKioCUJM+Rz6NRlKUQo0K7WnMxHg4=; b=iWsC4PTbgVR/bkNr67Su3VYnaToebNt22o/mqtyLe6rOaBy+1lsbvWsztQ6D7XEgH/ AZNQqY/s4wBs3hKKuaNuueqLl165WMU4Lmt4YIf32YKoxEpA4R55B3J8CYrH22gVybRj r98EQ7Ik1G0tr6kE3IzFJZ8w6NS/8E86rxS41Evvc0apgv9TI6AFsWa0BrPHOFHK0kwI CfXFr8sDYU+bvZ1+yUU8FTJp1/eSWvNX3YDD/OUXpF4tcoq72EvP64l2YmFX0DpMhnk5 pJe8Nfqr7FUBh5gxNjXH174malb7k0IMyUXgj7MSTLvEutpkP0SelqabG9TR5wTAQt8f 2CMw== 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 Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id se25-20020a170906ce5900b0093549a153f9si10063169ejb.912.2023.04.10.23.49.43; Mon, 10 Apr 2023 23:50:07 -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 S230168AbjDKGsI convert rfc822-to-8bit (ORCPT <rfc822;yuanzuo1009@gmail.com> + 99 others); Tue, 11 Apr 2023 02:48:08 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58664 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230222AbjDKGry (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Tue, 11 Apr 2023 02:47:54 -0400 Received: from fd01.gateway.ufhost.com (fd01.gateway.ufhost.com [61.152.239.71]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C26F72D70; Mon, 10 Apr 2023 23:47:47 -0700 (PDT) Received: from EXMBX166.cuchost.com (unknown [175.102.18.54]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client CN "EXMBX166", Issuer "EXMBX166" (not verified)) by fd01.gateway.ufhost.com (Postfix) with ESMTP id BF0FC24DB89; Tue, 11 Apr 2023 14:47:45 +0800 (CST) Received: from EXMBX162.cuchost.com (172.16.6.72) by EXMBX166.cuchost.com (172.16.6.76) with Microsoft SMTP Server (TLS) id 15.0.1497.42; Tue, 11 Apr 2023 14:47:45 +0800 Received: from ubuntu.localdomain (113.72.145.176) by EXMBX162.cuchost.com (172.16.6.72) with Microsoft SMTP Server (TLS) id 15.0.1497.42; Tue, 11 Apr 2023 14:47:44 +0800 From: Changhuang Liang <changhuang.liang@starfivetech.com> To: Rob Herring <robh+dt@kernel.org>, Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>, Emil Renner Berthing <kernel@esmil.dk>, Conor Dooley <conor@kernel.org>, Paul Walmsley <paul.walmsley@sifive.com>, Palmer Dabbelt <palmer@dabbelt.com>, Albert Ou <aou@eecs.berkeley.edu> CC: Walker Chen <walker.chen@starfivetech.com>, Changhuang Liang <changhuang.liang@starfivetech.com>, <devicetree@vger.kernel.org>, <linux-kernel@vger.kernel.org>, <linux-riscv@lists.infradead.org> Subject: [PATCH v1 1/7] dt-bindings: power: Constrain properties for JH7110 PMU Date: Mon, 10 Apr 2023 23:47:37 -0700 Message-ID: <20230411064743.273388-2-changhuang.liang@starfivetech.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20230411064743.273388-1-changhuang.liang@starfivetech.com> References: <20230411064743.273388-1-changhuang.liang@starfivetech.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [113.72.145.176] X-ClientProxiedBy: EXCAS064.cuchost.com (172.16.6.24) To EXMBX162.cuchost.com (172.16.6.72) X-YovoleRuleAgent: yovoleflag Content-Transfer-Encoding: 8BIT X-Spam-Status: No, score=-0.0 required=5.0 tests=RCVD_IN_MSPIKE_H2, SPF_HELO_PASS,SPF_PASS autolearn=unavailable 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: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1762861574374480993?= X-GMAIL-MSGID: =?utf-8?q?1762861574374480993?= |
Series |
Add JH7110 DPHY PMU support
|
|
Commit Message
Changhuang Liang
April 11, 2023, 6:47 a.m. UTC
When use "starfive,jh7110-pmu-dphy" compatible, do not need the reg and
interrupts properties.
Signed-off-by: Changhuang Liang <changhuang.liang@starfivetech.com>
---
.../bindings/power/starfive,jh7110-pmu.yaml | 14 ++++++++++++--
include/dt-bindings/power/starfive,jh7110-pmu.h | 3 +++
2 files changed, 15 insertions(+), 2 deletions(-)
Comments
On Mon, Apr 10, 2023 at 11:47:37PM -0700, Changhuang Liang wrote: > When use "starfive,jh7110-pmu-dphy" compatible, do not need the reg and > interrupts properties. Please write a commit message explaining why this is needed. The commit message as-is is insufficient, but also IMO wrong incorrect. I think it would more accurately be "...: add jh7110 dphy pmu support" or similar & the body should explain why this particular PMU has no reg/interrupts. Cheers, Conor. > > Signed-off-by: Changhuang Liang <changhuang.liang@starfivetech.com> > --- > .../bindings/power/starfive,jh7110-pmu.yaml | 14 ++++++++++++-- > include/dt-bindings/power/starfive,jh7110-pmu.h | 3 +++ > 2 files changed, 15 insertions(+), 2 deletions(-) > > diff --git a/Documentation/devicetree/bindings/power/starfive,jh7110-pmu.yaml b/Documentation/devicetree/bindings/power/starfive,jh7110-pmu.yaml > index 98eb8b4110e7..ffb4406c2e56 100644 > --- a/Documentation/devicetree/bindings/power/starfive,jh7110-pmu.yaml > +++ b/Documentation/devicetree/bindings/power/starfive,jh7110-pmu.yaml > @@ -8,6 +8,7 @@ title: StarFive JH7110 Power Management Unit > > maintainers: > - Walker Chen <walker.chen@starfivetech.com> > + - Changhuang Liang <changhuang.liang@starfivetech.com> > > description: | > StarFive JH7110 SoC includes support for multiple power domains which can be > @@ -17,6 +18,7 @@ properties: > compatible: > enum: > - starfive,jh7110-pmu > + - starfive,jh7110-pmu-dphy > > reg: > maxItems: 1 > @@ -29,10 +31,18 @@ properties: > > required: > - compatible > - - reg > - - interrupts > - "#power-domain-cells" > > +if: > + properties: > + compatible: > + contains: > + const: starfive,jh7110-pmu > +then: > + required: > + - reg > + - interrupts > + > additionalProperties: false > > examples: > diff --git a/include/dt-bindings/power/starfive,jh7110-pmu.h b/include/dt-bindings/power/starfive,jh7110-pmu.h > index 132bfe401fc8..0bfd6700c144 100644 > --- a/include/dt-bindings/power/starfive,jh7110-pmu.h > +++ b/include/dt-bindings/power/starfive,jh7110-pmu.h > @@ -14,4 +14,7 @@ > #define JH7110_PD_ISP 5 > #define JH7110_PD_VENC 6 > > +#define JH7110_PD_DPHY_TX 0 > +#define JH7110_PD_DPHY_RX 1 > + > #endif > -- > 2.25.1 >
On 2023/4/12 4:13, Conor Dooley wrote: > On Mon, Apr 10, 2023 at 11:47:37PM -0700, Changhuang Liang wrote: >> When use "starfive,jh7110-pmu-dphy" compatible, do not need the reg and >> interrupts properties. > > Please write a commit message explaining why this is needed. > The commit message as-is is insufficient, but also IMO wrong incorrect. > I think it would more accurately be "...: add jh7110 dphy pmu support" or > similar & the body should explain why this particular PMU has no > reg/interrupts. > > Cheers, > Conor. > OK, Thanks for your comments, I will reorganize the commit message more clarity. >> >> Signed-off-by: Changhuang Liang <changhuang.liang@starfivetech.com> >> --- >> .../bindings/power/starfive,jh7110-pmu.yaml | 14 ++++++++++++-- >> include/dt-bindings/power/starfive,jh7110-pmu.h | 3 +++ [...] >>
On 11/04/2023 08:47, Changhuang Liang wrote: > When use "starfive,jh7110-pmu-dphy" compatible, do not need the reg and > interrupts properties. > > Signed-off-by: Changhuang Liang <changhuang.liang@starfivetech.com> > --- > .../bindings/power/starfive,jh7110-pmu.yaml | 14 ++++++++++++-- > include/dt-bindings/power/starfive,jh7110-pmu.h | 3 +++ > 2 files changed, 15 insertions(+), 2 deletions(-) > > diff --git a/Documentation/devicetree/bindings/power/starfive,jh7110-pmu.yaml b/Documentation/devicetree/bindings/power/starfive,jh7110-pmu.yaml > index 98eb8b4110e7..ffb4406c2e56 100644 > --- a/Documentation/devicetree/bindings/power/starfive,jh7110-pmu.yaml > +++ b/Documentation/devicetree/bindings/power/starfive,jh7110-pmu.yaml > @@ -8,6 +8,7 @@ title: StarFive JH7110 Power Management Unit > > maintainers: > - Walker Chen <walker.chen@starfivetech.com> > + - Changhuang Liang <changhuang.liang@starfivetech.com> > > description: | > StarFive JH7110 SoC includes support for multiple power domains which can be > @@ -17,6 +18,7 @@ properties: > compatible: > enum: > - starfive,jh7110-pmu > + - starfive,jh7110-pmu-dphy You do here much more than commit msg says. Isn'y DPHY a phy? Why is it in power? > > reg: > maxItems: 1 > @@ -29,10 +31,18 @@ properties: > > required: > - compatible > - - reg > - - interrupts > - "#power-domain-cells" > > +if: Put it under allOf (in this place). Will save you one re-indentation later. > + properties: > + compatible: > + contains: > + const: starfive,jh7110-pmu > +then: > + required: > + - reg > + - interrupts > + > additionalProperties: false > > examples: > diff --git a/include/dt-bindings/power/starfive,jh7110-pmu.h b/include/dt-bindings/power/starfive,jh7110-pmu.h > index 132bfe401fc8..0bfd6700c144 100644 > --- a/include/dt-bindings/power/starfive,jh7110-pmu.h > +++ b/include/dt-bindings/power/starfive,jh7110-pmu.h > @@ -14,4 +14,7 @@ > #define JH7110_PD_ISP 5 > #define JH7110_PD_VENC 6 > > +#define JH7110_PD_DPHY_TX 0 > +#define JH7110_PD_DPHY_RX 1 > + > #endif Best regards, Krzysztof
On 2023/4/12 16:35, Krzysztof Kozlowski wrote: > On 11/04/2023 08:47, Changhuang Liang wrote: >> When use "starfive,jh7110-pmu-dphy" compatible, do not need the reg and >> interrupts properties. [...] >> >> description: | >> StarFive JH7110 SoC includes support for multiple power domains which can be >> @@ -17,6 +18,7 @@ properties: >> compatible: >> enum: >> - starfive,jh7110-pmu >> + - starfive,jh7110-pmu-dphy > > You do here much more than commit msg says. > > Isn'y DPHY a phy? Why is it in power? > OK, I will add more description. This is a power framework used to turn on/off DPHY. So it in power, not a phy. >> >> reg: >> maxItems: 1 >> @@ -29,10 +31,18 @@ properties: >> >> required: >> - compatible >> - - reg >> - - interrupts >> - "#power-domain-cells" >> >> +if: > > Put it under allOf (in this place). Will save you one re-indentation later. > OK, will fix it. >> + properties: >> + compatible: >> + contains: >> + const: starfive,jh7110-pmu >> +then: >> + required: >> + - reg >> + - interrupts >> + >> additionalProperties: false >> >> examples: >> diff --git a/include/dt-bindings/power/starfive,jh7110-pmu.h b/include/dt-bindings/power/starfive,jh7110-pmu.h >> index 132bfe401fc8..0bfd6700c144 100644 >> --- a/include/dt-bindings/power/starfive,jh7110-pmu.h >> +++ b/include/dt-bindings/power/starfive,jh7110-pmu.h >> @@ -14,4 +14,7 @@ >> #define JH7110_PD_ISP 5 >> #define JH7110_PD_VENC 6 >> >> +#define JH7110_PD_DPHY_TX 0 >> +#define JH7110_PD_DPHY_RX 1 >> + >> #endif > > Best regards, > Krzysztof >
On Wed, Apr 12, 2023 at 04:51:16PM +0800, Changhuang Liang wrote: > > > On 2023/4/12 16:35, Krzysztof Kozlowski wrote: > > On 11/04/2023 08:47, Changhuang Liang wrote: > >> When use "starfive,jh7110-pmu-dphy" compatible, do not need the reg and > >> interrupts properties. > [...] > >> > >> description: | > >> StarFive JH7110 SoC includes support for multiple power domains which can be > >> @@ -17,6 +18,7 @@ properties: > >> compatible: > >> enum: > >> - starfive,jh7110-pmu > >> + - starfive,jh7110-pmu-dphy > > > > You do here much more than commit msg says. > > > > Isn'y DPHY a phy? Why is it in power? > > > > OK, I will add more description. This is a power framework used to turn on/off > DPHY. So it in power, not a phy. Perhaps tie it less to its role w/ the phy, and more to do with its location, say "jh7110-aon-pmu"? There's already "aon"/"sys"/"stg" stuff used in clock-controller and syscon compatibles etc. Krzysztof, what do you think of that? (if you remember the whole discussion we previously had about using those identifiers a few weeks ago).
On 12/04/2023 11:42, Conor Dooley wrote: > On Wed, Apr 12, 2023 at 04:51:16PM +0800, Changhuang Liang wrote: >> >> >> On 2023/4/12 16:35, Krzysztof Kozlowski wrote: >>> On 11/04/2023 08:47, Changhuang Liang wrote: >>>> When use "starfive,jh7110-pmu-dphy" compatible, do not need the reg and >>>> interrupts properties. >> [...] >>>> >>>> description: | >>>> StarFive JH7110 SoC includes support for multiple power domains which can be >>>> @@ -17,6 +18,7 @@ properties: >>>> compatible: >>>> enum: >>>> - starfive,jh7110-pmu >>>> + - starfive,jh7110-pmu-dphy >>> >>> You do here much more than commit msg says. >>> >>> Isn'y DPHY a phy? Why is it in power? >>> >> >> OK, I will add more description. This is a power framework used to turn on/off >> DPHY. So it in power, not a phy. > > Perhaps tie it less to its role w/ the phy, and more to do with its > location, say "jh7110-aon-pmu"? > There's already "aon"/"sys"/"stg" stuff used in clock-controller and > syscon compatibles etc. > > Krzysztof, what do you think of that? (if you remember the whole > discussion we previously had about using those identifiers a few weeks > ago). Depends whether this is the same case or not. AFAIR, for AON/SYS/STG these were blocks with few features, not only clock controller. This sounds like just phy. Powering on/off phy is still a job of phy controller... unless it is a power domain controller. Best regards, Krzysztof
On 2023/4/12 19:29, Krzysztof Kozlowski wrote: > On 12/04/2023 11:42, Conor Dooley wrote: >> On Wed, Apr 12, 2023 at 04:51:16PM +0800, Changhuang Liang wrote: >>> >>> >>> On 2023/4/12 16:35, Krzysztof Kozlowski wrote: >>>> On 11/04/2023 08:47, Changhuang Liang wrote: >>>>> When use "starfive,jh7110-pmu-dphy" compatible, do not need the reg and >>>>> interrupts properties. >>> [...] >>>>> >>>>> description: | >>>>> StarFive JH7110 SoC includes support for multiple power domains which can be >>>>> @@ -17,6 +18,7 @@ properties: >>>>> compatible: >>>>> enum: >>>>> - starfive,jh7110-pmu >>>>> + - starfive,jh7110-pmu-dphy >>>> >>>> You do here much more than commit msg says. >>>> >>>> Isn'y DPHY a phy? Why is it in power? >>>> >>> >>> OK, I will add more description. This is a power framework used to turn on/off >>> DPHY. So it in power, not a phy. >> >> Perhaps tie it less to its role w/ the phy, and more to do with its >> location, say "jh7110-aon-pmu"? >> There's already "aon"/"sys"/"stg" stuff used in clock-controller and >> syscon compatibles etc. >> >> Krzysztof, what do you think of that? (if you remember the whole >> discussion we previously had about using those identifiers a few weeks >> ago). > > Depends whether this is the same case or not. AFAIR, for AON/SYS/STG > these were blocks with few features, not only clock controller. > > This sounds like just phy. Powering on/off phy is still a job of phy > controller... unless it is a power domain controller. > Best regards, > Krzysztof > Hi, Coner and Krzysztof, Next version I will change commit message: dt-bindings: power: Add JH7110 DPHY PMU support. Add DPHY PMU for StarFive JH7110 SoC, it can be used to turn on/off DPHY rx/tx power switch, and it don't need the reg and interrupt properties. I think this commit message will helpful for you to understand it. Best regards, Changhuang
On 2023/4/12 19:29, Krzysztof Kozlowski wrote: > On 12/04/2023 11:42, Conor Dooley wrote: >> On Wed, Apr 12, 2023 at 04:51:16PM +0800, Changhuang Liang wrote: >>> >>> >>> On 2023/4/12 16:35, Krzysztof Kozlowski wrote: >>>> On 11/04/2023 08:47, Changhuang Liang wrote: >>>>> When use "starfive,jh7110-pmu-dphy" compatible, do not need the reg and >>>>> interrupts properties. >>> [...] >>>>> >>>>> description: | >>>>> StarFive JH7110 SoC includes support for multiple power domains which can be >>>>> @@ -17,6 +18,7 @@ properties: >>>>> compatible: >>>>> enum: >>>>> - starfive,jh7110-pmu >>>>> + - starfive,jh7110-pmu-dphy >>>> >>>> You do here much more than commit msg says. >>>> >>>> Isn'y DPHY a phy? Why is it in power? >>>> >>> >>> OK, I will add more description. This is a power framework used to turn on/off >>> DPHY. So it in power, not a phy. I found something wrong with my description here, not turn on/off DPHY, is turn on/off DPHY power switch. >> >> Perhaps tie it less to its role w/ the phy, and more to do with its >> location, say "jh7110-aon-pmu"? >> There's already "aon"/"sys"/"stg" stuff used in clock-controller and >> syscon compatibles etc. >> >> Krzysztof, what do you think of that? (if you remember the whole >> discussion we previously had about using those identifiers a few weeks >> ago). > > Depends whether this is the same case or not. AFAIR, for AON/SYS/STG > these were blocks with few features, not only clock controller. > > This sounds like just phy. Powering on/off phy is still a job of phy > controller... unless it is a power domain controller. > Best regards, > Krzysztof > So, next version the compatible can be changed to "jh7110-aon-pmu"?
On Wed, Apr 12, 2023 at 01:29:57PM +0200, Krzysztof Kozlowski wrote: > On 12/04/2023 11:42, Conor Dooley wrote: > > On Wed, Apr 12, 2023 at 04:51:16PM +0800, Changhuang Liang wrote: > >> > >> > >> On 2023/4/12 16:35, Krzysztof Kozlowski wrote: > >>> On 11/04/2023 08:47, Changhuang Liang wrote: > >>>> When use "starfive,jh7110-pmu-dphy" compatible, do not need the reg and > >>>> interrupts properties. > >> [...] > >>>> > >>>> description: | > >>>> StarFive JH7110 SoC includes support for multiple power domains which can be > >>>> @@ -17,6 +18,7 @@ properties: > >>>> compatible: > >>>> enum: > >>>> - starfive,jh7110-pmu > >>>> + - starfive,jh7110-pmu-dphy > >>> > >>> You do here much more than commit msg says. > >>> > >>> Isn'y DPHY a phy? Why is it in power? > >>> > >> > >> OK, I will add more description. This is a power framework used to turn on/off > >> DPHY. So it in power, not a phy. > > > > Perhaps tie it less to its role w/ the phy, and more to do with its > > location, say "jh7110-aon-pmu"? > > There's already "aon"/"sys"/"stg" stuff used in clock-controller and > > syscon compatibles etc. > > > > Krzysztof, what do you think of that? (if you remember the whole > > discussion we previously had about using those identifiers a few weeks > > ago). > > Depends whether this is the same case or not. > AFAIR, for AON/SYS/STG > these were blocks with few features, not only clock controller. Correct, yes. In the dts, this "pmu-dphy" node is a child node of the aon syscon, so this pmu stuff would be one of the several features.
On Fri, Apr 14, 2023 at 10:20:31AM +0800, Changhuang Liang wrote: > > > On 2023/4/12 19:29, Krzysztof Kozlowski wrote: > > On 12/04/2023 11:42, Conor Dooley wrote: > >> On Wed, Apr 12, 2023 at 04:51:16PM +0800, Changhuang Liang wrote: > >>> > >>> > >>> On 2023/4/12 16:35, Krzysztof Kozlowski wrote: > >>>> On 11/04/2023 08:47, Changhuang Liang wrote: > >>>>> When use "starfive,jh7110-pmu-dphy" compatible, do not need the reg and > >>>>> interrupts properties. > >>> [...] > >>>>> > >>>>> description: | > >>>>> StarFive JH7110 SoC includes support for multiple power domains which can be > >>>>> @@ -17,6 +18,7 @@ properties: > >>>>> compatible: > >>>>> enum: > >>>>> - starfive,jh7110-pmu > >>>>> + - starfive,jh7110-pmu-dphy > >>>> > >>>> You do here much more than commit msg says. > >>>> > >>>> Isn'y DPHY a phy? Why is it in power? > >>>> > >>> > >>> OK, I will add more description. This is a power framework used to turn on/off > >>> DPHY. So it in power, not a phy. > > I found something wrong with my description here, not turn on/off DPHY, > is turn on/off DPHY power switch. > > >> > >> Perhaps tie it less to its role w/ the phy, and more to do with its > >> location, say "jh7110-aon-pmu"? > >> There's already "aon"/"sys"/"stg" stuff used in clock-controller and > >> syscon compatibles etc. > >> > >> Krzysztof, what do you think of that? (if you remember the whole > >> discussion we previously had about using those identifiers a few weeks > >> ago). > > > > Depends whether this is the same case or not. AFAIR, for AON/SYS/STG > > these were blocks with few features, not only clock controller. > > > > This sounds like just phy. Powering on/off phy is still a job of phy > > controller... unless it is a power domain controller. > > Best regards, > > Krzysztof > > > > So, next version the compatible can be changed to "jh7110-aon-pmu"? Hmm, is the dphy the only thing that's power is controlled by registers in the aon syscon? I tried looking in the "preliminary" TRM that I have, but it's not really got a proper register map so I could not tell. If there are, it'd help your case I think Changhuang Liang.
On 2023/4/18 2:55, Conor Dooley wrote: > On Fri, Apr 14, 2023 at 10:20:31AM +0800, Changhuang Liang wrote: >> >> >> On 2023/4/12 19:29, Krzysztof Kozlowski wrote: >>> On 12/04/2023 11:42, Conor Dooley wrote: >>>> On Wed, Apr 12, 2023 at 04:51:16PM +0800, Changhuang Liang wrote: >>>>> >>>>> >>>>> On 2023/4/12 16:35, Krzysztof Kozlowski wrote: >>>>>> On 11/04/2023 08:47, Changhuang Liang wrote: >>>>>>> When use "starfive,jh7110-pmu-dphy" compatible, do not need the reg and >>>>>>> interrupts properties. >>>>> [...] >>>>>>> >>>>>>> description: | >>>>>>> StarFive JH7110 SoC includes support for multiple power domains which can be >>>>>>> @@ -17,6 +18,7 @@ properties: >>>>>>> compatible: >>>>>>> enum: >>>>>>> - starfive,jh7110-pmu >>>>>>> + - starfive,jh7110-pmu-dphy >>>>>> >>>>>> You do here much more than commit msg says. >>>>>> >>>>>> Isn'y DPHY a phy? Why is it in power? >>>>>> >>>>> >>>>> OK, I will add more description. This is a power framework used to turn on/off >>>>> DPHY. So it in power, not a phy. >> >> I found something wrong with my description here, not turn on/off DPHY, >> is turn on/off DPHY power switch. >> >>>> >>>> Perhaps tie it less to its role w/ the phy, and more to do with its >>>> location, say "jh7110-aon-pmu"? >>>> There's already "aon"/"sys"/"stg" stuff used in clock-controller and >>>> syscon compatibles etc. >>>> >>>> Krzysztof, what do you think of that? (if you remember the whole >>>> discussion we previously had about using those identifiers a few weeks >>>> ago). >>> >>> Depends whether this is the same case or not. AFAIR, for AON/SYS/STG >>> these were blocks with few features, not only clock controller. >>> >>> This sounds like just phy. Powering on/off phy is still a job of phy >>> controller... unless it is a power domain controller. >>> Best regards, >>> Krzysztof >>> >> >> So, next version the compatible can be changed to "jh7110-aon-pmu"? > > Hmm, is the dphy the only thing that's power is controlled by registers > in the aon syscon? I tried looking in the "preliminary" TRM that I have, > but it's not really got a proper register map so I could not tell. > > If there are, it'd help your case I think Changhuang Liang. I made a discussion with Walker, We don't use other bit on the visionfive2 board. And I first naming by function. So I will change to "jh7110-aon-pmu" next version.
diff --git a/Documentation/devicetree/bindings/power/starfive,jh7110-pmu.yaml b/Documentation/devicetree/bindings/power/starfive,jh7110-pmu.yaml index 98eb8b4110e7..ffb4406c2e56 100644 --- a/Documentation/devicetree/bindings/power/starfive,jh7110-pmu.yaml +++ b/Documentation/devicetree/bindings/power/starfive,jh7110-pmu.yaml @@ -8,6 +8,7 @@ title: StarFive JH7110 Power Management Unit maintainers: - Walker Chen <walker.chen@starfivetech.com> + - Changhuang Liang <changhuang.liang@starfivetech.com> description: | StarFive JH7110 SoC includes support for multiple power domains which can be @@ -17,6 +18,7 @@ properties: compatible: enum: - starfive,jh7110-pmu + - starfive,jh7110-pmu-dphy reg: maxItems: 1 @@ -29,10 +31,18 @@ properties: required: - compatible - - reg - - interrupts - "#power-domain-cells" +if: + properties: + compatible: + contains: + const: starfive,jh7110-pmu +then: + required: + - reg + - interrupts + additionalProperties: false examples: diff --git a/include/dt-bindings/power/starfive,jh7110-pmu.h b/include/dt-bindings/power/starfive,jh7110-pmu.h index 132bfe401fc8..0bfd6700c144 100644 --- a/include/dt-bindings/power/starfive,jh7110-pmu.h +++ b/include/dt-bindings/power/starfive,jh7110-pmu.h @@ -14,4 +14,7 @@ #define JH7110_PD_ISP 5 #define JH7110_PD_VENC 6 +#define JH7110_PD_DPHY_TX 0 +#define JH7110_PD_DPHY_RX 1 + #endif