[v3,1/5] dt-bindings: power: Add JH7110 AON PMU support
Commit Message
Add AON PMU for StarFive JH7110 SoC, it can be used to turn on/off DPHY
rx/tx power switch, and it don't need the property of interrupts. It
also can use syscon operation.
Signed-off-by: Changhuang Liang <changhuang.liang@starfivetech.com>
---
.../bindings/power/starfive,jh7110-pmu.yaml | 28 +++++++++++++++++--
.../dt-bindings/power/starfive,jh7110-pmu.h | 5 +++-
2 files changed, 29 insertions(+), 4 deletions(-)
Comments
On Tue, May 09, 2023 at 06:53:07PM -0700, Changhuang Liang wrote:
> Add AON PMU for StarFive JH7110 SoC, it can be used to turn on/off DPHY
> rx/tx power switch, and it don't need the property of interrupts. It
> also can use syscon operation.
>
> Signed-off-by: Changhuang Liang <changhuang.liang@starfivetech.com>
> ---
> .../bindings/power/starfive,jh7110-pmu.yaml | 28 +++++++++++++++++--
> .../dt-bindings/power/starfive,jh7110-pmu.h | 5 +++-
> 2 files changed, 29 insertions(+), 4 deletions(-)
>
> diff --git a/Documentation/devicetree/bindings/power/starfive,jh7110-pmu.yaml b/Documentation/devicetree/bindings/power/starfive,jh7110-pmu.yaml
> index 98eb8b4110e7..0591a4e9db6c 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
> @@ -15,8 +16,13 @@ description: |
>
> properties:
> compatible:
> - enum:
> - - starfive,jh7110-pmu
> + oneOf:
> + - enum:
> + - starfive,jh7110-pmu
> + - items:
> + - enum:
> + - starfive,jh7110-aon-syscon
> + - const: syscon
Unfortunately, this is not what was wanted.
This syscon, of which power domain control is just one of the things that
it can do, should be documented in
Documentation/devicetree/bindings/soc/starfive/starfive,jh7110-syscon.yaml
alongside it's brethern "starfive,jh7110-sys-syscon" &
"starfive,jh7110-stg-syscon".
Thanks,
Conor.
On 2023/5/10 15:06, Conor Dooley wrote:
> On Tue, May 09, 2023 at 06:53:07PM -0700, Changhuang Liang wrote:
>> + - starfive,jh7110-pmu
>> + - items:
>> + - enum:
>> + - starfive,jh7110-aon-syscon
>> + - const: syscon
>
> Unfortunately, this is not what was wanted.
> This syscon, of which power domain control is just one of the things that
> it can do, should be documented in
> Documentation/devicetree/bindings/soc/starfive/starfive,jh7110-syscon.yaml
> alongside it's brethern "starfive,jh7110-sys-syscon" &
> "starfive,jh7110-stg-syscon".
>
That means that I don't need to modify this original yaml file?
I just need to move current changes in this patch into
"Documentation/devicetree/bindings/soc/starfive/starfive,jh7110-syscon.yaml"?
Thanks,
Changhuang
On Wed, May 10, 2023 at 03:20:14PM +0800, Changhuang Liang wrote:
> On 2023/5/10 15:06, Conor Dooley wrote:
> > On Tue, May 09, 2023 at 06:53:07PM -0700, Changhuang Liang wrote:
> >> + - starfive,jh7110-pmu
> >> + - items:
> >> + - enum:
> >> + - starfive,jh7110-aon-syscon
> >> + - const: syscon
> >
> > Unfortunately, this is not what was wanted.
> > This syscon, of which power domain control is just one of the things that
> > it can do, should be documented in
> > Documentation/devicetree/bindings/soc/starfive/starfive,jh7110-syscon.yaml
> > alongside it's brethern "starfive,jh7110-sys-syscon" &
> > "starfive,jh7110-stg-syscon".
> >
>
> That means that I don't need to modify this original yaml file?
Does "this original" mean starfive,jh7100-pmu.yaml?
If so then...
> I just need to move current changes in this patch into
> "Documentation/devicetree/bindings/soc/starfive/starfive,jh7110-syscon.yaml"?
Correct.
It makes most sense for that binding, as it depends on the pll binding
(because it has a ref: to it), to go through the clock tree in Xingyu's
series.
I'll apply the driver changes once the binding has been applied.
Thanks,
Conor.
On 2023/5/11 3:51, Conor Dooley wrote:
> On Wed, May 10, 2023 at 03:20:14PM +0800, Changhuang Liang wrote:
>> On 2023/5/10 15:06, Conor Dooley wrote:
>>> On Tue, May 09, 2023 at 06:53:07PM -0700, Changhuang Liang wrote:
>>>> + - starfive,jh7110-pmu
>>>> + - items:
>>>> + - enum:
>>>> + - starfive,jh7110-aon-syscon
>>>> + - const: syscon
>>>
>>> Unfortunately, this is not what was wanted.
>>> This syscon, of which power domain control is just one of the things that
>>> it can do, should be documented in
>>> Documentation/devicetree/bindings/soc/starfive/starfive,jh7110-syscon.yaml
>>> alongside it's brethern "starfive,jh7110-sys-syscon" &
>>> "starfive,jh7110-stg-syscon".
>>>
>>
>> That means that I don't need to modify this original yaml file?
>
> Does "this original" mean starfive,jh7100-pmu.yaml?
> If so then...
>
Yes.
>> I just need to move current changes in this patch into
>> "Documentation/devicetree/bindings/soc/starfive/starfive,jh7110-syscon.yaml"?
>
> Correct.
> It makes most sense for that binding, as it depends on the pll binding
> (because it has a ref: to it), to go through the clock tree in Xingyu's
> series.
> I'll apply the driver changes once the binding has been applied.
>
I think that I have to send v4 after Xingyu's series resend new version.
If drivers have no other comments. I will make the following changes:
patch 1/5: Only keep the content in starfive,jh7110-pmu.h, move other content into Xingyu's PLL series.
patch 5/5: Drop this patch, move the content into Xingyu's PLL series.
other patch: no change.
Thanks,
Changhuang
@@ -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
@@ -15,8 +16,13 @@ description: |
properties:
compatible:
- enum:
- - starfive,jh7110-pmu
+ oneOf:
+ - enum:
+ - starfive,jh7110-pmu
+ - items:
+ - enum:
+ - starfive,jh7110-aon-syscon
+ - const: syscon
reg:
maxItems: 1
@@ -30,9 +36,18 @@ properties:
required:
- compatible
- reg
- - interrupts
- "#power-domain-cells"
+allOf:
+ - if:
+ properties:
+ compatible:
+ contains:
+ const: starfive,jh7110-pmu
+ then:
+ required:
+ - interrupts
+
additionalProperties: false
examples:
@@ -43,3 +58,10 @@ examples:
interrupts = <111>;
#power-domain-cells = <1>;
};
+
+ - |
+ aon_syscon: syscon@17010000 {
+ compatible = "starfive,jh7110-aon-syscon", "syscon";
+ reg = <0x17010000 0x1000>;
+ #power-domain-cells = <1>;
+ };
@@ -1,6 +1,6 @@
/* SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) */
/*
- * Copyright (C) 2022 StarFive Technology Co., Ltd.
+ * Copyright (C) 2022-2023 StarFive Technology Co., Ltd.
* Author: Walker Chen <walker.chen@starfivetech.com>
*/
#ifndef __DT_BINDINGS_POWER_JH7110_POWER_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