* [PATCH v2 0/2] Enable DA9062 PMIC and built-in RTC, GPIO and ONKEY
@ 2024-02-26 19:47 Biju Das
2024-02-26 19:47 ` [PATCH v2 1/2] arm64: dts: renesas: rzg2ul-smarc: Enable " Biju Das
` (2 more replies)
0 siblings, 3 replies; 6+ messages in thread
From: Biju Das @ 2024-02-26 19:47 UTC (permalink / raw)
To: Rob Herring, Krzysztof Kozlowski, Conor Dooley
Cc: Biju Das, Geert Uytterhoeven, Magnus Damm, linux-renesas-soc,
devicetree, Prabhakar Mahadev Lad, Biju Das
This patch series aims to enable DA9062 PMIC and built-in RTC, GPIO and
ONKEY modules on the RZ/{G2UL,Five} SMARC EVK development boards.
Logs:
GPIO:
root@smarc-rzg2ul:~# cat /sys/kernel/debug/gpio | grep da9062 -A5
gpiochip1: GPIOs 664-668, parent: platform/da9062-gpio, da9062-gpio, can sleep:
gpio-665 ( |SD0_PWR_SEL ) in lo
gpio-666 ( |SD1_PWR_SEL ) in lo
gpio-667 ( |SW_ET0_EN# ) in hi
gpio-668 ( |PMIC_PGOOD ) out hi
RTC:
da9063-rtc da9062-rtc: setting system clock to 2023-06-14T15:45:44 UTC (1686757544)
ONKEY:
input: da9062-onkey as /devices/platform/soc/10058000.i2c/i2c-0/0-0058/da9062-onkey/input/input0
Biju Das (2):
arm64: dts: renesas: rzg2ul-smarc: Enable PMIC and built-in RTC, GPIO
and ONKEY
arm64: dts: renesas: rzg2ul-smarc: [DO NOT APPLY] Add PMIC IRQ
property
arch/arm64/boot/dts/renesas/rzg2ul-smarc.dtsi | 70 +++++++++++++++++++
1 file changed, 70 insertions(+)
--
2.25.1
^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH v2 1/2] arm64: dts: renesas: rzg2ul-smarc: Enable PMIC and built-in RTC, GPIO and ONKEY
2024-02-26 19:47 [PATCH v2 0/2] Enable DA9062 PMIC and built-in RTC, GPIO and ONKEY Biju Das
@ 2024-02-26 19:47 ` Biju Das
2024-02-27 14:16 ` Geert Uytterhoeven
2024-02-26 19:47 ` [PATCH v2 2/2] arm64: dts: renesas: rzg2ul-smarc: [DO NOT APPLY] Add PMIC IRQ property Biju Das
2024-02-26 19:50 ` [PATCH v2 0/2] Enable DA9062 PMIC and built-in RTC, GPIO and ONKEY Geert Uytterhoeven
2 siblings, 1 reply; 6+ messages in thread
From: Biju Das @ 2024-02-26 19:47 UTC (permalink / raw)
To: Rob Herring, Krzysztof Kozlowski, Conor Dooley
Cc: Biju Das, Geert Uytterhoeven, Magnus Damm, linux-renesas-soc,
devicetree, Prabhakar Mahadev Lad, Biju Das
Enable PMIC DA9062 and the built-in RTC, GPIO and ONKEY modules on the
RZ/{G2UL,Five} SMARC EVK development boards.
Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com>
---
v1->v2:
* Dropped disabled status from gpio and onkey nodes.
* Added gpio hog nodes.
---
arch/arm64/boot/dts/renesas/rzg2ul-smarc.dtsi | 58 +++++++++++++++++++
1 file changed, 58 insertions(+)
diff --git a/arch/arm64/boot/dts/renesas/rzg2ul-smarc.dtsi b/arch/arm64/boot/dts/renesas/rzg2ul-smarc.dtsi
index de590996e10a..f6f6f8280df6 100644
--- a/arch/arm64/boot/dts/renesas/rzg2ul-smarc.dtsi
+++ b/arch/arm64/boot/dts/renesas/rzg2ul-smarc.dtsi
@@ -5,6 +5,7 @@
* Copyright (C) 2022 Renesas Electronics Corp.
*/
+#include <dt-bindings/gpio/gpio.h>
#include "rzg2ul-smarc-pinfunction.dtsi"
#include "rz-smarc-common.dtsi"
@@ -23,6 +24,63 @@ &cpu_dai {
&i2c0 {
clock-frequency = <400000>;
+ da9062: pmic@58 {
+ compatible = "dlg,da9062";
+ reg = <0x58>;
+ gpio-controller;
+ #gpio-cells = <2>;
+
+ gpio {
+ compatible = "dlg,da9062-gpio";
+ };
+
+ onkey {
+ compatible = "dlg,da9062-onkey";
+ };
+
+ pmic-good-hog {
+ gpio-hog;
+ gpios = <4 0>;
+ output-high;
+ line-name = "PMIC_PGOOD";
+ };
+
+ rtc {
+ compatible = "dlg,da9062-rtc";
+ };
+
+ sd0-pwr-sel-hog {
+ gpio-hog;
+ gpios = <1 0>;
+ input;
+ line-name = "SD0_PWR_SEL";
+ };
+
+ sd1-pwr-sel-hog {
+ gpio-hog;
+ gpios = <2 0>;
+ input;
+ line-name = "SD1_PWR_SEL";
+ };
+
+ sw-et0-en-hog {
+ gpio-hog;
+ gpios = <3 0>;
+ input;
+ line-name = "SW_ET0_EN#";
+ };
+
+ thermal {
+ compatible = "dlg,da9062-thermal";
+ status = "disabled";
+ };
+
+ watchdog {
+ compatible = "dlg,da9062-watchdog";
+ status = "disabled";
+ };
+ };
+
versa3: clock-generator@68 {
compatible = "renesas,5p35023";
reg = <0x68>;
--
2.25.1
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH v2 2/2] arm64: dts: renesas: rzg2ul-smarc: [DO NOT APPLY] Add PMIC IRQ property
2024-02-26 19:47 [PATCH v2 0/2] Enable DA9062 PMIC and built-in RTC, GPIO and ONKEY Biju Das
2024-02-26 19:47 ` [PATCH v2 1/2] arm64: dts: renesas: rzg2ul-smarc: Enable " Biju Das
@ 2024-02-26 19:47 ` Biju Das
2024-02-26 19:50 ` [PATCH v2 0/2] Enable DA9062 PMIC and built-in RTC, GPIO and ONKEY Geert Uytterhoeven
2 siblings, 0 replies; 6+ messages in thread
From: Biju Das @ 2024-02-26 19:47 UTC (permalink / raw)
To: Rob Herring, Krzysztof Kozlowski, Conor Dooley
Cc: Biju Das, Geert Uytterhoeven, Magnus Damm, linux-renesas-soc,
devicetree, Prabhakar Mahadev Lad, Biju Das
Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com>
---
arch/arm64/boot/dts/renesas/rzg2ul-smarc.dtsi | 12 ++++++++++++
1 file changed, 12 insertions(+)
diff --git a/arch/arm64/boot/dts/renesas/rzg2ul-smarc.dtsi b/arch/arm64/boot/dts/renesas/rzg2ul-smarc.dtsi
index f6f6f8280df6..812af2891a95 100644
--- a/arch/arm64/boot/dts/renesas/rzg2ul-smarc.dtsi
+++ b/arch/arm64/boot/dts/renesas/rzg2ul-smarc.dtsi
@@ -21,14 +21,26 @@ &cpu_dai {
sound-dai = <&ssi1>;
};
+&pinctrl {
+ pmic_pins: pmic {
+ pinmux = <RZG2L_PORT_PINMUX(18, 4, 1)>; /* IRQ6 */
+ };
+};
+
&i2c0 {
clock-frequency = <400000>;
da9062: pmic@58 {
compatible = "dlg,da9062";
reg = <0x58>;
+ pinctrl-0 = <&pmic_pins>;
+ pinctrl-names = "default";
gpio-controller;
#gpio-cells = <2>;
+ interrupt-controller;
+ #interrupt-cells = <2>;
+ interrupt-parent = <&irqc>;
+ interrupts = <RZG2L_IRQ6 IRQ_TYPE_LEVEL_LOW>;
gpio {
compatible = "dlg,da9062-gpio";
--
2.25.1
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH v2 0/2] Enable DA9062 PMIC and built-in RTC, GPIO and ONKEY
2024-02-26 19:47 [PATCH v2 0/2] Enable DA9062 PMIC and built-in RTC, GPIO and ONKEY Biju Das
2024-02-26 19:47 ` [PATCH v2 1/2] arm64: dts: renesas: rzg2ul-smarc: Enable " Biju Das
2024-02-26 19:47 ` [PATCH v2 2/2] arm64: dts: renesas: rzg2ul-smarc: [DO NOT APPLY] Add PMIC IRQ property Biju Das
@ 2024-02-26 19:50 ` Geert Uytterhoeven
2024-02-26 19:57 ` Biju Das
2 siblings, 1 reply; 6+ messages in thread
From: Geert Uytterhoeven @ 2024-02-26 19:50 UTC (permalink / raw)
To: Biju Das
Cc: Rob Herring, Krzysztof Kozlowski, Conor Dooley,
Geert Uytterhoeven, Magnus Damm, linux-renesas-soc, devicetree,
Prabhakar Mahadev Lad, Biju Das
Hi Biju,
On Mon, Feb 26, 2024 at 8:47 PM Biju Das <biju.das.jz@bp.renesas.com> wrote:
> This patch series aims to enable DA9062 PMIC and built-in RTC, GPIO and
> ONKEY modules on the RZ/{G2UL,Five} SMARC EVK development boards.
Thanks for your series!
> Biju Das (2):
> arm64: dts: renesas: rzg2ul-smarc: Enable PMIC and built-in RTC, GPIO
> and ONKEY
> arm64: dts: renesas: rzg2ul-smarc: [DO NOT APPLY] Add PMIC IRQ
> property
Why "[DO NOT APPLY]"?
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
^ permalink raw reply [flat|nested] 6+ messages in thread
* RE: [PATCH v2 0/2] Enable DA9062 PMIC and built-in RTC, GPIO and ONKEY
2024-02-26 19:50 ` [PATCH v2 0/2] Enable DA9062 PMIC and built-in RTC, GPIO and ONKEY Geert Uytterhoeven
@ 2024-02-26 19:57 ` Biju Das
0 siblings, 0 replies; 6+ messages in thread
From: Biju Das @ 2024-02-26 19:57 UTC (permalink / raw)
To: Geert Uytterhoeven
Cc: Rob Herring, Krzysztof Kozlowski, Conor Dooley,
Geert Uytterhoeven, Magnus Damm,
linux-renesas-soc@vger.kernel.org, devicetree@vger.kernel.org,
Prabhakar Mahadev Lad, biju.das.au
Hi Geert,
> -----Original Message-----
> From: Geert Uytterhoeven <geert@linux-m68k.org>
> Sent: Monday, February 26, 2024 7:51 PM
> Subject: Re: [PATCH v2 0/2] Enable DA9062 PMIC and built-in RTC, GPIO and
> ONKEY
>
> Hi Biju,
>
> On Mon, Feb 26, 2024 at 8:47 PM Biju Das <biju.das.jz@bp.renesas.com>
> wrote:
> > This patch series aims to enable DA9062 PMIC and built-in RTC, GPIO
> > and ONKEY modules on the RZ/{G2UL,Five} SMARC EVK development boards.
>
> Thanks for your series!
>
>
> > Biju Das (2):
> > arm64: dts: renesas: rzg2ul-smarc: Enable PMIC and built-in RTC, GPIO
> > and ONKEY
> > arm64: dts: renesas: rzg2ul-smarc: [DO NOT APPLY] Add PMIC IRQ
> > property
>
> Why "[DO NOT APPLY]"?
By default PMIC IRQ is not populated on SMARC EVK's. We need to wire
the PMIC IRQ. Currently I wired PMIC IRQ's to one of the PMOD pins
to test RTC alarm and Onkey.
Note: RTC has already polling and IRQ support whereas onkey has only
IRQ support. There is a patch for supporting polling mode[1]
[1] https://patchwork.kernel.org/project/linux-renesas-soc/list/?series=819871
Cheers,
Biju
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH v2 1/2] arm64: dts: renesas: rzg2ul-smarc: Enable PMIC and built-in RTC, GPIO and ONKEY
2024-02-26 19:47 ` [PATCH v2 1/2] arm64: dts: renesas: rzg2ul-smarc: Enable " Biju Das
@ 2024-02-27 14:16 ` Geert Uytterhoeven
0 siblings, 0 replies; 6+ messages in thread
From: Geert Uytterhoeven @ 2024-02-27 14:16 UTC (permalink / raw)
To: Biju Das
Cc: Rob Herring, Krzysztof Kozlowski, Conor Dooley,
Geert Uytterhoeven, Magnus Damm, linux-renesas-soc, devicetree,
Prabhakar Mahadev Lad, Biju Das
Hi Biju,
On Mon, Feb 26, 2024 at 8:47 PM Biju Das <biju.das.jz@bp.renesas.com> wrote:
> Enable PMIC DA9062 and the built-in RTC, GPIO and ONKEY modules on the
> RZ/{G2UL,Five} SMARC EVK development boards.
>
> Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com>
> ---
> v1->v2:
> * Dropped disabled status from gpio and onkey nodes.
> * Added gpio hog nodes.
Thanks for the update!
> --- a/arch/arm64/boot/dts/renesas/rzg2ul-smarc.dtsi
> +++ b/arch/arm64/boot/dts/renesas/rzg2ul-smarc.dtsi
> @@ -5,6 +5,7 @@
> * Copyright (C) 2022 Renesas Electronics Corp.
> */
>
> +#include <dt-bindings/gpio/gpio.h>
Yep, we need this...
> #include "rzg2ul-smarc-pinfunction.dtsi"
> #include "rz-smarc-common.dtsi"
>
> @@ -23,6 +24,63 @@ &cpu_dai {
> &i2c0 {
> clock-frequency = <400000>;
>
> + da9062: pmic@58 {
> + compatible = "dlg,da9062";
> + reg = <0x58>;
> + gpio-controller;
> + #gpio-cells = <2>;
> +
> + gpio {
> + compatible = "dlg,da9062-gpio";
> + };
> +
> + onkey {
> + compatible = "dlg,da9062-onkey";
> + };
> +
> + pmic-good-hog {
> + gpio-hog;
> + gpios = <4 0>;
... so this can be replaced by <4 GPIO_ACTIVE_HIGH> ;-)
> + output-high;
> + line-name = "PMIC_PGOOD";
> + };
Same for the other gpios.
Anyway, LGTM
Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
i.e. will queue in renesas-devel for v6.10, with s/0/GPIO_ACTIVE_HIGH/.
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
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2024-02-27 14:17 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-02-26 19:47 [PATCH v2 0/2] Enable DA9062 PMIC and built-in RTC, GPIO and ONKEY Biju Das
2024-02-26 19:47 ` [PATCH v2 1/2] arm64: dts: renesas: rzg2ul-smarc: Enable " Biju Das
2024-02-27 14:16 ` Geert Uytterhoeven
2024-02-26 19:47 ` [PATCH v2 2/2] arm64: dts: renesas: rzg2ul-smarc: [DO NOT APPLY] Add PMIC IRQ property Biju Das
2024-02-26 19:50 ` [PATCH v2 0/2] Enable DA9062 PMIC and built-in RTC, GPIO and ONKEY Geert Uytterhoeven
2024-02-26 19:57 ` Biju Das
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).