diff mbox series

[v5,11/11] arm64: dts: renesas: rzg2l-smarc-som: Enable PMIC and built-in RTC

Message ID 20230522101849.297499-12-biju.das.jz@bp.renesas.com (mailing list archive)
State Superseded
Delegated to: Geert Uytterhoeven
Headers show
Series Add Renesas PMIC RAA215300 and built-in RTC support | expand

Commit Message

Biju Das May 22, 2023, 10:18 a.m. UTC
Enable PMIC RAA215300 and the built-in RTC on the RZ/{G2L,V2L} SMARC
EVK.

Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com>
---
v4->v5:
 * No change.
v3->v4:
 * Added clock nodes.
v2->v3:
 * No change.
RFC->V2:
 * Updated pmic device node based on the bindings.
---
 .../boot/dts/renesas/rzg2l-smarc-som.dtsi      | 18 ++++++++++++++++++
 1 file changed, 18 insertions(+)

Comments

Geert Uytterhoeven May 26, 2023, 7:55 a.m. UTC | #1
Hi Biju,

Thanks for your patch!

On Mon, May 22, 2023 at 12:19 PM Biju Das <biju.das.jz@bp.renesas.com> wrote:
> Enable PMIC RAA215300 and the built-in RTC on the RZ/{G2L,V2L} SMARC
> EVK.

Looking at the schematics for the RZ/{G2L,G2LC,V2L} SOMs, it seems not
all SOMs have this PMIC? The ones that do have the PMIC are annotated
"PMIC Version" on the title page.

> Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com>

> --- a/arch/arm64/boot/dts/renesas/rzg2l-smarc-som.dtsi
> +++ b/arch/arm64/boot/dts/renesas/rzg2l-smarc-som.dtsi
> @@ -73,6 +73,13 @@ vccq_sdhi0: regulator-vccq-sdhi0 {
>                 gpios = <&pinctrl RZG2L_GPIO(39, 0) GPIO_ACTIVE_HIGH>;
>                 regulator-always-on;
>         };
> +
> +       /* 32.768kHz crystal */
> +       x2: clock-xtal {

"clock-extal" is a too generic name, and might cause conflicts.
"x2-clk"?

> +               compatible = "fixed-clock";
> +               #clock-cells = <0>;
> +               clock-frequency = <32768>;
> +       };
>  };
>
>  &adc {
> @@ -351,3 +358,14 @@ &wdt1 {
>         status = "okay";
>         timeout-sec = <60>;
>  };
> +
> +&i2c3 {

Please obey alphabetical sort order.

> +       raa215300: pmic@12 {
> +               compatible = "renesas,raa215300";
> +               reg = <0x12>, <0x6f>;
> +               reg-names = "main", "rtc";
> +
> +               clocks = <&x2>;
> +               clock-names = "xin";
> +       };
> +};
> --
> 2.25.1

Gr{oetje,eeting}s,

                        Geert
Biju Das May 26, 2023, 8:48 a.m. UTC | #2
Hi Geert,

Thanks for the feedback.

> Subject: Re: [PATCH v5 11/11] arm64: dts: renesas: rzg2l-smarc-som:
> Enable PMIC and built-in RTC
> 
> Hi Biju,
> 
> Thanks for your patch!
> 
> On Mon, May 22, 2023 at 12:19 PM Biju Das <biju.das.jz@bp.renesas.com>
> wrote:
> > Enable PMIC RAA215300 and the built-in RTC on the RZ/{G2L,V2L} SMARC
> > EVK.
> 
> Looking at the schematics for the RZ/{G2L,G2LC,V2L} SOMs, it seems not
> all SOMs have this PMIC? The ones that do have the PMIC are annotated
> "PMIC Version" on the title page.

Only few early prototype versions doesn't have PMIC. Currently we are not making
any SoM of that type. All SoMs have now PMIC.

> 
> > Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com>
> 
> > --- a/arch/arm64/boot/dts/renesas/rzg2l-smarc-som.dtsi
> > +++ b/arch/arm64/boot/dts/renesas/rzg2l-smarc-som.dtsi
> > @@ -73,6 +73,13 @@ vccq_sdhi0: regulator-vccq-sdhi0 {
> >                 gpios = <&pinctrl RZG2L_GPIO(39, 0) GPIO_ACTIVE_HIGH>;
> >                 regulator-always-on;
> >         };
> > +
> > +       /* 32.768kHz crystal */
> > +       x2: clock-xtal {
> 
> "clock-extal" is a too generic name, and might cause conflicts.
> "x2-clk"? 

OK, will change it to "x2-clock" as per [1]
[1]
https://devicetree-specification.readthedocs.io/en/latest/chapter2-devicetree-basics.html#generic-names-recommendation

> 
> > +               compatible = "fixed-clock";
> > +               #clock-cells = <0>;
> > +               clock-frequency = <32768>;
> > +       };
> >  };
> >
> >  &adc {
> > @@ -351,3 +358,14 @@ &wdt1 {
> >         status = "okay";
> >         timeout-sec = <60>;
> >  };
> > +
> > +&i2c3 {
> 
> Please obey alphabetical sort order.

OK will arrange it in alphabetical order.

Cheers,
Biju

> 
> > +       raa215300: pmic@12 {
> > +               compatible = "renesas,raa215300";
> > +               reg = <0x12>, <0x6f>;
> > +               reg-names = "main", "rtc";
> > +
> > +               clocks = <&x2>;
> > +               clock-names = "xin";
> > +       };
> > +};
> > --
> > 2.25.1
> 
> 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
diff mbox series

Patch

diff --git a/arch/arm64/boot/dts/renesas/rzg2l-smarc-som.dtsi b/arch/arm64/boot/dts/renesas/rzg2l-smarc-som.dtsi
index fbbb4f03440b..801d1c1c5bc2 100644
--- a/arch/arm64/boot/dts/renesas/rzg2l-smarc-som.dtsi
+++ b/arch/arm64/boot/dts/renesas/rzg2l-smarc-som.dtsi
@@ -73,6 +73,13 @@  vccq_sdhi0: regulator-vccq-sdhi0 {
 		gpios = <&pinctrl RZG2L_GPIO(39, 0) GPIO_ACTIVE_HIGH>;
 		regulator-always-on;
 	};
+
+	/* 32.768kHz crystal */
+	x2: clock-xtal {
+		compatible = "fixed-clock";
+		#clock-cells = <0>;
+		clock-frequency = <32768>;
+	};
 };
 
 &adc {
@@ -351,3 +358,14 @@  &wdt1 {
 	status = "okay";
 	timeout-sec = <60>;
 };
+
+&i2c3 {
+	raa215300: pmic@12 {
+		compatible = "renesas,raa215300";
+		reg = <0x12>, <0x6f>;
+		reg-names = "main", "rtc";
+
+		clocks = <&x2>;
+		clock-names = "xin";
+	};
+};