* [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 = ðmac;
+ 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-amlogic mailing list
linux-amlogic@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-amlogic
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH 1/1] arm64: dts: meson: g12b: odroid-n2: Add I2C RTC device node
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
` (2 more replies)
0 siblings, 3 replies; 5+ messages in thread
From: Neil Armstrong @ 2021-02-02 17:29 UTC (permalink / raw)
To: Alexander Stein, Rob Herring, Kevin Hilman, Jerome Brunet,
Martin Blumenstingl
Cc: devicetree, linux-arm-kernel, linux-amlogic
Hi,
On 02/02/2021 18:08, Alexander Stein wrote:
> This is taken from the downstream kernel and works out of the box.
Please keep authorship of the downstream commit.
> 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 = ðmac;
> + 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>;
Interrupt line is missing, Anand added:
+» » /*·RTC·INT·*/
+» » interrupts·=·<GPIOAO_7·IRQ_TYPE_LEVEL_LOW>;
+» » interrupt-parent·=·<&gpio_intc>;
> + wakeup-source;
> + };
> +};
> +
> &ir {
> status = "okay";
> pinctrl-0 = <&remote_input_ao_pins>;
>
Neil
_______________________________________________
linux-amlogic mailing list
linux-amlogic@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-amlogic
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH 1/1] arm64: dts: meson: g12b: odroid-n2: Add I2C RTC device node
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
2 siblings, 0 replies; 5+ messages in thread
From: Alexander Stein @ 2021-02-02 19:16 UTC (permalink / raw)
To: Rob Herring, Kevin Hilman, Jerome Brunet, Martin Blumenstingl,
Neil Armstrong
Cc: devicetree, linux-arm-kernel, linux-amlogic
Hi,
On Tuesday, February 2, 2021, 6:29:48 PM CET Neil Armstrong wrote:
> Hi,
>
> On 02/02/2021 18:08, Alexander Stein wrote:
> > This is taken from the downstream kernel and works out of the box.
>
> Please keep authorship of the downstream commit.
Sure, will do.
> > +&i2c3 {
> > + status = "okay";
> > + pinctrl-0 = <&i2c3_sda_a_pins>, <&i2c3_sck_a_pins>;
> > + pinctrl-names = "default";
> > +
> > + rtc: rtc@51 {
> > + compatible = "nxp,pcf8563";
> > + reg = <0x51>;
>
> Interrupt line is missing, Anand added:
> +» » /*·RTC·INT·*/
> +» » interrupts·=·<GPIOAO_7·IRQ_TYPE_LEVEL_LOW>;
> +» » interrupt-parent·=·<&gpio_intc>;
>
> > + wakeup-source;
> > + };
> > +};
Eh, where did you get that? I'm talking about this commit https://github.com/
hardkernel/linux/commit/b2e22de15e55bb070a2fd45150a6d3e0179ed0e6
There is no interrupt line, although I understand it's missing.
Best regards,
Alexander
_______________________________________________
linux-amlogic mailing list
linux-amlogic@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-amlogic
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH 1/1] arm64: dts: meson: g12b: odroid-n2: Add I2C RTC device node
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
2 siblings, 0 replies; 5+ messages in thread
From: Alexander Stein @ 2021-02-02 23:10 UTC (permalink / raw)
To: Rob Herring, Kevin Hilman, Jerome Brunet, Martin Blumenstingl,
Neil Armstrong
Cc: devicetree, linux-arm-kernel, linux-amlogic
Nevermind,
I just saw that an identical patch has already been accepted, but is not in
Linus's tree yet.
See https://patchwork.kernel.org/project/linux-amlogic/patch/20210111135831.2218-1-christianshewitt@gmail.com/
Sorry for the noise and best regards,
Alexander
_______________________________________________
linux-amlogic mailing list
linux-amlogic@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-amlogic
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH 1/1] arm64: dts: meson: g12b: odroid-n2: Add I2C RTC device node
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
2 siblings, 0 replies; 5+ messages in thread
From: Alexander Stein @ 2021-02-03 16:47 UTC (permalink / raw)
To: Rob Herring, Kevin Hilman, Jerome Brunet, Martin Blumenstingl,
Neil Armstrong
Cc: devicetree, linux-arm-kernel, linux-amlogic
Nevermind,
I just saw that an identical patch has already been accepted, but is not in
Linus's tree yet.
See https://patchwork.kernel.org/project/linux-amlogic/patch/20210111135831.2218-1-christianshewitt@gmail.com/
Sorry for the noise and best regards,
Alexander
_______________________________________________
linux-amlogic mailing list
linux-amlogic@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-amlogic
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2021-02-03 16:47 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).