From: Andre Przywara <andre.przywara@arm.com> To: "Jernej Škrabec" <jernej.skrabec@gmail.com> Cc: Maxime Ripard <mripard@kernel.org>, Chen-Yu Tsai <wens@csie.org>, Rob Herring <robh@kernel.org>, Icenowy Zheng <icenowy@aosc.io>, Samuel Holland <samuel@sholland.org>, Ondrej Jirman <megous@megous.com>, linux-arm-kernel@lists.infradead.org, linux-sunxi@googlegroups.com, linux-sunxi@lists.linux.dev, linux-kernel@vger.kernel.org, Alessandro Zummo <a.zummo@towertech.it>, Alexandre Belloni <alexandre.belloni@bootlin.com>, linux-rtc@vger.kernel.org Subject: Re: [PATCH v6 05/17] rtc: sun6i: Add Allwinner H616 support Date: Sun, 23 May 2021 01:06:43 +0100 [thread overview] Message-ID: <20210523010643.7fdfd419@slackpad.fritz.box> (raw) In-Reply-To: <10265315.EKgO2cQaHd@kista> On Sat, 22 May 2021 09:29:26 +0200 Jernej Škrabec <jernej.skrabec@gmail.com> wrote: Hi, > Dne sreda, 19. maj 2021 ob 12:41:40 CEST je Andre Przywara napisal(a): > > The H616 RTC changes its day storage to the newly introduced linear day > > scheme, so pair the new compatible string with this feature flag. > > So far the clock parts seem to be the same as the H6, so combine the > > compatible string with the existing H6 support bits. > > There is one more difference - H616 alarm value is now broken down to days, > hours, minutes and seconds. That's a good point, that actually requires adjusting the driver in this respect as well. And contrary to what the manual says ("Counter Register will down count to zero"), and the previous RTCs do, those alarm registers now need to be set to the actual wakeup time, not the time left before wakeup. Will fix the driver accordingly. Thanks for the heads up! Cheers, Andre > > Best regards, > Jernej > > > > > Signed-off-by: Andre Przywara <andre.przywara@arm.com> > > --- > > drivers/rtc/rtc-sun6i.c | 4 ++++ > > 1 file changed, 4 insertions(+) > > > > diff --git a/drivers/rtc/rtc-sun6i.c b/drivers/rtc/rtc-sun6i.c > > index 0228e9dfd969..ec0cd0ee539a 100644 > > --- a/drivers/rtc/rtc-sun6i.c > > +++ b/drivers/rtc/rtc-sun6i.c > > @@ -382,6 +382,8 @@ static void __init sun50i_h6_rtc_clk_init(struct > device_node *node) > > } > > CLK_OF_DECLARE_DRIVER(sun50i_h6_rtc_clk, "allwinner,sun50i-h6-rtc", > > sun50i_h6_rtc_clk_init); > > +CLK_OF_DECLARE_DRIVER(sun50i_h616_rtc_clk, "allwinner,sun50i-h616-rtc", > > + sun50i_h6_rtc_clk_init); > > > > /* > > * The R40 user manual is self-conflicting on whether the prescaler is > > @@ -773,6 +775,8 @@ static const struct of_device_id sun6i_rtc_dt_ids[] = { > > { .compatible = "allwinner,sun8i-v3-rtc" }, > > { .compatible = "allwinner,sun50i-h5-rtc" }, > > { .compatible = "allwinner,sun50i-h6-rtc" }, > > + { .compatible = "allwinner,sun50i-h616-rtc", > > + .data = (void *)RTC_LINEAR_DAY }, > > { /* sentinel */ }, > > }; > > MODULE_DEVICE_TABLE(of, sun6i_rtc_dt_ids); > > -- > > 2.17.5 > > > > > >
WARNING: multiple messages have this Message-ID (diff)
From: Andre Przywara <andre.przywara@arm.com> To: "Jernej Škrabec" <jernej.skrabec@gmail.com> Cc: Maxime Ripard <mripard@kernel.org>, Chen-Yu Tsai <wens@csie.org>, Rob Herring <robh@kernel.org>, Icenowy Zheng <icenowy@aosc.io>, Samuel Holland <samuel@sholland.org>, Ondrej Jirman <megous@megous.com>, linux-arm-kernel@lists.infradead.org, linux-sunxi@googlegroups.com, linux-sunxi@lists.linux.dev, linux-kernel@vger.kernel.org, Alessandro Zummo <a.zummo@towertech.it>, Alexandre Belloni <alexandre.belloni@bootlin.com>, linux-rtc@vger.kernel.org Subject: Re: [PATCH v6 05/17] rtc: sun6i: Add Allwinner H616 support Date: Sun, 23 May 2021 01:06:43 +0100 [thread overview] Message-ID: <20210523010643.7fdfd419@slackpad.fritz.box> (raw) In-Reply-To: <10265315.EKgO2cQaHd@kista> On Sat, 22 May 2021 09:29:26 +0200 Jernej Škrabec <jernej.skrabec@gmail.com> wrote: Hi, > Dne sreda, 19. maj 2021 ob 12:41:40 CEST je Andre Przywara napisal(a): > > The H616 RTC changes its day storage to the newly introduced linear day > > scheme, so pair the new compatible string with this feature flag. > > So far the clock parts seem to be the same as the H6, so combine the > > compatible string with the existing H6 support bits. > > There is one more difference - H616 alarm value is now broken down to days, > hours, minutes and seconds. That's a good point, that actually requires adjusting the driver in this respect as well. And contrary to what the manual says ("Counter Register will down count to zero"), and the previous RTCs do, those alarm registers now need to be set to the actual wakeup time, not the time left before wakeup. Will fix the driver accordingly. Thanks for the heads up! Cheers, Andre > > Best regards, > Jernej > > > > > Signed-off-by: Andre Przywara <andre.przywara@arm.com> > > --- > > drivers/rtc/rtc-sun6i.c | 4 ++++ > > 1 file changed, 4 insertions(+) > > > > diff --git a/drivers/rtc/rtc-sun6i.c b/drivers/rtc/rtc-sun6i.c > > index 0228e9dfd969..ec0cd0ee539a 100644 > > --- a/drivers/rtc/rtc-sun6i.c > > +++ b/drivers/rtc/rtc-sun6i.c > > @@ -382,6 +382,8 @@ static void __init sun50i_h6_rtc_clk_init(struct > device_node *node) > > } > > CLK_OF_DECLARE_DRIVER(sun50i_h6_rtc_clk, "allwinner,sun50i-h6-rtc", > > sun50i_h6_rtc_clk_init); > > +CLK_OF_DECLARE_DRIVER(sun50i_h616_rtc_clk, "allwinner,sun50i-h616-rtc", > > + sun50i_h6_rtc_clk_init); > > > > /* > > * The R40 user manual is self-conflicting on whether the prescaler is > > @@ -773,6 +775,8 @@ static const struct of_device_id sun6i_rtc_dt_ids[] = { > > { .compatible = "allwinner,sun8i-v3-rtc" }, > > { .compatible = "allwinner,sun50i-h5-rtc" }, > > { .compatible = "allwinner,sun50i-h6-rtc" }, > > + { .compatible = "allwinner,sun50i-h616-rtc", > > + .data = (void *)RTC_LINEAR_DAY }, > > { /* sentinel */ }, > > }; > > MODULE_DEVICE_TABLE(of, sun6i_rtc_dt_ids); > > -- > > 2.17.5 > > > > > > _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
next prev parent reply other threads:[~2021-05-23 0:06 UTC|newest] Thread overview: 104+ messages / expand[flat|nested] mbox.gz Atom feed top 2021-05-19 10:41 [PATCH v6 00/17] arm64: sunxi: Initial Allwinner H616 SoC support Andre Przywara 2021-05-19 10:41 ` Andre Przywara 2021-05-19 10:41 ` [PATCH v6 01/17] dt-bindings: mfd: axp20x: Add AXP305 compatible (plus optional IRQ) Andre Przywara 2021-05-19 10:41 ` Andre Przywara 2021-05-21 1:39 ` Rob Herring 2021-05-21 1:39 ` Rob Herring 2021-05-22 14:46 ` Samuel Holland 2021-05-22 14:46 ` Samuel Holland 2021-05-23 0:01 ` Andre Przywara 2021-05-23 0:01 ` Andre Przywara 2021-05-19 10:41 ` [PATCH v6 02/17] mfd: axp20x: Allow AXP 806 chips without interrupt lines Andre Przywara 2021-05-19 10:41 ` Andre Przywara 2021-05-19 15:01 ` Lee Jones 2021-05-19 15:01 ` Lee Jones 2021-05-19 10:41 ` [PATCH v6 03/17] dt-bindings: rtc: sun6i: Add H616 compatible string Andre Przywara 2021-05-19 10:41 ` Andre Przywara 2021-05-21 1:39 ` Rob Herring 2021-05-21 1:39 ` Rob Herring 2021-05-21 2:37 ` Samuel Holland 2021-05-21 2:37 ` Samuel Holland 2021-06-07 12:59 ` Andre Przywara 2021-06-07 12:59 ` Andre Przywara 2021-06-08 4:23 ` Samuel Holland 2021-06-08 4:23 ` Samuel Holland 2021-06-15 12:24 ` Andre Przywara 2021-06-15 12:24 ` Andre Przywara 2021-06-16 9:07 ` Maxime Ripard 2021-06-16 9:07 ` Maxime Ripard 2021-06-16 11:28 ` Andre Przywara 2021-06-16 11:28 ` Andre Przywara 2021-05-19 10:41 ` [PATCH v6 04/17] rtc: sun6i: Add support for linear day storage Andre Przywara 2021-05-19 10:41 ` Andre Przywara 2021-05-22 7:26 ` Jernej Škrabec 2021-05-22 7:26 ` Jernej Škrabec 2021-05-19 10:41 ` [PATCH v6 05/17] rtc: sun6i: Add Allwinner H616 support Andre Przywara 2021-05-19 10:41 ` Andre Przywara 2021-05-22 7:29 ` Jernej Škrabec 2021-05-22 7:29 ` Jernej Škrabec 2021-05-23 0:06 ` Andre Przywara [this message] 2021-05-23 0:06 ` Andre Przywara 2021-05-19 10:41 ` [PATCH v6 06/17] dt-bindings: net: sun8i-emac: Add H616 compatible string Andre Przywara 2021-05-19 10:41 ` Andre Przywara 2021-05-21 1:40 ` Rob Herring 2021-05-21 1:40 ` Rob Herring 2021-05-19 10:41 ` [PATCH v6 07/17] net: stmmac: dwmac-sun8i: Prepare for second EMAC clock register Andre Przywara 2021-05-19 10:41 ` Andre Przywara 2021-05-19 10:41 ` [PATCH v6 08/17] dt-bindings: usb: Add H616 compatible string Andre Przywara 2021-05-19 10:41 ` Andre Przywara 2021-05-19 10:41 ` Andre Przywara 2021-05-21 1:40 ` Rob Herring 2021-05-21 1:40 ` Rob Herring 2021-05-21 1:40 ` Rob Herring 2021-05-19 10:41 ` [PATCH v6 09/17] dt-bindings: usb: sunxi-musb: " Andre Przywara 2021-05-19 10:41 ` Andre Przywara 2021-05-21 1:40 ` Rob Herring 2021-05-21 1:40 ` Rob Herring 2021-05-19 10:41 ` [PATCH v6 10/17] phy: sun4i-usb: Rework HCI PHY (aka. "pmu_unk1") handling Andre Przywara 2021-05-19 10:41 ` Andre Przywara 2021-05-19 10:41 ` Andre Przywara 2021-05-19 10:41 ` [PATCH v6 11/17] phy: sun4i-usb: Allow reset line to be shared Andre Przywara 2021-05-19 10:41 ` Andre Przywara 2021-05-19 10:41 ` Andre Przywara 2021-05-19 10:41 ` [PATCH v6 12/17] phy: sun4i-usb: Introduce port2 SIDDQ quirk Andre Przywara 2021-05-19 10:41 ` Andre Przywara 2021-05-19 10:41 ` Andre Przywara 2021-05-24 11:59 ` Maxime Ripard 2021-05-24 11:59 ` Maxime Ripard 2021-05-24 11:59 ` Maxime Ripard 2021-05-24 12:51 ` Jernej Škrabec 2021-05-24 12:51 ` Jernej Škrabec 2021-05-24 12:51 ` Jernej Škrabec 2021-05-25 11:29 ` Andre Przywara 2021-05-25 11:29 ` Andre Przywara 2021-05-25 11:29 ` Andre Przywara 2021-06-07 13:22 ` Maxime Ripard 2021-06-07 13:22 ` Maxime Ripard 2021-06-07 13:22 ` Maxime Ripard 2021-06-07 14:17 ` Andre Przywara 2021-06-07 14:17 ` Andre Przywara 2021-06-07 14:17 ` Andre Przywara 2021-06-07 14:26 ` [linux-sunxi] " Chen-Yu Tsai 2021-06-07 14:26 ` Chen-Yu Tsai 2021-06-07 14:26 ` Chen-Yu Tsai 2021-06-07 14:26 ` Chen-Yu Tsai 2021-06-14 0:20 ` Andre Przywara 2021-06-14 0:20 ` Andre Przywara 2021-06-14 0:20 ` Andre Przywara 2021-05-19 10:41 ` [PATCH v6 13/17] phy: sun4i-usb: Add support for the H616 USB PHY Andre Przywara 2021-05-19 10:41 ` Andre Przywara 2021-05-19 10:41 ` Andre Przywara 2021-05-19 10:41 ` [PATCH v6 14/17] arm64: dts: allwinner: Add Allwinner H616 .dtsi file Andre Przywara 2021-05-19 10:41 ` Andre Przywara 2021-05-24 12:02 ` Maxime Ripard 2021-05-24 12:02 ` Maxime Ripard 2021-06-07 12:59 ` Andre Przywara 2021-06-07 12:59 ` Andre Przywara 2021-05-19 10:41 ` [PATCH v6 15/17] dt-bindings: arm: sunxi: Add OrangePi Zero 2 binding Andre Przywara 2021-05-19 10:41 ` Andre Przywara 2021-05-19 10:41 ` [PATCH v6 16/17] arm64: dts: allwinner: h616: Add OrangePi Zero 2 board support Andre Przywara 2021-05-19 10:41 ` Andre Przywara 2021-05-19 10:41 ` [PATCH v6 17/17] arm64: dts: allwinner: h616: Add X96 Mate TV box support Andre Przywara 2021-05-19 10:41 ` Andre Przywara 2021-05-22 7:32 ` Jernej Škrabec 2021-05-22 7:32 ` Jernej Škrabec
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20210523010643.7fdfd419@slackpad.fritz.box \ --to=andre.przywara@arm.com \ --cc=a.zummo@towertech.it \ --cc=alexandre.belloni@bootlin.com \ --cc=icenowy@aosc.io \ --cc=jernej.skrabec@gmail.com \ --cc=linux-arm-kernel@lists.infradead.org \ --cc=linux-kernel@vger.kernel.org \ --cc=linux-rtc@vger.kernel.org \ --cc=linux-sunxi@googlegroups.com \ --cc=linux-sunxi@lists.linux.dev \ --cc=megous@megous.com \ --cc=mripard@kernel.org \ --cc=robh@kernel.org \ --cc=samuel@sholland.org \ --cc=wens@csie.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.