diff mbox series

[RESEND] rtc: sun6i: add support for R329 RTC

Message ID 20220626042756.58961-1-samuel@sholland.org
State Accepted
Headers show
Series [RESEND] rtc: sun6i: add support for R329 RTC | expand

Commit Message

Samuel Holland June 26, 2022, 4:27 a.m. UTC
From: Icenowy Zheng <icenowy@aosc.io>

Allwinner R329 has a RTC with a similar time storage with H616 but a
slightly different clock part.

As we have already handled the R329 RTC clocks in the CCU driver, add a
compatible string to RTC driver to allow probing of the RTC.

Signed-off-by: Icenowy Zheng <icenowy@aosc.io>
Signed-off-by: Samuel Holland <samuel@sholland.org>
---
Resending this patch separately from Icenowy's R329 series[1] because it
is also needed for D1 (which has R329 as its fallback compatible[2]), so
I would like to get it in to 5.20.

[1]: https://lore.kernel.org/lkml/BYAPR20MB2472C608678F3FAEDA7B7541BCF79@BYAPR20MB2472.namprd20.prod.outlook.com/
[2]: https://lore.kernel.org/lkml/20220203021736.13434-3-samuel@sholland.org/

 drivers/rtc/rtc-sun6i.c | 2 ++
 1 file changed, 2 insertions(+)

Comments

Icenowy Zheng June 26, 2022, 4:31 a.m. UTC | #1
在 2022-06-25星期六的 23:27 -0500,Samuel Holland写道:
> From: Icenowy Zheng <icenowy@aosc.io>
> 
> Allwinner R329 has a RTC with a similar time storage with H616 but a
> slightly different clock part.
> 
> As we have already handled the R329 RTC clocks in the CCU driver, add
> a
> compatible string to RTC driver to allow probing of the RTC.
> 
> Signed-off-by: Icenowy Zheng <icenowy@aosc.io>
> Signed-off-by: Samuel Holland <samuel@sholland.org>
> ---
> Resending this patch separately from Icenowy's R329 series[1] because
> it
> is also needed for D1 (which has R329 as its fallback compatible[2]),
> so
> I would like to get it in to 5.20.

Thanks!

BTW when will you put D1 DTs into kernel?

> 
> [1]:
> https://lore.kernel.org/lkml/BYAPR20MB2472C608678F3FAEDA7B7541BCF79@BYAPR20MB2472.namprd20.prod.outlook.com/
> [2]:
> https://lore.kernel.org/lkml/20220203021736.13434-3-samuel@sholland.org/
> 
>  drivers/rtc/rtc-sun6i.c | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/drivers/rtc/rtc-sun6i.c b/drivers/rtc/rtc-sun6i.c
> index 57540727ce1c..ed5516089e9a 100644
> --- a/drivers/rtc/rtc-sun6i.c
> +++ b/drivers/rtc/rtc-sun6i.c
> @@ -875,6 +875,8 @@ static const struct of_device_id
> sun6i_rtc_dt_ids[] = {
>         { .compatible = "allwinner,sun50i-h6-rtc" },
>         { .compatible = "allwinner,sun50i-h616-rtc",
>                 .data = (void *)RTC_LINEAR_DAY },
> +       { .compatible = "allwinner,sun50i-r329-rtc",
> +               .data = (void *)RTC_LINEAR_DAY },
>         { /* sentinel */ },
>  };
>  MODULE_DEVICE_TABLE(of, sun6i_rtc_dt_ids);
Samuel Holland June 26, 2022, 6:29 a.m. UTC | #2
On 6/25/22 11:31 PM, Icenowy Zheng wrote:
> 在 2022-06-25星期六的 23:27 -0500,Samuel Holland写道:
>> From: Icenowy Zheng <icenowy@aosc.io>
>>
>> Allwinner R329 has a RTC with a similar time storage with H616 but a
>> slightly different clock part.
>>
>> As we have already handled the R329 RTC clocks in the CCU driver, add a
>> compatible string to RTC driver to allow probing of the RTC.
>>
>> Signed-off-by: Icenowy Zheng <icenowy@aosc.io>
>> Signed-off-by: Samuel Holland <samuel@sholland.org>
>> ---
>> Resending this patch separately from Icenowy's R329 series[1] because it
>> is also needed for D1 (which has R329 as its fallback compatible[2]), so
>> I would like to get it in to 5.20.
> 
> Thanks!
> 
> BTW when will you put D1 DTs into kernel?

I am preparing a series for the stacked interrupt controller at the moment.
After I send that, I will send an initial devicetree series, hopefully by the
end of the weekend.

Regards,
Samuel
Jernej Škrabec June 27, 2022, 8:24 p.m. UTC | #3
Dne nedelja, 26. junij 2022 ob 06:27:56 CEST je Samuel Holland napisal(a):
> From: Icenowy Zheng <icenowy@aosc.io>
> 
> Allwinner R329 has a RTC with a similar time storage with H616 but a
> slightly different clock part.
> 
> As we have already handled the R329 RTC clocks in the CCU driver, add a
> compatible string to RTC driver to allow probing of the RTC.
> 
> Signed-off-by: Icenowy Zheng <icenowy@aosc.io>
> Signed-off-by: Samuel Holland <samuel@sholland.org>

Reviewed-by: Jernej Skrabec <jernej.skrabec@gmail.com>

Best regards,
Jernej
Heiko Stuebner July 1, 2022, 1 p.m. UTC | #4
Am Sonntag, 26. Juni 2022, 06:27:56 CEST schrieb Samuel Holland:
> From: Icenowy Zheng <icenowy@aosc.io>
> 
> Allwinner R329 has a RTC with a similar time storage with H616 but a
> slightly different clock part.
> 
> As we have already handled the R329 RTC clocks in the CCU driver, add a
> compatible string to RTC driver to allow probing of the RTC.
> 
> Signed-off-by: Icenowy Zheng <icenowy@aosc.io>
> Signed-off-by: Samuel Holland <samuel@sholland.org>

On a D1-Nezha
Tested-by: Heiko Stuebner <heiko@sntech.de>

Reviewed-by: Heiko Stuebner <heiko@sntech.de>

> ---
> Resending this patch separately from Icenowy's R329 series[1] because it
> is also needed for D1 (which has R329 as its fallback compatible[2]), so
> I would like to get it in to 5.20.
> 
> [1]: https://lore.kernel.org/lkml/BYAPR20MB2472C608678F3FAEDA7B7541BCF79@BYAPR20MB2472.namprd20.prod.outlook.com/
> [2]: https://lore.kernel.org/lkml/20220203021736.13434-3-samuel@sholland.org/
> 
>  drivers/rtc/rtc-sun6i.c | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/drivers/rtc/rtc-sun6i.c b/drivers/rtc/rtc-sun6i.c
> index 57540727ce1c..ed5516089e9a 100644
> --- a/drivers/rtc/rtc-sun6i.c
> +++ b/drivers/rtc/rtc-sun6i.c
> @@ -875,6 +875,8 @@ static const struct of_device_id sun6i_rtc_dt_ids[] = {
>  	{ .compatible = "allwinner,sun50i-h6-rtc" },
>  	{ .compatible = "allwinner,sun50i-h616-rtc",
>  		.data = (void *)RTC_LINEAR_DAY },
> +	{ .compatible = "allwinner,sun50i-r329-rtc",
> +		.data = (void *)RTC_LINEAR_DAY },
>  	{ /* sentinel */ },
>  };
>  MODULE_DEVICE_TABLE(of, sun6i_rtc_dt_ids);
>
Alexandre Belloni July 26, 2022, 9:18 a.m. UTC | #5
On Sat, 25 Jun 2022 23:27:56 -0500, Samuel Holland wrote:
> From: Icenowy Zheng <icenowy@aosc.io>
> 
> Allwinner R329 has a RTC with a similar time storage with H616 but a
> slightly different clock part.
> 
> As we have already handled the R329 RTC clocks in the CCU driver, add a
> compatible string to RTC driver to allow probing of the RTC.
> 
> [...]

Applied, thanks!

[1/1] rtc: sun6i: add support for R329 RTC
      commit: b9d982385d0544132bc398b7a7e062d9a554d941

Best regards,
diff mbox series

Patch

diff --git a/drivers/rtc/rtc-sun6i.c b/drivers/rtc/rtc-sun6i.c
index 57540727ce1c..ed5516089e9a 100644
--- a/drivers/rtc/rtc-sun6i.c
+++ b/drivers/rtc/rtc-sun6i.c
@@ -875,6 +875,8 @@  static const struct of_device_id sun6i_rtc_dt_ids[] = {
 	{ .compatible = "allwinner,sun50i-h6-rtc" },
 	{ .compatible = "allwinner,sun50i-h616-rtc",
 		.data = (void *)RTC_LINEAR_DAY },
+	{ .compatible = "allwinner,sun50i-r329-rtc",
+		.data = (void *)RTC_LINEAR_DAY },
 	{ /* sentinel */ },
 };
 MODULE_DEVICE_TABLE(of, sun6i_rtc_dt_ids);