2022-06-26 04:35:52

by Samuel Holland

[permalink] [raw]
Subject: [RESEND PATCH] rtc: sun6i: add support for R329 RTC

From: Icenowy Zheng <[email protected]>

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 <[email protected]>
Signed-off-by: Samuel Holland <[email protected]>
---
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/[email protected]/

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);
--
2.35.1


2022-06-26 04:41:34

by Icenowy Zheng

[permalink] [raw]
Subject: Re: [RESEND PATCH] rtc: sun6i: add support for R329 RTC

在 2022-06-25星期六的 23:27 -0500,Samuel Holland写道:
> From: Icenowy Zheng <[email protected]>
>
> 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 <[email protected]>
> Signed-off-by: Samuel Holland <[email protected]>
> ---
> 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/[email protected]/
>
>  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);


2022-06-26 06:46:18

by Samuel Holland

[permalink] [raw]
Subject: Re: [RESEND PATCH] rtc: sun6i: add support for R329 RTC

On 6/25/22 11:31 PM, Icenowy Zheng wrote:
> 在 2022-06-25星期六的 23:27 -0500,Samuel Holland写道:
>> From: Icenowy Zheng <[email protected]>
>>
>> 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 <[email protected]>
>> Signed-off-by: Samuel Holland <[email protected]>
>> ---
>> 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

2022-06-27 20:30:29

by Jernej Škrabec

[permalink] [raw]
Subject: Re: [RESEND PATCH] rtc: sun6i: add support for R329 RTC

Dne nedelja, 26. junij 2022 ob 06:27:56 CEST je Samuel Holland napisal(a):
> From: Icenowy Zheng <[email protected]>
>
> 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 <[email protected]>
> Signed-off-by: Samuel Holland <[email protected]>

Reviewed-by: Jernej Skrabec <[email protected]>

Best regards,
Jernej


2022-07-01 13:27:02

by Heiko Stuebner

[permalink] [raw]
Subject: Re: [RESEND PATCH] rtc: sun6i: add support for R329 RTC

Am Sonntag, 26. Juni 2022, 06:27:56 CEST schrieb Samuel Holland:
> From: Icenowy Zheng <[email protected]>
>
> 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 <[email protected]>
> Signed-off-by: Samuel Holland <[email protected]>

On a D1-Nezha
Tested-by: Heiko Stuebner <[email protected]>

Reviewed-by: Heiko Stuebner <[email protected]>

> ---
> 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/[email protected]/
>
> 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);
>




2022-07-26 09:23:42

by Alexandre Belloni

[permalink] [raw]
Subject: Re: [RESEND PATCH] rtc: sun6i: add support for R329 RTC

On Sat, 25 Jun 2022 23:27:56 -0500, Samuel Holland wrote:
> From: Icenowy Zheng <[email protected]>
>
> 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,
--
Alexandre Belloni, co-owner and COO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com