mail archive of the barebox mailing list
 help / color / mirror / Atom feed
* [PATCH v2] ARM: dts: imx8mp-skov: describe RTC
@ 2024-07-01  7:52 Ahmad Fatoum
  2024-07-01 13:36 ` Sascha Hauer
  0 siblings, 1 reply; 2+ messages in thread
From: Ahmad Fatoum @ 2024-07-01  7:52 UTC (permalink / raw)
  To: barebox; +Cc: Ahmad Fatoum

The kernel device trees for the platform already describe the RTC, so
let's do the same in barebox as well.

Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
---
v1 -> v2:
  - fix pinmux broken by last-minute I2C GPIO change..
---
 arch/arm/dts/imx8mp-skov.dts | 40 ++++++++++++++++++++++++++++++++++++
 1 file changed, 40 insertions(+)

diff --git a/arch/arm/dts/imx8mp-skov.dts b/arch/arm/dts/imx8mp-skov.dts
index 3761da89cae7..f0a671553ae2 100644
--- a/arch/arm/dts/imx8mp-skov.dts
+++ b/arch/arm/dts/imx8mp-skov.dts
@@ -33,6 +33,7 @@ aliases {
 		ethernet1 = &lan1;
 		ethernet2 = &lan2;
 		state = &state;
+		rtc0 = &i2c_rtc;
 	};
 
 	leds {
@@ -322,6 +323,25 @@ ldo5: LDO5 {
 	};
 };
 
+&i2c3 {
+	clock-frequency = <100000>;
+	pinctrl-names = "default", "gpio";
+	pinctrl-0 = <&pinctrl_i2c3>;
+	pinctrl-1 = <&pinctrl_i2c3_gpio>;
+	scl-gpios = <&gpio5 18 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>;
+	sda-gpios = <&gpio5 19 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>;
+	status = "okay";
+
+	i2c_rtc: rtc@51 {
+		compatible = "nxp,pcf85063tp";
+		reg = <0x51>;
+		pinctrl-names = "default";
+		pinctrl-0 = <&pinctrl_rtc>;
+		interrupts-extended = <&gpio4 31 IRQ_TYPE_EDGE_FALLING>;
+		quartz-load-femtofarads = <12500>;
+	};
+};
+
 &i2c4 {
 	clock-frequency = <100000>;
 	pinctrl-names = "default";
@@ -493,6 +513,20 @@ MX8MP_IOMUXC_I2C1_SDA__I2C1_SDA					0x400001c2
 		>;
 	};
 
+	pinctrl_i2c3: i2c3grp {
+		fsl,pins = <
+			MX8MP_IOMUXC_I2C3_SCL__I2C3_SCL				0x400001c2
+			MX8MP_IOMUXC_I2C3_SDA__I2C3_SDA				0x400001c2
+		>;
+	};
+
+	pinctrl_i2c3_gpio: i2c3gpiogrp {
+		fsl,pins = <
+			MX8MP_IOMUXC_I2C3_SCL__GPIO5_IO18				0x400001c2
+			MX8MP_IOMUXC_I2C3_SDA__GPIO5_IO19				0x400001c2
+		>;
+	};
+
 	pinctrl_i2c4: i2c4grp {
 		fsl,pins = <
 			MX8MP_IOMUXC_I2C4_SCL__I2C4_SCL					0x400001c3
@@ -500,6 +534,12 @@ MX8MP_IOMUXC_I2C4_SDA__I2C4_SDA					0x400001c3
 		>;
 	};
 
+	pinctrl_rtc: rtcgrp {
+		fsl,pins = <
+			MX8MP_IOMUXC_SAI3_TXFS__GPIO4_IO31			0x41
+		>;
+	};
+
 	pinctrl_switch: switchgrp {
 		fsl,pins = <
 			MX8MP_IOMUXC_SAI3_TXD__GPIO5_IO01				0x41
-- 
2.39.2




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

* Re: [PATCH v2] ARM: dts: imx8mp-skov: describe RTC
  2024-07-01  7:52 [PATCH v2] ARM: dts: imx8mp-skov: describe RTC Ahmad Fatoum
@ 2024-07-01 13:36 ` Sascha Hauer
  0 siblings, 0 replies; 2+ messages in thread
From: Sascha Hauer @ 2024-07-01 13:36 UTC (permalink / raw)
  To: barebox, Ahmad Fatoum


On Mon, 01 Jul 2024 09:52:32 +0200, Ahmad Fatoum wrote:
> The kernel device trees for the platform already describe the RTC, so
> let's do the same in barebox as well.
> 
> 

Applied, thanks!

[1/1] ARM: dts: imx8mp-skov: describe RTC
      https://git.pengutronix.de/cgit/barebox/commit/?id=0f914db8f970 (link may not be stable)

Best regards,
-- 
Sascha Hauer <s.hauer@pengutronix.de>




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

end of thread, other threads:[~2024-07-01 13:37 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-07-01  7:52 [PATCH v2] ARM: dts: imx8mp-skov: describe RTC Ahmad Fatoum
2024-07-01 13:36 ` Sascha Hauer

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox