linux-rtc.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2 0/3] On-chip RTC support for ExynosAutov9
       [not found] <CGME20250710082533epcas5p111be26bea2ccc08718eebcb12929bbbf@epcas5p1.samsung.com>
@ 2025-07-10  8:34 ` Devang Tailor
       [not found]   ` <CGME20250710082534epcas5p40b49f5662ff36306349e6721fa9811fe@epcas5p4.samsung.com>
                     ` (3 more replies)
  0 siblings, 4 replies; 15+ messages in thread
From: Devang Tailor @ 2025-07-10  8:34 UTC (permalink / raw)
  To: robh, krzk+dt, conor+dt, alim.akhtar, alexandre.belloni,
	devicetree, linux-arm-kernel, linux-samsung-soc, linux-kernel,
	linux-rtc, faraz.ata
  Cc: Devang Tailor

Enable on-chip RTC support. The on-chip RTC of this SoC is similar
to the previous versions of Samsung SoC. So re-use the existing
RTC driver with applicable call-backs for initialization and IRQ handling.
Add a separate call-back for disabling RTC since existing '.disable'
call-backs updates additional bit not valid for RTC of ExynosAutov9.

Setting and getting hardware clock has been tested using 'hwclock'
and 'date' utilities.

Alarm interrupt has been checked with incrementing interrupt
count via "cat /proc/interrupts | grep rtc" for 10sec
wakeup time via "echo +10 > /sys/class/rtc/rtc0/wakealarm"

changelog
---
Changes in v2:
- Fixed the review comment of v1 for mis-aligmnent & asymmetry bit logic.
- link for v1 : https://lore.kernel.org/linux-rtc/20250702052426.2404256-1-dev.tailor@samsung.com/


Devang Tailor (3):
  dt-bindings: rtc: s3c-rtc: add compatible for exynosautov9
  rtc: s3c: support for exynosautov9 on-chip RTC
  arm64: dts: exynosautov9: add RTC DT node

 .../devicetree/bindings/rtc/s3c-rtc.yaml       |  1 +
 .../boot/dts/exynos/exynosautov9-sadk.dts      |  4 ++++
 arch/arm64/boot/dts/exynos/exynosautov9.dtsi   | 10 ++++++++++
 drivers/rtc/rtc-s3c.c                          | 18 ++++++++++++++++++
 4 files changed, 33 insertions(+)


base-commit: 58ba80c4740212c29a1cf9b48f588e60a7612209
-- 
2.34.1


^ permalink raw reply	[flat|nested] 15+ messages in thread

* [PATCH v2 1/3] dt-bindings: rtc: s3c-rtc: add compatible for exynosautov9
       [not found]   ` <CGME20250710082534epcas5p40b49f5662ff36306349e6721fa9811fe@epcas5p4.samsung.com>
@ 2025-07-10  8:34     ` Devang Tailor
  2025-07-11  7:18       ` Krzysztof Kozlowski
  2025-07-30  4:15       ` Alim Akhtar
  0 siblings, 2 replies; 15+ messages in thread
From: Devang Tailor @ 2025-07-10  8:34 UTC (permalink / raw)
  To: robh, krzk+dt, conor+dt, alim.akhtar, alexandre.belloni,
	devicetree, linux-arm-kernel, linux-samsung-soc, linux-kernel,
	linux-rtc, faraz.ata
  Cc: Devang Tailor

Add "samsung,exynosautov9-rtc" dedicated compatible for
on-chip RTC found in ExynosAutov9 SoC.

Signed-off-by: Devang Tailor <dev.tailor@samsung.com>
---
 Documentation/devicetree/bindings/rtc/s3c-rtc.yaml | 1 +
 1 file changed, 1 insertion(+)

diff --git a/Documentation/devicetree/bindings/rtc/s3c-rtc.yaml b/Documentation/devicetree/bindings/rtc/s3c-rtc.yaml
index bf4e11d6dffb..5daee2a5f866 100644
--- a/Documentation/devicetree/bindings/rtc/s3c-rtc.yaml
+++ b/Documentation/devicetree/bindings/rtc/s3c-rtc.yaml
@@ -13,6 +13,7 @@ properties:
   compatible:
     oneOf:
       - enum:
+          - samsung,exynosautov9-rtc
           - samsung,s3c2410-rtc
           - samsung,s3c2416-rtc
           - samsung,s3c2443-rtc
-- 
2.34.1


^ permalink raw reply related	[flat|nested] 15+ messages in thread

* [PATCH v2 2/3] rtc: s3c: support for exynosautov9 on-chip RTC
       [not found]   ` <CGME20250710082536epcas5p4f9dcd50ff474066562b2cbd40199d2d9@epcas5p4.samsung.com>
@ 2025-07-10  8:34     ` Devang Tailor
  2025-07-11  7:20       ` Krzysztof Kozlowski
                         ` (2 more replies)
  0 siblings, 3 replies; 15+ messages in thread
From: Devang Tailor @ 2025-07-10  8:34 UTC (permalink / raw)
  To: robh, krzk+dt, conor+dt, alim.akhtar, alexandre.belloni,
	devicetree, linux-arm-kernel, linux-samsung-soc, linux-kernel,
	linux-rtc, faraz.ata
  Cc: Devang Tailor

The on-chip RTC of this SoC is almost similar to the previous
versions of SoC. Hence re-use the existing driver with platform specific
change to enable RTC.

This has been tested with 'hwclock' & 'date' utilities

Signed-off-by: Devang Tailor <dev.tailor@samsung.com>
---
 drivers/rtc/rtc-s3c.c | 18 ++++++++++++++++++
 1 file changed, 18 insertions(+)

diff --git a/drivers/rtc/rtc-s3c.c b/drivers/rtc/rtc-s3c.c
index 5dd575865adf..8db24b6360b8 100644
--- a/drivers/rtc/rtc-s3c.c
+++ b/drivers/rtc/rtc-s3c.c
@@ -384,6 +384,15 @@ static void s3c6410_rtc_disable(struct s3c_rtc *info)
 	writew(con, info->base + S3C2410_RTCCON);
 }
 
+static void exynosautov9_rtc_disable(struct s3c_rtc *info)
+{
+	unsigned int con;
+
+	con = readb(info->base + S3C2410_RTCCON);
+	con &= ~S3C2410_RTCCON_RTCEN;
+	writeb(con, info->base + S3C2410_RTCCON);
+}
+
 static void s3c_rtc_remove(struct platform_device *pdev)
 {
 	struct s3c_rtc *info = platform_get_drvdata(pdev);
@@ -574,6 +583,12 @@ static struct s3c_rtc_data const s3c6410_rtc_data = {
 	.disable		= s3c6410_rtc_disable,
 };
 
+static const struct s3c_rtc_data exynosautov9_rtc_data = {
+	.irq_handler		= s3c6410_rtc_irq,
+	.enable			= s3c24xx_rtc_enable,
+	.disable		= exynosautov9_rtc_disable,
+};
+
 static const __maybe_unused struct of_device_id s3c_rtc_dt_match[] = {
 	{
 		.compatible = "samsung,s3c2410-rtc",
@@ -590,6 +605,9 @@ static const __maybe_unused struct of_device_id s3c_rtc_dt_match[] = {
 	}, {
 		.compatible = "samsung,exynos3250-rtc",
 		.data = &s3c6410_rtc_data,
+	}, {
+		.compatible = "samsung,exynosautov9-rtc",
+		.data = &exynosautov9_rtc_data,
 	},
 	{ /* sentinel */ },
 };
-- 
2.34.1


^ permalink raw reply related	[flat|nested] 15+ messages in thread

* [PATCH v2 3/3] arm64: dts: exynosautov9: add RTC DT node
       [not found]   ` <CGME20250710082538epcas5p2556f80b4193a046262808ae7742675be@epcas5p2.samsung.com>
@ 2025-07-10  8:34     ` Devang Tailor
  2025-07-30  4:26       ` Alim Akhtar
  0 siblings, 1 reply; 15+ messages in thread
From: Devang Tailor @ 2025-07-10  8:34 UTC (permalink / raw)
  To: robh, krzk+dt, conor+dt, alim.akhtar, alexandre.belloni,
	devicetree, linux-arm-kernel, linux-samsung-soc, linux-kernel,
	linux-rtc, faraz.ata
  Cc: Devang Tailor

Add DT node for on-chip RTC for ExynosAutov9

Signed-off-by: Devang Tailor <dev.tailor@samsung.com>
---
 arch/arm64/boot/dts/exynos/exynosautov9-sadk.dts |  4 ++++
 arch/arm64/boot/dts/exynos/exynosautov9.dtsi     | 10 ++++++++++
 2 files changed, 14 insertions(+)

diff --git a/arch/arm64/boot/dts/exynos/exynosautov9-sadk.dts b/arch/arm64/boot/dts/exynos/exynosautov9-sadk.dts
index de2c1de51a76..5f5167571f7a 100644
--- a/arch/arm64/boot/dts/exynos/exynosautov9-sadk.dts
+++ b/arch/arm64/boot/dts/exynos/exynosautov9-sadk.dts
@@ -106,6 +106,10 @@ &pwm {
 	status = "okay";
 };
 
+&rtc {
+	status = "okay";
+};
+
 &serial_0 {
 	pinctrl-0 = <&uart0_bus_dual>;
 	status = "okay";
diff --git a/arch/arm64/boot/dts/exynos/exynosautov9.dtsi b/arch/arm64/boot/dts/exynos/exynosautov9.dtsi
index 66628cb32776..afa6b258153c 100644
--- a/arch/arm64/boot/dts/exynos/exynosautov9.dtsi
+++ b/arch/arm64/boot/dts/exynos/exynosautov9.dtsi
@@ -1633,6 +1633,16 @@ pwm: pwm@103f0000 {
 			clock-names = "timers";
 			status = "disabled";
 		};
+
+		rtc: rtc@10540000 {
+			compatible = "samsung,exynosautov9-rtc";
+			reg = <0x10540000 0x100>;
+			interrupts = <GIC_SPI 26 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 27 IRQ_TYPE_LEVEL_HIGH>;
+			clocks = <&xtcxo>;
+			clock-names = "rtc";
+			status = "disabled";
+		};
 	};
 };
 
-- 
2.34.1


^ permalink raw reply related	[flat|nested] 15+ messages in thread

* Re: [PATCH v2 1/3] dt-bindings: rtc: s3c-rtc: add compatible for exynosautov9
  2025-07-10  8:34     ` [PATCH v2 1/3] dt-bindings: rtc: s3c-rtc: add compatible for exynosautov9 Devang Tailor
@ 2025-07-11  7:18       ` Krzysztof Kozlowski
  2025-07-30  4:15       ` Alim Akhtar
  1 sibling, 0 replies; 15+ messages in thread
From: Krzysztof Kozlowski @ 2025-07-11  7:18 UTC (permalink / raw)
  To: Devang Tailor
  Cc: robh, krzk+dt, conor+dt, alim.akhtar, alexandre.belloni,
	devicetree, linux-arm-kernel, linux-samsung-soc, linux-kernel,
	linux-rtc, faraz.ata

On Thu, Jul 10, 2025 at 02:04:32PM +0530, Devang Tailor wrote:
> Add "samsung,exynosautov9-rtc" dedicated compatible for
> on-chip RTC found in ExynosAutov9 SoC.
> 
> Signed-off-by: Devang Tailor <dev.tailor@samsung.com>
> ---
>  Documentation/devicetree/bindings/rtc/s3c-rtc.yaml | 1 +
>  1 file changed, 1 insertion(+)
> 

<form letter>
This is a friendly reminder during the review process.

It looks like you received a tag and forgot to add it.

If you do not know the process, here is a short explanation:
Please add Acked-by/Reviewed-by/Tested-by tags when posting new
versions of patchset, under or above your Signed-off-by tag, unless
patch changed significantly (e.g. new properties added to the DT
bindings). Tag is "received", when provided in a message replied to you
on the mailing list. Tools like b4 can help here. However, there's no
need to repost patches *only* to add the tags. The upstream maintainer
will do that for tags received on the version they apply.

Please read:
https://elixir.bootlin.com/linux/v6.12-rc3/source/Documentation/process/submitting-patches.rst#L577

If a tag was not added on purpose, please state why and what changed.
</form letter>

Best regards,
Krzysztof


^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [PATCH v2 2/3] rtc: s3c: support for exynosautov9 on-chip RTC
  2025-07-10  8:34     ` [PATCH v2 2/3] rtc: s3c: support for exynosautov9 on-chip RTC Devang Tailor
@ 2025-07-11  7:20       ` Krzysztof Kozlowski
  2025-07-11  9:52         ` Devang Tailor
  2025-07-30  4:17       ` Alim Akhtar
  2025-09-03 19:20       ` Henrik Grimler
  2 siblings, 1 reply; 15+ messages in thread
From: Krzysztof Kozlowski @ 2025-07-11  7:20 UTC (permalink / raw)
  To: Devang Tailor
  Cc: robh, krzk+dt, conor+dt, alim.akhtar, alexandre.belloni,
	devicetree, linux-arm-kernel, linux-samsung-soc, linux-kernel,
	linux-rtc, faraz.ata

On Thu, Jul 10, 2025 at 02:04:33PM +0530, Devang Tailor wrote:
> The on-chip RTC of this SoC is almost similar to the previous
> versions of SoC. Hence re-use the existing driver with platform specific
> change to enable RTC.
> 
> This has been tested with 'hwclock' & 'date' utilities
> 
> Signed-off-by: Devang Tailor <dev.tailor@samsung.com>
> ---
>  drivers/rtc/rtc-s3c.c | 18 ++++++++++++++++++
>  1 file changed, 18 insertions(+)
> 
> diff --git a/drivers/rtc/rtc-s3c.c b/drivers/rtc/rtc-s3c.c
> index 5dd575865adf..8db24b6360b8 100644
> --- a/drivers/rtc/rtc-s3c.c
> +++ b/drivers/rtc/rtc-s3c.c
> @@ -384,6 +384,15 @@ static void s3c6410_rtc_disable(struct s3c_rtc *info)
>  	writew(con, info->base + S3C2410_RTCCON);
>  }
>  
> +static void exynosautov9_rtc_disable(struct s3c_rtc *info)
> +{
> +	unsigned int con;
> +
> +	con = readb(info->base + S3C2410_RTCCON);
> +	con &= ~S3C2410_RTCCON_RTCEN;
> +	writeb(con, info->base + S3C2410_RTCCON);
> +}

Looks a lot like s3c24xx_rtc_disable()...

Anyway, if you keep ignoring the review, no point to provide reviews
here.

Best regards,
Krzysztof


^ permalink raw reply	[flat|nested] 15+ messages in thread

* RE: [PATCH v2 2/3] rtc: s3c: support for exynosautov9 on-chip RTC
  2025-07-11  7:20       ` Krzysztof Kozlowski
@ 2025-07-11  9:52         ` Devang Tailor
  0 siblings, 0 replies; 15+ messages in thread
From: Devang Tailor @ 2025-07-11  9:52 UTC (permalink / raw)
  To: 'Krzysztof Kozlowski'
  Cc: robh, krzk+dt, conor+dt, alim.akhtar, alexandre.belloni,
	devicetree, linux-arm-kernel, linux-samsung-soc, linux-kernel,
	linux-rtc, faraz.ata


Hi Krzysztof,


> -----Original Message-----
> From: Krzysztof Kozlowski <krzk@kernel.org>
> Sent: 11 July 2025 12:51
> To: Devang Tailor <dev.tailor@samsung.com>
> Cc: robh@kernel.org; krzk+dt@kernel.org; conor+dt@kernel.org;
> alim.akhtar@samsung.com; alexandre.belloni@bootlin.com;
> devicetree@vger.kernel.org; linux-arm-kernel@lists.infradead.org; linux-
> samsung-soc@vger.kernel.org; linux-kernel@vger.kernel.org; linux-
> rtc@vger.kernel.org; faraz.ata@samsung.com
> Subject: Re: [PATCH v2 2/3] rtc: s3c: support for exynosautov9 on-chip RTC
> 
> On Thu, Jul 10, 2025 at 02:04:33PM +0530, Devang Tailor wrote:
> > The on-chip RTC of this SoC is almost similar to the previous versions
> > of SoC. Hence re-use the existing driver with platform specific change
> > to enable RTC.
> >
> > This has been tested with 'hwclock' & 'date' utilities
> >
> > Signed-off-by: Devang Tailor <dev.tailor@samsung.com>
> > ---
> >  drivers/rtc/rtc-s3c.c | 18 ++++++++++++++++++
> >  1 file changed, 18 insertions(+)
> >
> > diff --git a/drivers/rtc/rtc-s3c.c b/drivers/rtc/rtc-s3c.c index
> > 5dd575865adf..8db24b6360b8 100644
> > --- a/drivers/rtc/rtc-s3c.c
> > +++ b/drivers/rtc/rtc-s3c.c
> > @@ -384,6 +384,15 @@ static void s3c6410_rtc_disable(struct s3c_rtc
> *info)
> >  	writew(con, info->base + S3C2410_RTCCON);  }
> >
> > +static void exynosautov9_rtc_disable(struct s3c_rtc *info) {
> > +	unsigned int con;
> > +
> > +	con = readb(info->base + S3C2410_RTCCON);
> > +	con &= ~S3C2410_RTCCON_RTCEN;
> > +	writeb(con, info->base + S3C2410_RTCCON); }
> 
> Looks a lot like s3c24xx_rtc_disable()...
> 
> Anyway, if you keep ignoring the review, no point to provide reviews here.
> 

I have removed the redundant code I had added in V1 considering your review comment for asymmetry code.
s3c24xx_rtc_disable() & s3c6410_rtc_disable() updates additional bit, which is not valid for ExynosAutov9 (only RTCCON[4:0] are valid), hence I added this and mentioned in V2 cover letter as well.
Please let me know if I am missing anything.

> Best regards,
> Krzysztof



^ permalink raw reply	[flat|nested] 15+ messages in thread

* RE: [PATCH v2 1/3] dt-bindings: rtc: s3c-rtc: add compatible for exynosautov9
  2025-07-10  8:34     ` [PATCH v2 1/3] dt-bindings: rtc: s3c-rtc: add compatible for exynosautov9 Devang Tailor
  2025-07-11  7:18       ` Krzysztof Kozlowski
@ 2025-07-30  4:15       ` Alim Akhtar
  1 sibling, 0 replies; 15+ messages in thread
From: Alim Akhtar @ 2025-07-30  4:15 UTC (permalink / raw)
  To: 'Devang Tailor', robh, krzk+dt, conor+dt,
	alexandre.belloni, devicetree, linux-arm-kernel,
	linux-samsung-soc, linux-kernel, linux-rtc, faraz.ata



> -----Original Message-----
> From: Devang Tailor <dev.tailor@samsung.com>
> Sent: Thursday, July 10, 2025 2:05 PM
> To: robh@kernel.org; krzk+dt@kernel.org; conor+dt@kernel.org;
> alim.akhtar@samsung.com; alexandre.belloni@bootlin.com;
> devicetree@vger.kernel.org; linux-arm-kernel@lists.infradead.org; linux-
> samsung-soc@vger.kernel.org; linux-kernel@vger.kernel.org; linux-
> rtc@vger.kernel.org; faraz.ata@samsung.com
> Cc: Devang Tailor <dev.tailor@samsung.com>
> Subject: [PATCH v2 1/3] dt-bindings: rtc: s3c-rtc: add compatible for
> exynosautov9
> 
> Add "samsung,exynosautov9-rtc" dedicated compatible for on-chip RTC
> found in ExynosAutov9 SoC.
> 
> Signed-off-by: Devang Tailor <dev.tailor@samsung.com>
> ---

Reviewed-by: Alim Akhtar <alim.akhtar@samsung.com>



^ permalink raw reply	[flat|nested] 15+ messages in thread

* RE: [PATCH v2 2/3] rtc: s3c: support for exynosautov9 on-chip RTC
  2025-07-10  8:34     ` [PATCH v2 2/3] rtc: s3c: support for exynosautov9 on-chip RTC Devang Tailor
  2025-07-11  7:20       ` Krzysztof Kozlowski
@ 2025-07-30  4:17       ` Alim Akhtar
  2025-09-03 19:20       ` Henrik Grimler
  2 siblings, 0 replies; 15+ messages in thread
From: Alim Akhtar @ 2025-07-30  4:17 UTC (permalink / raw)
  To: 'Devang Tailor', robh, krzk+dt, conor+dt,
	alexandre.belloni, devicetree, linux-arm-kernel,
	linux-samsung-soc, linux-kernel, linux-rtc, faraz.ata



> -----Original Message-----
> From: Devang Tailor <dev.tailor@samsung.com>
> Sent: Thursday, July 10, 2025 2:05 PM
> To: robh@kernel.org; krzk+dt@kernel.org; conor+dt@kernel.org;
> alim.akhtar@samsung.com; alexandre.belloni@bootlin.com;
> devicetree@vger.kernel.org; linux-arm-kernel@lists.infradead.org; linux-
> samsung-soc@vger.kernel.org; linux-kernel@vger.kernel.org; linux-
> rtc@vger.kernel.org; faraz.ata@samsung.com
> Cc: Devang Tailor <dev.tailor@samsung.com>
> Subject: [PATCH v2 2/3] rtc: s3c: support for exynosautov9 on-chip RTC
> 
> The on-chip RTC of this SoC is almost similar to the previous versions of SoC.
> Hence re-use the existing driver with platform specific change to enable RTC.
> 
> This has been tested with 'hwclock' & 'date' utilities
> 
> Signed-off-by: Devang Tailor <dev.tailor@samsung.com>
> ---
Reviewed-by: Alim Akhtar <alim.akhtar@samsung.com>


^ permalink raw reply	[flat|nested] 15+ messages in thread

* RE: [PATCH v2 3/3] arm64: dts: exynosautov9: add RTC DT node
  2025-07-10  8:34     ` [PATCH v2 3/3] arm64: dts: exynosautov9: add RTC DT node Devang Tailor
@ 2025-07-30  4:26       ` Alim Akhtar
  0 siblings, 0 replies; 15+ messages in thread
From: Alim Akhtar @ 2025-07-30  4:26 UTC (permalink / raw)
  To: 'Devang Tailor', robh, krzk+dt, conor+dt,
	alexandre.belloni, devicetree, linux-arm-kernel,
	linux-samsung-soc, linux-kernel, linux-rtc, faraz.ata



> -----Original Message-----
> From: Devang Tailor <dev.tailor@samsung.com>
> Sent: Thursday, July 10, 2025 2:05 PM
> To: robh@kernel.org; krzk+dt@kernel.org; conor+dt@kernel.org;
> alim.akhtar@samsung.com; alexandre.belloni@bootlin.com;
> devicetree@vger.kernel.org; linux-arm-kernel@lists.infradead.org; linux-
> samsung-soc@vger.kernel.org; linux-kernel@vger.kernel.org; linux-
> rtc@vger.kernel.org; faraz.ata@samsung.com
> Cc: Devang Tailor <dev.tailor@samsung.com>
> Subject: [PATCH v2 3/3] arm64: dts: exynosautov9: add RTC DT node
> 
> Add DT node for on-chip RTC for ExynosAutov9
> 
> Signed-off-by: Devang Tailor <dev.tailor@samsung.com>
> ---
Reviewed-by: Alim Akhtar <alim.akhtar@samsung.com>

You can also send a top-up patch to correct the ordering of the nodes based on the ascending addresses.

>  arch/arm64/boot/dts/exynos/exynosautov9-sadk.dts |  4 ++++
>  arch/arm64/boot/dts/exynos/exynosautov9.dtsi     | 10 ++++++++++
>  2 files changed, 14 insertions(+)
> 
> diff --git a/arch/arm64/boot/dts/exynos/exynosautov9-sadk.dts
> b/arch/arm64/boot/dts/exynos/exynosautov9-sadk.dts
> index de2c1de51a76..5f5167571f7a 100644
> --- a/arch/arm64/boot/dts/exynos/exynosautov9-sadk.dts
> +++ b/arch/arm64/boot/dts/exynos/exynosautov9-sadk.dts
> @@ -106,6 +106,10 @@ &pwm {
>  	status = "okay";
>  };
> 
> +&rtc {
> +	status = "okay";
> +};
> +
>  &serial_0 {
>  	pinctrl-0 = <&uart0_bus_dual>;
>  	status = "okay";
> diff --git a/arch/arm64/boot/dts/exynos/exynosautov9.dtsi
> b/arch/arm64/boot/dts/exynos/exynosautov9.dtsi
> index 66628cb32776..afa6b258153c 100644
> --- a/arch/arm64/boot/dts/exynos/exynosautov9.dtsi
> +++ b/arch/arm64/boot/dts/exynos/exynosautov9.dtsi
> @@ -1633,6 +1633,16 @@ pwm: pwm@103f0000 {
>  			clock-names = "timers";
>  			status = "disabled";
>  		};
> +
> +		rtc: rtc@10540000 {
> +			compatible = "samsung,exynosautov9-rtc";
> +			reg = <0x10540000 0x100>;
> +			interrupts = <GIC_SPI 26 IRQ_TYPE_LEVEL_HIGH>,
> +				     <GIC_SPI 27 IRQ_TYPE_LEVEL_HIGH>;
> +			clocks = <&xtcxo>;
> +			clock-names = "rtc";
> +			status = "disabled";
> +		};
>  	};
>  };
> 
> --
> 2.34.1



^ permalink raw reply	[flat|nested] 15+ messages in thread

* RE: [PATCH v2 0/3] On-chip RTC support for ExynosAutov9
  2025-07-10  8:34 ` [PATCH v2 0/3] On-chip RTC support for ExynosAutov9 Devang Tailor
                     ` (2 preceding siblings ...)
       [not found]   ` <CGME20250710082538epcas5p2556f80b4193a046262808ae7742675be@epcas5p2.samsung.com>
@ 2025-09-03 11:39   ` Devang Tailor
  2025-09-03 12:23     ` Alexandre Belloni
  3 siblings, 1 reply; 15+ messages in thread
From: Devang Tailor @ 2025-09-03 11:39 UTC (permalink / raw)
  To: robh, krzk+dt, conor+dt, alim.akhtar, alexandre.belloni,
	devicetree, linux-arm-kernel, linux-samsung-soc, linux-kernel,
	linux-rtc, faraz.ata


Hi,


> -----Original Message-----
> From: Devang Tailor <dev.tailor@samsung.com>
> Sent: 10 July 2025 14:05
> To: robh@kernel.org; krzk+dt@kernel.org; conor+dt@kernel.org;
> alim.akhtar@samsung.com; alexandre.belloni@bootlin.com;
> devicetree@vger.kernel.org; linux-arm-kernel@lists.infradead.org; linux-
> samsung-soc@vger.kernel.org; linux-kernel@vger.kernel.org; linux-
> rtc@vger.kernel.org; faraz.ata@samsung.com
> Cc: Devang Tailor <dev.tailor@samsung.com>
> Subject: [PATCH v2 0/3] On-chip RTC support for ExynosAutov9
> 
> Enable on-chip RTC support. The on-chip RTC of this SoC is similar to the
> previous versions of Samsung SoC. So re-use the existing RTC driver with
> applicable call-backs for initialization and IRQ handling.
> Add a separate call-back for disabling RTC since existing '.disable'
> call-backs updates additional bit not valid for RTC of ExynosAutov9.
> 
> Setting and getting hardware clock has been tested using 'hwclock'
> and 'date' utilities.
> 
> Alarm interrupt has been checked with incrementing interrupt count via "cat
> /proc/interrupts | grep rtc" for 10sec wakeup time via "echo +10 >
> /sys/class/rtc/rtc0/wakealarm"
> 
> changelog
> ---
> Changes in v2:
> - Fixed the review comment of v1 for mis-aligmnent & asymmetry bit logic.
> - link for v1 : https://lore.kernel.org/linux-rtc/20250702052426.2404256-1-
> dev.tailor@samsung.com/
> 

Reminder!
Can you please help to identify if anything is pending in this patch series ? I see all three patches are reviewed.

> 
> Devang Tailor (3):
>   dt-bindings: rtc: s3c-rtc: add compatible for exynosautov9
>   rtc: s3c: support for exynosautov9 on-chip RTC
>   arm64: dts: exynosautov9: add RTC DT node
> 
>  .../devicetree/bindings/rtc/s3c-rtc.yaml       |  1 +
>  .../boot/dts/exynos/exynosautov9-sadk.dts      |  4 ++++
>  arch/arm64/boot/dts/exynos/exynosautov9.dtsi   | 10 ++++++++++
>  drivers/rtc/rtc-s3c.c                          | 18 ++++++++++++++++++
>  4 files changed, 33 insertions(+)
> 
> 
> base-commit: 58ba80c4740212c29a1cf9b48f588e60a7612209
> --
> 2.34.1



^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [PATCH v2 0/3] On-chip RTC support for ExynosAutov9
  2025-09-03 11:39   ` [PATCH v2 0/3] On-chip RTC support for ExynosAutov9 Devang Tailor
@ 2025-09-03 12:23     ` Alexandre Belloni
  2025-09-03 13:51       ` Devang Tailor
  0 siblings, 1 reply; 15+ messages in thread
From: Alexandre Belloni @ 2025-09-03 12:23 UTC (permalink / raw)
  To: Devang Tailor
  Cc: robh, krzk+dt, conor+dt, alim.akhtar, devicetree,
	linux-arm-kernel, linux-samsung-soc, linux-kernel, linux-rtc,
	faraz.ata

On 03/09/2025 17:09:32+0530, Devang Tailor wrote:
> 
> Hi,
> 
> 
> > -----Original Message-----
> > From: Devang Tailor <dev.tailor@samsung.com>
> > Sent: 10 July 2025 14:05
> > To: robh@kernel.org; krzk+dt@kernel.org; conor+dt@kernel.org;
> > alim.akhtar@samsung.com; alexandre.belloni@bootlin.com;
> > devicetree@vger.kernel.org; linux-arm-kernel@lists.infradead.org; linux-
> > samsung-soc@vger.kernel.org; linux-kernel@vger.kernel.org; linux-
> > rtc@vger.kernel.org; faraz.ata@samsung.com
> > Cc: Devang Tailor <dev.tailor@samsung.com>
> > Subject: [PATCH v2 0/3] On-chip RTC support for ExynosAutov9
> > 
> > Enable on-chip RTC support. The on-chip RTC of this SoC is similar to the
> > previous versions of Samsung SoC. So re-use the existing RTC driver with
> > applicable call-backs for initialization and IRQ handling.
> > Add a separate call-back for disabling RTC since existing '.disable'
> > call-backs updates additional bit not valid for RTC of ExynosAutov9.
> > 
> > Setting and getting hardware clock has been tested using 'hwclock'
> > and 'date' utilities.
> > 
> > Alarm interrupt has been checked with incrementing interrupt count via "cat
> > /proc/interrupts | grep rtc" for 10sec wakeup time via "echo +10 >
> > /sys/class/rtc/rtc0/wakealarm"
> > 
> > changelog
> > ---
> > Changes in v2:
> > - Fixed the review comment of v1 for mis-aligmnent & asymmetry bit logic.
> > - link for v1 : https://lore.kernel.org/linux-rtc/20250702052426.2404256-1-
> > dev.tailor@samsung.com/
> > 
> 
> Reminder!
> Can you please help to identify if anything is pending in this patch series ? I see all three patches are reviewed.
> 

You have actions after those reviews:

https://lore.kernel.org/all/20250711-shapeless-adorable-lobster-d2efbf@krzk-bin/

> > 
> > Devang Tailor (3):
> >   dt-bindings: rtc: s3c-rtc: add compatible for exynosautov9
> >   rtc: s3c: support for exynosautov9 on-chip RTC
> >   arm64: dts: exynosautov9: add RTC DT node
> > 
> >  .../devicetree/bindings/rtc/s3c-rtc.yaml       |  1 +
> >  .../boot/dts/exynos/exynosautov9-sadk.dts      |  4 ++++
> >  arch/arm64/boot/dts/exynos/exynosautov9.dtsi   | 10 ++++++++++
> >  drivers/rtc/rtc-s3c.c                          | 18 ++++++++++++++++++
> >  4 files changed, 33 insertions(+)
> > 
> > 
> > base-commit: 58ba80c4740212c29a1cf9b48f588e60a7612209
> > --
> > 2.34.1
> 
> 

-- 
Alexandre Belloni, co-owner and COO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com

^ permalink raw reply	[flat|nested] 15+ messages in thread

* RE: [PATCH v2 0/3] On-chip RTC support for ExynosAutov9
  2025-09-03 12:23     ` Alexandre Belloni
@ 2025-09-03 13:51       ` Devang Tailor
  0 siblings, 0 replies; 15+ messages in thread
From: Devang Tailor @ 2025-09-03 13:51 UTC (permalink / raw)
  To: 'Alexandre Belloni'
  Cc: robh, krzk+dt, conor+dt, alim.akhtar, devicetree,
	linux-arm-kernel, linux-samsung-soc, linux-kernel, linux-rtc,
	faraz.ata


Hi Alexandre,


> -----Original Message-----
> From: Alexandre Belloni <alexandre.belloni@bootlin.com>
> Sent: 03 September 2025 17:54
> To: Devang Tailor <dev.tailor@samsung.com>
> Cc: robh@kernel.org; krzk+dt@kernel.org; conor+dt@kernel.org;
> alim.akhtar@samsung.com; devicetree@vger.kernel.org; linux-arm-
> kernel@lists.infradead.org; linux-samsung-soc@vger.kernel.org; linux-
> kernel@vger.kernel.org; linux-rtc@vger.kernel.org; faraz.ata@samsung.com
> Subject: Re: [PATCH v2 0/3] On-chip RTC support for ExynosAutov9
> 
> On 03/09/2025 17:09:32+0530, Devang Tailor wrote:
> >
> > Hi,
> >
> >
> > > -----Original Message-----
> > > From: Devang Tailor <dev.tailor@samsung.com>
> > > Sent: 10 July 2025 14:05
> > > To: robh@kernel.org; krzk+dt@kernel.org; conor+dt@kernel.org;
> > > alim.akhtar@samsung.com; alexandre.belloni@bootlin.com;
> > > devicetree@vger.kernel.org; linux-arm-kernel@lists.infradead.org;
> > > linux- samsung-soc@vger.kernel.org; linux-kernel@vger.kernel.org;
> > > linux- rtc@vger.kernel.org; faraz.ata@samsung.com
> > > Cc: Devang Tailor <dev.tailor@samsung.com>
> > > Subject: [PATCH v2 0/3] On-chip RTC support for ExynosAutov9
> > >
> > > Enable on-chip RTC support. The on-chip RTC of this SoC is similar
> > > to the previous versions of Samsung SoC. So re-use the existing RTC
> > > driver with applicable call-backs for initialization and IRQ handling.
> > > Add a separate call-back for disabling RTC since existing '.disable'
> > > call-backs updates additional bit not valid for RTC of ExynosAutov9.
> > >
> > > Setting and getting hardware clock has been tested using 'hwclock'
> > > and 'date' utilities.
> > >
> > > Alarm interrupt has been checked with incrementing interrupt count
> > > via "cat /proc/interrupts | grep rtc" for 10sec wakeup time via
> > > "echo +10 > /sys/class/rtc/rtc0/wakealarm"
> > >
> > > changelog
> > > ---
> > > Changes in v2:
> > > - Fixed the review comment of v1 for mis-aligmnent & asymmetry bit
> logic.
> > > - link for v1 :
> > > https://lore.kernel.org/linux-rtc/20250702052426.2404256-1-
> > > dev.tailor@samsung.com/
> > >
> >
> > Reminder!
> > Can you please help to identify if anything is pending in this patch
series ? I
> see all three patches are reviewed.
> >
> 
> You have actions after those reviews:
> 
>
https://lore.kernel.org/all/20250711-shapeless-adorable-lobster-d2efbf@krzk-
> bin/
> 

Thanks for the pointer. I had given the explanation for that,
https://lore.kernel.org/all/188001dbf249$831afd00$8950f700$@samsung.com/
after which I didn't get any feedback.

As per my understanding I have addressed the review comment given in V1 for
[PATCH 2/3] (without ignoring any).
So I am not getting what I have missed. Would you help to point out what was
left ?

> > >
> > > Devang Tailor (3):
> > >   dt-bindings: rtc: s3c-rtc: add compatible for exynosautov9
> > >   rtc: s3c: support for exynosautov9 on-chip RTC
> > >   arm64: dts: exynosautov9: add RTC DT node
> > >
> > >  .../devicetree/bindings/rtc/s3c-rtc.yaml       |  1 +
> > >  .../boot/dts/exynos/exynosautov9-sadk.dts      |  4 ++++
> > >  arch/arm64/boot/dts/exynos/exynosautov9.dtsi   | 10 ++++++++++
> > >  drivers/rtc/rtc-s3c.c                          | 18
++++++++++++++++++
> > >  4 files changed, 33 insertions(+)
> > >
> > >
> > > base-commit: 58ba80c4740212c29a1cf9b48f588e60a7612209
> > > --
> > > 2.34.1
> >
> >
> 
> --
> Alexandre Belloni, co-owner and COO, Bootlin Embedded Linux and Kernel
> engineering https://protect2.fireeye.com/v1/url?k=62b10b19-03cce365-
> 62b08056-74fe485cc33c-bc602ba9f8c455fd&q=1&e=14890047-79c7-46fe-
> 85a0-48fc7c9b3d91&u=https%3A%2F%2Fbootlin.com%2F


^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [PATCH v2 2/3] rtc: s3c: support for exynosautov9 on-chip RTC
  2025-07-10  8:34     ` [PATCH v2 2/3] rtc: s3c: support for exynosautov9 on-chip RTC Devang Tailor
  2025-07-11  7:20       ` Krzysztof Kozlowski
  2025-07-30  4:17       ` Alim Akhtar
@ 2025-09-03 19:20       ` Henrik Grimler
  2025-09-04  9:13         ` Devang Tailor
  2 siblings, 1 reply; 15+ messages in thread
From: Henrik Grimler @ 2025-09-03 19:20 UTC (permalink / raw)
  To: Devang Tailor
  Cc: robh, krzk+dt, conor+dt, alim.akhtar, alexandre.belloni,
	devicetree, linux-arm-kernel, linux-samsung-soc, linux-kernel,
	linux-rtc, faraz.ata

Hi Devang,

On Thu, Jul 10, 2025 at 02:04:33PM +0530, Devang Tailor wrote:
> The on-chip RTC of this SoC is almost similar to the previous
> versions of SoC. Hence re-use the existing driver with platform specific
> change to enable RTC.

Could you please describe what the differences are to previous SoCs?
You write almost similar, please elaborate in what way in commit
message.

> This has been tested with 'hwclock' & 'date' utilities
> 
> Signed-off-by: Devang Tailor <dev.tailor@samsung.com>
> ---
> 
>  drivers/rtc/rtc-s3c.c | 18 ++++++++++++++++++
>  1 file changed, 18 insertions(+)
> 
> diff --git a/drivers/rtc/rtc-s3c.c b/drivers/rtc/rtc-s3c.c
> index 5dd575865adf..8db24b6360b8 100644
> --- a/drivers/rtc/rtc-s3c.c
> +++ b/drivers/rtc/rtc-s3c.c
> @@ -384,6 +384,15 @@ static void s3c6410_rtc_disable(struct s3c_rtc *info)
>  	writew(con, info->base + S3C2410_RTCCON);
>  }
>  
> +static void exynosautov9_rtc_disable(struct s3c_rtc *info)
> +{
> +	unsigned int con;
> +
> +	con = readb(info->base + S3C2410_RTCCON);
> +	con &= ~S3C2410_RTCCON_RTCEN;
> +	writeb(con, info->base + S3C2410_RTCCON);
> +}

Rather than adding a new rtc_disable variant I think this could be
handled in existing s3c24xx_rtc_disable (and I think that is what
Krzysztof meant). How about adding a new bool to rtc_data that
describes if S3C2410_TICNT reg is supported or not, and checking it in
s3c24xx_rtc_disable?

Best regards,
Henrik Grimler

>  static void s3c_rtc_remove(struct platform_device *pdev)
>  {
>  	struct s3c_rtc *info = platform_get_drvdata(pdev);
> @@ -574,6 +583,12 @@ static struct s3c_rtc_data const s3c6410_rtc_data = {
>  	.disable		= s3c6410_rtc_disable,
>  };
>  
> +static const struct s3c_rtc_data exynosautov9_rtc_data = {
> +	.irq_handler		= s3c6410_rtc_irq,
> +	.enable			= s3c24xx_rtc_enable,
> +	.disable		= exynosautov9_rtc_disable,
> +};
> +
>  static const __maybe_unused struct of_device_id s3c_rtc_dt_match[] = {
>  	{
>  		.compatible = "samsung,s3c2410-rtc",
> @@ -590,6 +605,9 @@ static const __maybe_unused struct of_device_id s3c_rtc_dt_match[] = {
>  	}, {
>  		.compatible = "samsung,exynos3250-rtc",
>  		.data = &s3c6410_rtc_data,
> +	}, {
> +		.compatible = "samsung,exynosautov9-rtc",
> +		.data = &exynosautov9_rtc_data,
>  	},
>  	{ /* sentinel */ },
>  };
> -- 
> 2.34.1
> 
> 

^ permalink raw reply	[flat|nested] 15+ messages in thread

* RE: [PATCH v2 2/3] rtc: s3c: support for exynosautov9 on-chip RTC
  2025-09-03 19:20       ` Henrik Grimler
@ 2025-09-04  9:13         ` Devang Tailor
  0 siblings, 0 replies; 15+ messages in thread
From: Devang Tailor @ 2025-09-04  9:13 UTC (permalink / raw)
  To: 'Henrik Grimler'
  Cc: robh, krzk+dt, conor+dt, alim.akhtar, alexandre.belloni,
	devicetree, linux-arm-kernel, linux-samsung-soc, linux-kernel,
	linux-rtc, faraz.ata


Hi,


> -----Original Message-----
> From: Henrik Grimler <henrik@grimler.se>
> Sent: 04 September 2025 00:51
> To: Devang Tailor <dev.tailor@samsung.com>
> Cc: robh@kernel.org; krzk+dt@kernel.org; conor+dt@kernel.org;
> alim.akhtar@samsung.com; alexandre.belloni@bootlin.com;
> devicetree@vger.kernel.org; linux-arm-kernel@lists.infradead.org; linux-
> samsung-soc@vger.kernel.org; linux-kernel@vger.kernel.org; linux-
> rtc@vger.kernel.org; faraz.ata@samsung.com
> Subject: Re: [PATCH v2 2/3] rtc: s3c: support for exynosautov9 on-chip RTC
> 
> Hi Devang,
> 
> On Thu, Jul 10, 2025 at 02:04:33PM +0530, Devang Tailor wrote:
> > The on-chip RTC of this SoC is almost similar to the previous versions
> > of SoC. Hence re-use the existing driver with platform specific change
> > to enable RTC.
> 
> Could you please describe what the differences are to previous SoCs?
> You write almost similar, please elaborate in what way in commit message.

Ok. I will add in V3.

> 
> > This has been tested with 'hwclock' & 'date' utilities
> >
> > Signed-off-by: Devang Tailor <dev.tailor@samsung.com>
> > ---
> >
> >  drivers/rtc/rtc-s3c.c | 18 ++++++++++++++++++
> >  1 file changed, 18 insertions(+)
> >
> > diff --git a/drivers/rtc/rtc-s3c.c b/drivers/rtc/rtc-s3c.c index
> > 5dd575865adf..8db24b6360b8 100644
> > --- a/drivers/rtc/rtc-s3c.c
> > +++ b/drivers/rtc/rtc-s3c.c
> > @@ -384,6 +384,15 @@ static void s3c6410_rtc_disable(struct s3c_rtc
> *info)
> >  	writew(con, info->base + S3C2410_RTCCON);  }
> >
> > +static void exynosautov9_rtc_disable(struct s3c_rtc *info) {
> > +	unsigned int con;
> > +
> > +	con = readb(info->base + S3C2410_RTCCON);
> > +	con &= ~S3C2410_RTCCON_RTCEN;
> > +	writeb(con, info->base + S3C2410_RTCCON); }
> 
> Rather than adding a new rtc_disable variant I think this could be handled
in
> existing s3c24xx_rtc_disable (and I think that is what Krzysztof meant).
How
> about adding a new bool to rtc_data that describes if S3C2410_TICNT reg is
> supported or not, and checking it in s3c24xx_rtc_disable?

Ok. I will add bool 'use_s3c2410_ticnt´ to differentiate if any variant uses
TICNT or not, making it
'true' for existing RTC variants which are using s3c24xx_rtc_disable().

> 
> Best regards,
> Henrik Grimler
> 
> >  static void s3c_rtc_remove(struct platform_device *pdev)  {
> >  	struct s3c_rtc *info = platform_get_drvdata(pdev); @@ -574,6 +583,12
> > @@ static struct s3c_rtc_data const s3c6410_rtc_data = {
> >  	.disable		= s3c6410_rtc_disable,
> >  };
> >
> > +static const struct s3c_rtc_data exynosautov9_rtc_data = {
> > +	.irq_handler		= s3c6410_rtc_irq,
> > +	.enable			= s3c24xx_rtc_enable,
> > +	.disable		= exynosautov9_rtc_disable,
> > +};
> > +
> >  static const __maybe_unused struct of_device_id s3c_rtc_dt_match[] = {
> >  	{
> >  		.compatible = "samsung,s3c2410-rtc", @@ -590,6 +605,9 @@
> static
> > const __maybe_unused struct of_device_id s3c_rtc_dt_match[] = {
> >  	}, {
> >  		.compatible = "samsung,exynos3250-rtc",
> >  		.data = &s3c6410_rtc_data,
> > +	}, {
> > +		.compatible = "samsung,exynosautov9-rtc",
> > +		.data = &exynosautov9_rtc_data,
> >  	},
> >  	{ /* sentinel */ },
> >  };
> > --
> > 2.34.1
> >
> >



^ permalink raw reply	[flat|nested] 15+ messages in thread

end of thread, other threads:[~2025-09-04  9:13 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <CGME20250710082533epcas5p111be26bea2ccc08718eebcb12929bbbf@epcas5p1.samsung.com>
2025-07-10  8:34 ` [PATCH v2 0/3] On-chip RTC support for ExynosAutov9 Devang Tailor
     [not found]   ` <CGME20250710082534epcas5p40b49f5662ff36306349e6721fa9811fe@epcas5p4.samsung.com>
2025-07-10  8:34     ` [PATCH v2 1/3] dt-bindings: rtc: s3c-rtc: add compatible for exynosautov9 Devang Tailor
2025-07-11  7:18       ` Krzysztof Kozlowski
2025-07-30  4:15       ` Alim Akhtar
     [not found]   ` <CGME20250710082536epcas5p4f9dcd50ff474066562b2cbd40199d2d9@epcas5p4.samsung.com>
2025-07-10  8:34     ` [PATCH v2 2/3] rtc: s3c: support for exynosautov9 on-chip RTC Devang Tailor
2025-07-11  7:20       ` Krzysztof Kozlowski
2025-07-11  9:52         ` Devang Tailor
2025-07-30  4:17       ` Alim Akhtar
2025-09-03 19:20       ` Henrik Grimler
2025-09-04  9:13         ` Devang Tailor
     [not found]   ` <CGME20250710082538epcas5p2556f80b4193a046262808ae7742675be@epcas5p2.samsung.com>
2025-07-10  8:34     ` [PATCH v2 3/3] arm64: dts: exynosautov9: add RTC DT node Devang Tailor
2025-07-30  4:26       ` Alim Akhtar
2025-09-03 11:39   ` [PATCH v2 0/3] On-chip RTC support for ExynosAutov9 Devang Tailor
2025-09-03 12:23     ` Alexandre Belloni
2025-09-03 13:51       ` Devang Tailor

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).