linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/1] arm64: dts: meson: g12b: odroid-n2: Add I2C RTC device node
@ 2021-02-02 17:08 Alexander Stein
  2021-02-02 17:29 ` Neil Armstrong
  0 siblings, 1 reply; 5+ messages in thread
From: Alexander Stein @ 2021-02-02 17:08 UTC (permalink / raw)
  To: Rob Herring, Kevin Hilman, Neil Armstrong, Jerome Brunet,
	Martin Blumenstingl
  Cc: Alexander Stein, devicetree, linux-arm-kernel, linux-amlogic

This is taken from the downstream kernel and works out of the box.
Similar to other boards, this RTC should be the primary one, rather than
the internal one.

A wakeup alarm by writing to /sys/class/rtc/rtc0/wakealarm works as well.

Signed-off-by: Alexander Stein <alexander.stein@mailbox.org>
---
 .../boot/dts/amlogic/meson-g12b-odroid-n2.dtsi     | 14 ++++++++++++++
 1 file changed, 14 insertions(+)

diff --git a/arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dtsi b/arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dtsi
index 050862cd0996..10edc7ce5e84 100644
--- a/arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dtsi
+++ b/arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dtsi
@@ -13,6 +13,8 @@ / {
 	aliases {
 		serial0 = &uart_AO;
 		ethernet0 = &ethmac;
+		rtc0 = &rtc;
+		rtc1 = &vrtc;
 	};
 
 	dioo2133: audio-amplifier-0 {
@@ -471,6 +473,18 @@ hdmi_tx_tmds_out: endpoint {
 	};
 };
 
+&i2c3 {
+	status = "okay";
+	pinctrl-0 = <&i2c3_sda_a_pins>, <&i2c3_sck_a_pins>;
+	pinctrl-names = "default";
+
+	rtc: rtc@51 {
+		compatible = "nxp,pcf8563";
+		reg = <0x51>;
+		wakeup-source;
+	};
+};
+
 &ir {
 	status = "okay";
 	pinctrl-0 = <&remote_input_ao_pins>;
-- 
2.30.0


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

end of thread, other threads:[~2021-02-03 16:48 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-02-02 17:08 [PATCH 1/1] arm64: dts: meson: g12b: odroid-n2: Add I2C RTC device node Alexander Stein
2021-02-02 17:29 ` Neil Armstrong
2021-02-02 19:16   ` Alexander Stein
2021-02-02 23:10   ` Alexander Stein
2021-02-03 16:47   ` Alexander Stein

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