diff mbox series

[5/6] arm64: dts: renesas: rzg2ul-smarc: Enable PMIC and built-in RTC

Message ID 20231201110840.37408-6-biju.das.jz@bp.renesas.com (mailing list archive)
State Superseded
Delegated to: Geert Uytterhoeven
Headers show
Series Add DA9062 PMIC and built-in RTC support for RZ/G2UL SMARC EVK | expand

Commit Message

Biju Das Dec. 1, 2023, 11:08 a.m. UTC
Enable PMIC DA9062 and the built-in RTC on the RZ/{G2UL,Five} SMARC
EVK.

Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com>
---
 arch/arm64/boot/dts/renesas/rzg2ul-smarc.dtsi | 29 +++++++++++++++++++
 1 file changed, 29 insertions(+)

Comments

Geert Uytterhoeven Dec. 1, 2023, 1:39 p.m. UTC | #1
Hi Biju,

On Fri, Dec 1, 2023 at 12:09 PM Biju Das <biju.das.jz@bp.renesas.com> wrote:
> Enable PMIC DA9062 and the built-in RTC on the RZ/{G2UL,Five} SMARC
> EVK.
>
> Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com>

Thanks for your patch!

> --- a/arch/arm64/boot/dts/renesas/rzg2ul-smarc.dtsi
> +++ b/arch/arm64/boot/dts/renesas/rzg2ul-smarc.dtsi
> @@ -23,6 +23,35 @@ &cpu_dai {
>  &i2c0 {
>         clock-frequency = <400000>;
>
> +       da9062: pmic@58 {
> +               compatible = "dlg,da9062";
> +               reg = <0x58>;
> +
> +               da9062_rtc: rtc {
> +                       compatible = "dlg,da9062-rtc";
> +               };
> +
> +               da9062_onkey: onkey {
> +                       compatible = "dlg,da9062-onkey";
> +                       status = "disabled";

Why is this disabled? This is connected to the power button.

> +               };
> +
> +               watchdog {
> +                       compatible = "dlg,da9062-watchdog";
> +                       status = "disabled";
> +               };
> +
> +               thermal {
> +                       compatible = "dlg,da9062-thermal";
> +                       status = "disabled";
> +               };
> +
> +               gpio {
> +                       compatible = "dlg,da9062-gpio";
> +                       status = "disabled";
> +               };

Why are these three disabled?
If they are truly unused, you can just drop the nodes instead.

> +       };
> +
>         versa3: clock-generator@68 {
>                 compatible = "renesas,5p35023";
>                 reg = <0x68>;

Gr{oetje,eeting}s,

                        Geert
Biju Das Dec. 1, 2023, 1:48 p.m. UTC | #2
Hi Geert,

Thanks for the feedback.

> -----Original Message-----
> From: Geert Uytterhoeven <geert@linux-m68k.org>
> Sent: Friday, December 1, 2023 1:40 PM
> Subject: Re: [PATCH 5/6] arm64: dts: renesas: rzg2ul-smarc: Enable PMIC
> and built-in RTC
> 
> Hi Biju,
> 
> On Fri, Dec 1, 2023 at 12:09 PM Biju Das <biju.das.jz@bp.renesas.com>
> wrote:
> > Enable PMIC DA9062 and the built-in RTC on the RZ/{G2UL,Five} SMARC
> > EVK.
> >
> > Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com>
> 
> Thanks for your patch!
> 
> > --- a/arch/arm64/boot/dts/renesas/rzg2ul-smarc.dtsi
> > +++ b/arch/arm64/boot/dts/renesas/rzg2ul-smarc.dtsi
> > @@ -23,6 +23,35 @@ &cpu_dai {
> >  &i2c0 {
> >         clock-frequency = <400000>;
> >
> > +       da9062: pmic@58 {
> > +               compatible = "dlg,da9062";
> > +               reg = <0x58>;
> > +
> > +               da9062_rtc: rtc {
> > +                       compatible = "dlg,da9062-rtc";
> > +               };
> > +
> > +               da9062_onkey: onkey {
> > +                       compatible = "dlg,da9062-onkey";
> > +                       status = "disabled";
> 
> Why is this disabled? This is connected to the power button.

I haven't tested this driver. OK I will test and enable it.

> 
> > +               };
> > +
> > +               watchdog {
> > +                       compatible = "dlg,da9062-watchdog";
> > +                       status = "disabled";
> > +               };
> > +
> > +               thermal {
> > +                       compatible = "dlg,da9062-thermal";
> > +                       status = "disabled";
> > +               };
> > +
> > +               gpio {
> > +                       compatible = "dlg,da9062-gpio";
> > +                       status = "disabled";
> > +               };
> 
> Why are these three disabled?
> If they are truly unused, you can just drop the nodes instead.

If I drop these, I get failed messages(eg: da9062-gpio: Failed to locate of_node [id: -1])
for these nodes.

Cheers,
Biju

> 
> > +       };
> > +
> >         versa3: clock-generator@68 {
> >                 compatible = "renesas,5p35023";
> >                 reg = <0x68>;
> 
> Gr{oetje,eeting}s,
> 
>                         Geert
> 
> --
> Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-
> m68k.org
> 
> In personal conversations with technical people, I call myself a hacker.
> But when I'm talking to journalists I just say "programmer" or something
> like that.
>                                 -- Linus Torvalds
Geert Uytterhoeven Dec. 1, 2023, 1:58 p.m. UTC | #3
Hi Biju,

On Fri, Dec 1, 2023 at 2:48 PM Biju Das <biju.das.jz@bp.renesas.com> wrote:
> > From: Geert Uytterhoeven <geert@linux-m68k.org>
> > On Fri, Dec 1, 2023 at 12:09 PM Biju Das <biju.das.jz@bp.renesas.com>
> > wrote:
> > > Enable PMIC DA9062 and the built-in RTC on the RZ/{G2UL,Five} SMARC
> > > EVK.
> > >
> > > Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com>
> >
> > Thanks for your patch!
> >
> > > --- a/arch/arm64/boot/dts/renesas/rzg2ul-smarc.dtsi
> > > +++ b/arch/arm64/boot/dts/renesas/rzg2ul-smarc.dtsi
> > > @@ -23,6 +23,35 @@ &cpu_dai {
> > >  &i2c0 {
> > >         clock-frequency = <400000>;
> > >
> > > +       da9062: pmic@58 {
> > > +               compatible = "dlg,da9062";
> > > +               reg = <0x58>;
> > > +
> > > +               da9062_rtc: rtc {
> > > +                       compatible = "dlg,da9062-rtc";
> > > +               };
> > > +
> > > +               da9062_onkey: onkey {
> > > +                       compatible = "dlg,da9062-onkey";
> > > +                       status = "disabled";
> >
> > Why is this disabled? This is connected to the power button.
>
> I haven't tested this driver. OK I will test and enable it.
>
> >
> > > +               };
> > > +
> > > +               watchdog {
> > > +                       compatible = "dlg,da9062-watchdog";
> > > +                       status = "disabled";
> > > +               };
> > > +
> > > +               thermal {
> > > +                       compatible = "dlg,da9062-thermal";
> > > +                       status = "disabled";
> > > +               };
> > > +
> > > +               gpio {
> > > +                       compatible = "dlg,da9062-gpio";
> > > +                       status = "disabled";
> > > +               };
> >
> > Why are these three disabled?
> > If they are truly unused, you can just drop the nodes instead.
>
> If I drop these, I get failed messages(eg: da9062-gpio: Failed to locate of_node [id: -1])
> for these nodes.

IC... They are indeed mandatory, but ignored when disabled.
Hence the subnodes should be made required in the DT bindings.

Gr{oetje,eeting}s,

                        Geert
diff mbox series

Patch

diff --git a/arch/arm64/boot/dts/renesas/rzg2ul-smarc.dtsi b/arch/arm64/boot/dts/renesas/rzg2ul-smarc.dtsi
index de590996e10a..7ef33087e6f9 100644
--- a/arch/arm64/boot/dts/renesas/rzg2ul-smarc.dtsi
+++ b/arch/arm64/boot/dts/renesas/rzg2ul-smarc.dtsi
@@ -23,6 +23,35 @@  &cpu_dai {
 &i2c0 {
 	clock-frequency = <400000>;
 
+	da9062: pmic@58 {
+		compatible = "dlg,da9062";
+		reg = <0x58>;
+
+		da9062_rtc: rtc {
+			compatible = "dlg,da9062-rtc";
+		};
+
+		da9062_onkey: onkey {
+			compatible = "dlg,da9062-onkey";
+			status = "disabled";
+		};
+
+		watchdog {
+			compatible = "dlg,da9062-watchdog";
+			status = "disabled";
+		};
+
+		thermal {
+			compatible = "dlg,da9062-thermal";
+			status = "disabled";
+		};
+
+		gpio {
+			compatible = "dlg,da9062-gpio";
+			status = "disabled";
+		};
+	};
+
 	versa3: clock-generator@68 {
 		compatible = "renesas,5p35023";
 		reg = <0x68>;