diff mbox series

[v2,2/3] arm64: dts: meson-g12b-odroid-n2: Disable virtual RTC driver

Message ID 20200817102122.434-3-linux.amoon@gmail.com (mailing list archive)
State New, archived
Headers show
Series Enable RTC on Odroid N2 | expand

Commit Message

Anand Moon Aug. 17, 2020, 10:21 a.m. UTC
Disable virtual RTC node on Odroid N2,
since RTC PCF8563 support rtc wakeup.

[    7.171149] meson-vrtc ff8000a8.rtc: registered as rtc0
[    7.182875] meson-vrtc ff8000a8.rtc: setting system clock to 1970-01-01T00:00:07 UTC (7)

Cc: Neil Armstrong <narmstrong@baylibre.com>
Cc: Kevin Hilman <khilman@baylibre.com>
Signed-off-by: Anand Moon <linux.amoon@gmail.com>
---
Changes v2
--Fix the subject and commit message.
---
 arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dts | 4 ++++
 1 file changed, 4 insertions(+)

Comments

Jerome Brunet Aug. 18, 2020, 7:45 a.m. UTC | #1
On Mon 17 Aug 2020 at 12:21, Anand Moon <linux.amoon@gmail.com> wrote:

> Disable virtual RTC node on Odroid N2,
> since RTC PCF8563 support rtc wakeup.
>
> [    7.171149] meson-vrtc ff8000a8.rtc: registered as rtc0
> [    7.182875] meson-vrtc ff8000a8.rtc: setting system clock to 1970-01-01T00:00:07 UTC (7)
>

Maybe I'm missing something but why should disable this ?
Can't the 2 RTCs co-exist ?

> Cc: Neil Armstrong <narmstrong@baylibre.com>
> Cc: Kevin Hilman <khilman@baylibre.com>
> Signed-off-by: Anand Moon <linux.amoon@gmail.com>
> ---
> Changes v2
> --Fix the subject and commit message.
> ---
>  arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dts | 4 ++++
>  1 file changed, 4 insertions(+)
>
> diff --git a/arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dts b/arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dts
> index f08ae1b337ad..7fb952a2a35e 100644
> --- a/arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dts
> +++ b/arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dts
> @@ -642,3 +642,7 @@ &usb2_phy1 {
>  	/* Enable the hub which is connected to this port */
>  	phy-supply = <&hub_5v>;
>  };
> +
> +&vrtc {
> +	status = "disabled";
> +};
Christian Hewitt Aug. 18, 2020, 7:51 a.m. UTC | #2
> On 18 Aug 2020, at 11:45 am, Jerome Brunet <jbrunet@baylibre.com> wrote:
> 
> 
> On Mon 17 Aug 2020 at 12:21, Anand Moon <linux.amoon@gmail.com> wrote:
> 
>> Disable virtual RTC node on Odroid N2,
>> since RTC PCF8563 support rtc wakeup.
>> 
>> [    7.171149] meson-vrtc ff8000a8.rtc: registered as rtc0
>> [    7.182875] meson-vrtc ff8000a8.rtc: setting system clock to 1970-01-01T00:00:07 UTC (7)
>> 
> 
> Maybe I'm missing something but why should disable this ?
> Can't the 2 RTCs co-exist ?

aliases {
	serial0 = &uart_AO;
	ethernet0 = &ethmac;
	rtc1 = &vrtc;
};

^ adding this alias moves vrtc to /dev/rtc1 allowing the on-board rtc to
assume /dev/rtc0 which scripts/users and HOWTO guides assume to be a
real clock device. Tested and working fine with my own experiments with
enabling rtc on a bunch of G12B/SM1 boards.

Christian
Anand Moon Aug. 18, 2020, 8:15 a.m. UTC | #3
Hi Christian and Jerome,

Thanks for the review comments..

On Tue, 18 Aug 2020 at 13:21, Christian Hewitt
<christianshewitt@gmail.com> wrote:
>
>
>
> > On 18 Aug 2020, at 11:45 am, Jerome Brunet <jbrunet@baylibre.com> wrote:
> >
> >
> > On Mon 17 Aug 2020 at 12:21, Anand Moon <linux.amoon@gmail.com> wrote:
> >
> >> Disable virtual RTC node on Odroid N2,
> >> since RTC PCF8563 support rtc wakeup.
> >>
> >> [    7.171149] meson-vrtc ff8000a8.rtc: registered as rtc0
> >> [    7.182875] meson-vrtc ff8000a8.rtc: setting system clock to 1970-01-01T00:00:07 UTC (7)
> >>
> >
> > Maybe I'm missing something but why should disable this ?
> > Can't the 2 RTCs co-exist ?
>
> aliases {
>         serial0 = &uart_AO;
>         ethernet0 = &ethmac;
>         rtc1 = &vrtc;
> };
>
> ^ adding this alias moves vrtc to /dev/rtc1 allowing the on-board rtc to
> assume /dev/rtc0 which scripts/users and HOWTO guides assume to be a
> real clock device. Tested and working fine with my own experiments with
> enabling rtc on a bunch of G12B/SM1 boards.
>
> Christian

I will drop this patch and add the alias in the next version.

-Anand
diff mbox series

Patch

diff --git a/arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dts b/arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dts
index f08ae1b337ad..7fb952a2a35e 100644
--- a/arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dts
+++ b/arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dts
@@ -642,3 +642,7 @@  &usb2_phy1 {
 	/* Enable the hub which is connected to this port */
 	phy-supply = <&hub_5v>;
 };
+
+&vrtc {
+	status = "disabled";
+};