[RESEND v2 1/6] dt-bindings: power: Add JH7110 AON PMU support
Conor Dooley
conor at kernel.org
Wed Apr 19 11:29:48 PDT 2023
Hey Changhuang, DT/PHY folks,
On Tue, Apr 18, 2023 at 08:56:41PM -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 properties of reg and
> interrupts.
Putting this here since the DT guys are more likely to see it this way..
Given how the implementation of the code driving this new
power-controller and the code driving the existing one are rather
different (you've basically re-written the entire driver in this series),
should the dphy driver implement its own power-controller?
I know originally Changuang had tried something along those lines:
https://lore.kernel.org/linux-riscv/5dc4ddc2-9d15-ebb2-38bc-8a544ca67e0d@starfivetech.com/
I see that that was shut down pretty much, partly due to the
non-standard property, hence this series adding the dphy power domain to
the existing driver.
If it was done by looking up the pmu with a
of_find_compatible_node(NULL, "power-controller", "starfive,jh7110-aon-pmu")
type thing, would that make sense? Although, maybe that is not a
question for you, and this series may actually have been better entirely
bundled with the dphy series so the whole thing can be reviewed as a
unit. I've added
IOW, don't change this patch, or the dts patch, but move all of the
code back into the phy driver..
Sorry for not asking this sooner Changhuang,
Conor.
(hopefully this didn't get sent twice, mutt complained of a bad email
addr during sending the first time)
>
> Signed-off-by: Changhuang Liang <changhuang.liang at starfivetech.com>
> ---
> .../bindings/power/starfive,jh7110-pmu.yaml | 15 +++++++++++++--
> include/dt-bindings/power/starfive,jh7110-pmu.h | 3 +++
> 2 files changed, 16 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..c50507c38e14 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 at starfivetech.com>
> + - Changhuang Liang <changhuang.liang at 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-aon-pmu
>
> reg:
> maxItems: 1
> @@ -29,10 +31,19 @@ properties:
>
> required:
> - compatible
> - - reg
> - - interrupts
> - "#power-domain-cells"
>
> +allOf:
> + - 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
>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 228 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-riscv/attachments/20230419/dd074a5d/attachment.sig>
More information about the linux-riscv
mailing list