devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/2] arm64: dts: renesas: r9a09g047e57-smarc: Add I2C2 and PMIC support
@ 2025-03-29 12:12 John Madieu
  2025-03-29 12:12 ` [PATCH 1/2] arm64: dts: renesas: rzg3e-smarc-som: Add I2C2 device pincontrol John Madieu
  2025-03-29 12:12 ` [PATCH 2/2] arm64: dts: renesas: rzg3e-smarc-som: add raa215300 pmic support John Madieu
  0 siblings, 2 replies; 5+ messages in thread
From: John Madieu @ 2025-03-29 12:12 UTC (permalink / raw)
  To: john.madieu.xa, conor+dt, geert+renesas, krzk+dt, magnus.damm,
	robh
  Cc: biju.das.jz, devicetree, john.madieu, linux-kernel,
	linux-renesas-soc

Hi all,

This patch series adds initial support for the Renesas RAA215300 PMIC
(CONFIG_REGULATOR_RAA215300 kernel symbol) on the RZ/G3E SMARC EVK board.
To enable PMIC communication, the I2C2 pinctrl configuration is added first,
followed by the RAA215300 node.

Patch 1 adds the pin control configuration for I2C2 to enable communication
with the PMIC over the appropriate bus.

Patch 2 introduces the device tree node for the RAA215300 PMIC, connected via
I2C2. This will indirectly enable support for the built-in RTC chip, compatible
with the ISL1208 (CONFIG_RTC_DRV_ISL1208 symbol needs to be enabled for support)

RTC and its alarm (via wakealarm sysfs file) have been tested and validated on
RZ/G3E SMARC EVK board.

This patch series depends upon [1].
Feedback is welcome.

[1] https://patchwork.kernel.org/project/linux-renesas-soc/patch/20250207113653.21641-13-biju.das.jz@bp.renesas.com/

John Madieu (2):
  arm64: dts: renesas: rzg3e-smarc-som: Add I2C2 device pincontrol
  arm64: dts: renesas: rzg3e-smarc-som: add raa215300 pmic support

 .../boot/dts/renesas/rzg3e-smarc-som.dtsi     | 38 +++++++++++++++++++
 1 file changed, 38 insertions(+)

-- 
2.25.1


^ permalink raw reply	[flat|nested] 5+ messages in thread

* [PATCH 1/2] arm64: dts: renesas: rzg3e-smarc-som: Add I2C2 device pincontrol
  2025-03-29 12:12 [PATCH 0/2] arm64: dts: renesas: r9a09g047e57-smarc: Add I2C2 and PMIC support John Madieu
@ 2025-03-29 12:12 ` John Madieu
  2025-04-15 12:19   ` Geert Uytterhoeven
  2025-03-29 12:12 ` [PATCH 2/2] arm64: dts: renesas: rzg3e-smarc-som: add raa215300 pmic support John Madieu
  1 sibling, 1 reply; 5+ messages in thread
From: John Madieu @ 2025-03-29 12:12 UTC (permalink / raw)
  To: john.madieu.xa, conor+dt, geert+renesas, krzk+dt, magnus.damm,
	robh
  Cc: biju.das.jz, devicetree, john.madieu, linux-kernel,
	linux-renesas-soc

Add device node for i2c2 pincontrol. Also enable i2c2 device node on dtsi
with 1MHz clock frequency as it is connected to PMIC raa215300 on RZ/G3E
SoM.

Signed-off-by: John Madieu <john.madieu.xa@bp.renesas.com>
---
 arch/arm64/boot/dts/renesas/rzg3e-smarc-som.dtsi | 13 +++++++++++++
 1 file changed, 13 insertions(+)

diff --git a/arch/arm64/boot/dts/renesas/rzg3e-smarc-som.dtsi b/arch/arm64/boot/dts/renesas/rzg3e-smarc-som.dtsi
index 72b42a81bcf3..ca56a9edda2e 100644
--- a/arch/arm64/boot/dts/renesas/rzg3e-smarc-som.dtsi
+++ b/arch/arm64/boot/dts/renesas/rzg3e-smarc-som.dtsi
@@ -18,6 +18,7 @@ / {
 	compatible = "renesas,rzg3e-smarcm", "renesas,r9a09g047e57", "renesas,r9a09g047";
 
 	aliases {
+		i2c2 = &i2c2;
 		mmc0 = &sdhi0;
 		mmc2 = &sdhi2;
 	};
@@ -51,7 +52,19 @@ &audio_extal_clk {
 	clock-frequency = <48000000>;
 };
 
+&i2c2 {
+	pinctrl-0 = <&i2c2_pins>;
+	pinctrl-names = "default";
+	clock-frequency = <1000000>;
+	status = "okay";
+};
+
 &pinctrl {
+	i2c2_pins: i2c {
+		pinmux = <RZG3E_PORT_PINMUX(3, 4, 1)>, /* SCL2 */
+			 <RZG3E_PORT_PINMUX(3, 5, 1)>; /* SDA2 */
+	};
+
 	sdhi0_emmc_pins: sd0-emmc {
 		sd0-ctrl {
 			pins = "SD0CLK", "SD0CMD";
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [PATCH 2/2] arm64: dts: renesas: rzg3e-smarc-som: add raa215300 pmic support
  2025-03-29 12:12 [PATCH 0/2] arm64: dts: renesas: r9a09g047e57-smarc: Add I2C2 and PMIC support John Madieu
  2025-03-29 12:12 ` [PATCH 1/2] arm64: dts: renesas: rzg3e-smarc-som: Add I2C2 device pincontrol John Madieu
@ 2025-03-29 12:12 ` John Madieu
  2025-04-15 12:20   ` Geert Uytterhoeven
  1 sibling, 1 reply; 5+ messages in thread
From: John Madieu @ 2025-03-29 12:12 UTC (permalink / raw)
  To: john.madieu.xa, conor+dt, geert+renesas, krzk+dt, magnus.damm,
	robh
  Cc: biju.das.jz, devicetree, john.madieu, linux-kernel,
	linux-renesas-soc

Enable raa215300 pmic and built-in rtc support on RZ/G3E SoM module
Also add related clock and interrupt signals.

Signed-off-by: John Madieu <john.madieu.xa@bp.renesas.com>
---
 .../boot/dts/renesas/rzg3e-smarc-som.dtsi     | 25 +++++++++++++++++++
 1 file changed, 25 insertions(+)

diff --git a/arch/arm64/boot/dts/renesas/rzg3e-smarc-som.dtsi b/arch/arm64/boot/dts/renesas/rzg3e-smarc-som.dtsi
index ca56a9edda2e..cc0a477d6f61 100644
--- a/arch/arm64/boot/dts/renesas/rzg3e-smarc-som.dtsi
+++ b/arch/arm64/boot/dts/renesas/rzg3e-smarc-som.dtsi
@@ -46,6 +46,13 @@ reg_3p3v: regulator-3p3v {
 		regulator-boot-on;
 		regulator-always-on;
 	};
+
+	/* 32.768kHz crystal */
+	x3: x3-clock {
+		compatible = "fixed-clock";
+		#clock-cells = <0>;
+		clock-frequency = <32768>;
+	};
 };
 
 &audio_extal_clk {
@@ -57,6 +64,19 @@ &i2c2 {
 	pinctrl-names = "default";
 	clock-frequency = <1000000>;
 	status = "okay";
+
+	raa215300: pmic@12 {
+		compatible = "renesas,raa215300";
+		reg = <0x12>, <0x6f>;
+		reg-names = "main", "rtc";
+		clocks = <&x3>;
+		clock-names = "xin";
+
+		pinctrl-0 = <&rtc_irq_pin>;
+		pinctrl-names = "default";
+
+		interrupts-extended = <&pinctrl RZG3E_GPIO(S, 1) IRQ_TYPE_EDGE_FALLING>;
+	};
 };
 
 &pinctrl {
@@ -65,6 +85,11 @@ i2c2_pins: i2c {
 			 <RZG3E_PORT_PINMUX(3, 5, 1)>; /* SDA2 */
 	};
 
+	rtc_irq_pin: rtc-irq {
+		pins = "PS1";
+		bias-pull-up;
+	};
+
 	sdhi0_emmc_pins: sd0-emmc {
 		sd0-ctrl {
 			pins = "SD0CLK", "SD0CMD";
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH 1/2] arm64: dts: renesas: rzg3e-smarc-som: Add I2C2 device pincontrol
  2025-03-29 12:12 ` [PATCH 1/2] arm64: dts: renesas: rzg3e-smarc-som: Add I2C2 device pincontrol John Madieu
@ 2025-04-15 12:19   ` Geert Uytterhoeven
  0 siblings, 0 replies; 5+ messages in thread
From: Geert Uytterhoeven @ 2025-04-15 12:19 UTC (permalink / raw)
  To: John Madieu
  Cc: conor+dt, krzk+dt, magnus.damm, robh, biju.das.jz, devicetree,
	john.madieu, linux-kernel, linux-renesas-soc

On Sat, 29 Mar 2025 at 13:13, John Madieu <john.madieu.xa@bp.renesas.com> wrote:
> Add device node for i2c2 pincontrol. Also enable i2c2 device node on dtsi
> with 1MHz clock frequency as it is connected to PMIC raa215300 on RZ/G3E
> SoM.
>
> Signed-off-by: John Madieu <john.madieu.xa@bp.renesas.com>

Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
i.e. will queue in renesas-devel for v6.16.

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] 5+ messages in thread

* Re: [PATCH 2/2] arm64: dts: renesas: rzg3e-smarc-som: add raa215300 pmic support
  2025-03-29 12:12 ` [PATCH 2/2] arm64: dts: renesas: rzg3e-smarc-som: add raa215300 pmic support John Madieu
@ 2025-04-15 12:20   ` Geert Uytterhoeven
  0 siblings, 0 replies; 5+ messages in thread
From: Geert Uytterhoeven @ 2025-04-15 12:20 UTC (permalink / raw)
  To: John Madieu
  Cc: conor+dt, krzk+dt, magnus.damm, robh, biju.das.jz, devicetree,
	john.madieu, linux-kernel, linux-renesas-soc

On Sat, 29 Mar 2025 at 13:13, John Madieu <john.madieu.xa@bp.renesas.com> wrote:
> Enable raa215300 pmic and built-in rtc support on RZ/G3E SoM module
> Also add related clock and interrupt signals.
>
> Signed-off-by: John Madieu <john.madieu.xa@bp.renesas.com>

Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
i.e. will queue in renesas-devel for v6.16.

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] 5+ messages in thread

end of thread, other threads:[~2025-04-15 12:20 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-03-29 12:12 [PATCH 0/2] arm64: dts: renesas: r9a09g047e57-smarc: Add I2C2 and PMIC support John Madieu
2025-03-29 12:12 ` [PATCH 1/2] arm64: dts: renesas: rzg3e-smarc-som: Add I2C2 device pincontrol John Madieu
2025-04-15 12:19   ` Geert Uytterhoeven
2025-03-29 12:12 ` [PATCH 2/2] arm64: dts: renesas: rzg3e-smarc-som: add raa215300 pmic support John Madieu
2025-04-15 12:20   ` Geert Uytterhoeven

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).